freebsd-skq/sys/dev/bwi
cem 3d8ae7a0f4 Remove unused and easy to misuse PNP macro parameter
Inspired by r338025, just remove the element size parameter to the
MODULE_PNP_INFO macro entirely.  The 'table' parameter is now required to
have correct pointer (or array) type.  Since all invocations of the macro
already had this property and the emitted PNP data continues to include the
element size, there is no functional change.

Mostly done with the coccinelle 'spatch' tool:

  $ cat modpnpsize0.cocci
    @normaltables@
    identifier b,c;
    expression a,d,e;
    declarer MODULE_PNP_INFO;
    @@
     MODULE_PNP_INFO(a,b,c,d,
    -sizeof(d[0]),
     e);

    @singletons@
    identifier b,c,d;
    expression a;
    declarer MODULE_PNP_INFO;
    @@
     MODULE_PNP_INFO(a,b,c,&d,
    -sizeof(d),
     1);

  $ rg -l MODULE_PNP_INFO -- sys | \
    xargs spatch --in-place --sp-file modpnpsize0.cocci

(Note that coccinelle invokes diff(1) via a PATH search and expects diff to
tolerate the -B flag, which BSD diff does not.  So I had to link gdiff into
PATH as diff to use spatch.)

Tinderbox'd (-DMAKE_JUST_KERNELS).
2018-08-19 00:22:21 +00:00
..
bitops.h sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
bwimac.c sys/dev: further adoption of SPDX licensing ID tags. 2017-11-20 19:36:21 +00:00
bwimac.h sys/dev: further adoption of SPDX licensing ID tags. 2017-11-20 19:36:21 +00:00
bwiphy.c sys/dev: further adoption of SPDX licensing ID tags. 2017-11-20 19:36:21 +00:00
bwiphy.h sys/dev: further adoption of SPDX licensing ID tags. 2017-11-20 19:36:21 +00:00
bwirf.c sys/dev: further adoption of SPDX licensing ID tags. 2017-11-20 19:36:21 +00:00
bwirf.h sys/dev: further adoption of SPDX licensing ID tags. 2017-11-20 19:36:21 +00:00
if_bwi_pci.c Remove unused and easy to misuse PNP macro parameter 2018-08-19 00:22:21 +00:00
if_bwi.c bwi(4): Set ic->ic_softc before bwi_getradiocaps to avoid bad deref 2018-08-10 13:06:14 +00:00
if_bwireg.h sys/dev: further adoption of SPDX licensing ID tags. 2017-11-20 19:36:21 +00:00
if_bwivar.h sys/dev: further adoption of SPDX licensing ID tags. 2017-11-20 19:36:21 +00:00