Re: svn commit: r327084 - head/sys/dev/pccard
On Sat, Dec 23, 2017 at 12:14 PM, Conrad Meyer wrote: > On Fri, Dec 22, 2017 at 8:59 AM, Warner Losh wrote: > > ... > > New Revision: 327084 > > > > PC Card PNP tables are terminated by a NULL sentinel. This shouldn't > > be recorded in the linker hints, so subtract one to omit it. > > > == > > --- head/sys/dev/pccard/pccardvar.h Fri Dec 22 16:27:29 2017 > (r327083) > > +++ head/sys/dev/pccard/pccardvar.h Fri Dec 22 16:59:50 2017 > (r327084) > > @@ -95,7 +95,7 @@ struct pccard_product { > > */ > > #define PCCARD_PNP_DESCR "D:#;V32:manufacturer;V32: > product;Z:cisvendor;Z:cisproduct;" > > #define PCCARD_PNP_INFO(t) \ > > - MODULE_PNP_INFO(PCCARD_PNP_DESCR, pccard, t, t, sizeof(t[0]), > sizeof(t) / sizeof(t[0])); \ > > + MODULE_PNP_INFO(PCCARD_PNP_DESCR, pccard, t, t, sizeof(t[0]), > sizeof(t) / sizeof(t[0]) - 1); \ > > Perhaps more clearly, this could be: > MODULE_PNP_INFO(PCCARD_PNP_DESCR, pccard, t, t, sizeof(t[0]), nitems(t) - > 1) > Yup. A later commit did just that when I saw the construct used elsewhere. Thanks for the suggestion! Warner ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r327084 - head/sys/dev/pccard
On Fri, Dec 22, 2017 at 8:59 AM, Warner Losh wrote: > ... > New Revision: 327084 > > PC Card PNP tables are terminated by a NULL sentinel. This shouldn't > be recorded in the linker hints, so subtract one to omit it. > == > --- head/sys/dev/pccard/pccardvar.h Fri Dec 22 16:27:29 2017 > (r327083) > +++ head/sys/dev/pccard/pccardvar.h Fri Dec 22 16:59:50 2017 > (r327084) > @@ -95,7 +95,7 @@ struct pccard_product { > */ > #define PCCARD_PNP_DESCR > "D:#;V32:manufacturer;V32:product;Z:cisvendor;Z:cisproduct;" > #define PCCARD_PNP_INFO(t) \ > - MODULE_PNP_INFO(PCCARD_PNP_DESCR, pccard, t, t, sizeof(t[0]), > sizeof(t) / sizeof(t[0])); \ > + MODULE_PNP_INFO(PCCARD_PNP_DESCR, pccard, t, t, sizeof(t[0]), > sizeof(t) / sizeof(t[0]) - 1); \ Perhaps more clearly, this could be: MODULE_PNP_INFO(PCCARD_PNP_DESCR, pccard, t, t, sizeof(t[0]), nitems(t) - 1) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r327084 - head/sys/dev/pccard
Author: imp Date: Fri Dec 22 16:59:50 2017 New Revision: 327084 URL: https://svnweb.freebsd.org/changeset/base/327084 Log: PC Card PNP tables are terminated by a NULL sentinel. This shouldn't be recorded in the linker hints, so subtract one to omit it. Modified: head/sys/dev/pccard/pccardvar.h Modified: head/sys/dev/pccard/pccardvar.h == --- head/sys/dev/pccard/pccardvar.h Fri Dec 22 16:27:29 2017 (r327083) +++ head/sys/dev/pccard/pccardvar.h Fri Dec 22 16:59:50 2017 (r327084) @@ -95,7 +95,7 @@ struct pccard_product { */ #define PCCARD_PNP_DESCR "D:#;V32:manufacturer;V32:product;Z:cisvendor;Z:cisproduct;" #define PCCARD_PNP_INFO(t) \ - MODULE_PNP_INFO(PCCARD_PNP_DESCR, pccard, t, t, sizeof(t[0]), sizeof(t) / sizeof(t[0])); \ + MODULE_PNP_INFO(PCCARD_PNP_DESCR, pccard, t, t, sizeof(t[0]), sizeof(t) / sizeof(t[0]) - 1); \ typedef int (*pccard_product_match_fn) (device_t dev, const struct pccard_product *ent, int vpfmatch); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"