Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Dec 2017 11:14:51 -0800
From:      Conrad Meyer <cem@freebsd.org>
To:        Warner Losh <imp@freebsd.org>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r327084 - head/sys/dev/pccard
Message-ID:  <CAG6CVpWMHDVSW-jGxHYQcWwB5NNtDevdRzhhXnpC3cKXr2yMtw@mail.gmail.com>
In-Reply-To: <201712221659.vBMGxoUH038447@repo.freebsd.org>
References:  <201712221659.vBMGxoUH038447@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Dec 22, 2017 at 8:59 AM, Warner Losh <imp@freebsd.org> 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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG6CVpWMHDVSW-jGxHYQcWwB5NNtDevdRzhhXnpC3cKXr2yMtw>