freebsd-dev/sys/dev/ofw
Warner Losh 329e817fcc Reapply, with minor tweaks, r338025, from the original commit:
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).
Approved by: re (glen)
2018-09-26 17:12:14 +00:00
..
ofw_bus_if.m
ofw_bus_subr.c simplebus pnp: Do not generate pnp info is the bus status is not okay 2018-06-12 20:03:00 +00:00
ofw_bus_subr.h Reapply, with minor tweaks, r338025, from the original commit: 2018-09-26 17:12:14 +00:00
ofw_bus.h sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
ofw_console.c sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
ofw_cpu.c ofw_cpu: Add support for getting cpu clock via clock property 2018-07-31 20:50:50 +00:00
ofw_cpu.h
ofw_disk.c sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
ofw_fdt.c dev/ofw: Fix ofw_fdt_getprop() return values to match documentation 2018-06-07 15:59:08 +00:00
ofw_if.m
ofw_pci.h sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
ofw_standard.c Set internal error returns for OF_peer(), OF_child(), and OF_parent() to 2018-02-19 15:49:14 +00:00
ofw_subr.c Add missing include of sys/boot.h 2018-07-13 18:00:13 +00:00
ofw_subr.h
ofwbus.c
ofwpci.c Do pass removing some write-only variables from the kernel. 2017-12-25 04:48:39 +00:00
ofwpci.h
ofwvar.h sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
openfirm.c Align OF_getencprop_alloc API with OF_getencprop and OF_getprop_alloc 2018-04-09 22:06:16 +00:00
openfirm.h Align OF_getencprop_alloc API with OF_getencprop and OF_getprop_alloc 2018-04-09 22:06:16 +00:00
openfirmio.c [ofw] fix errneous checks for OF_finddevice(9) return value 2018-03-20 00:03:49 +00:00
openfirmio.h sys/dev: further adoption of SPDX licensing ID tags. 2017-11-20 19:36:21 +00:00
openpromio.c sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
openpromio.h sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00