linux_dsm_epyc7002/drivers/net/ieee802154
Johannes Berg 3b0f31f2b8 genetlink: make policy common to family
Since maxattr is common, the policy can't really differ sanely,
so make it common as well.

The only user that did in fact manage to make a non-common policy
is taskstats, which has to be really careful about it (since it's
still using a common maxattr!). This is no longer supported, but
we can fake it using pre_doit.

This reduces the size of e.g. nl80211.o (which has lots of commands):

   text	   data	    bss	    dec	    hex	filename
 398745	  14323	   2240	 415308	  6564c	net/wireless/nl80211.o (before)
 397913	  14331	   2240	 414484	  65314	net/wireless/nl80211.o (after)
--------------------------------
   -832      +8       0    -824

Which is obviously just 8 bytes for each command, and an added 8
bytes for the new policy pointer. I'm not sure why the ops list is
counted as .text though.

Most of the code transformations were done using the following spatch:
    @ops@
    identifier OPS;
    expression POLICY;
    @@
    struct genl_ops OPS[] = {
    ...,
     {
    -	.policy = POLICY,
     },
    ...
    };

    @@
    identifier ops.OPS;
    expression ops.POLICY;
    identifier fam;
    expression M;
    @@
    struct genl_family fam = {
            .ops = OPS,
            .maxattr = M,
    +       .policy = POLICY,
            ...
    };

This also gets rid of devlink_nl_cmd_region_read_dumpit() accessing
the cb->data as ops, which we want to change in a later genl patch.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-03-22 10:38:23 -04:00
..
adf7242.c ieee802154: remove unecessary condition check before debugfs_remove_recursive 2018-09-21 14:53:04 +02:00
at86rf230.c ieee802154: at86rf230: convert to DEFINE_SHOW_ATTRIBUTE 2018-12-10 12:05:20 -08:00
at86rf230.h at86rf230: add debugfs support 2015-09-17 13:20:05 +02:00
atusb.c net: ieee802154: atusb: Replace GFP_ATOMIC with GFP_KERNEL in atusb_probe 2018-04-23 20:56:23 +02:00
atusb.h ieee802154: atusb: Driver for Busware HUL dongle 2017-09-20 13:37:16 +02:00
ca8210.c ieee802154: ca8210: fix possible u8 overflow in ca8210_rx_done 2018-12-11 09:33:11 +01:00
cc2520.c ieee802154: cc2520: switch from BUG_ON() to WARN_ON() on problem 2017-11-06 16:27:55 +01:00
fakelb.c ieee802154: fakelb: add deprecated msg while probe 2018-08-06 11:21:15 +02:00
Kconfig ieee802154: hwsim: add replacement for fakelb 2018-08-06 11:21:15 +02:00
mac802154_hwsim.c genetlink: make policy common to family 2019-03-22 10:38:23 -04:00
mac802154_hwsim.h ieee802154: hwsim: add replacement for fakelb 2018-08-06 11:21:15 +02:00
Makefile ieee802154: hwsim: add replacement for fakelb 2018-08-06 11:21:15 +02:00
mcr20a.c ieee802154: mcr20a: fix indentation, remove tabs 2019-01-31 17:42:05 +01:00
mcr20a.h ieee802154: Add NXP MCR20A IEEE 802.15.4 transceiver driver 2018-02-21 09:08:39 +01:00
mrf24j40.c ieee802154: mrf24j40: fix incorrect mask in mrf24j40_stop 2017-11-06 16:27:55 +01:00