freebsd-skq/sys/dev/spibus
imp 8efc2b3f05 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_spibus.c Return BUS_PROBE_DEFAULT, not zero, because this is not the one driver 2018-04-07 18:58:58 +00:00
spi.h Reapply, with minor tweaks, r338025, from the original commit: 2018-09-26 17:12:14 +00:00
spibus_if.m
spibus.c Incorporate bus and chip select numbers into spigen(4) cdev names. Rather 2018-06-21 21:16:26 +00:00
spibusvar.h Generate a spibus_set_[ivarname]() convenience function for each ivar, 2018-04-07 20:34:57 +00:00
spigen.c Enhancements and fixes for the spigen(4) driver... 2018-07-11 17:54:41 +00:00