linux_dsm_epyc7002/net/batman-adv
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
..
bat_algo.c batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
bat_algo.h batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
bat_iv_ogm.c batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
bat_iv_ogm.h batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
bat_v_elp.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-02-08 15:00:17 -08:00
bat_v_elp.h batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
bat_v_ogm.c batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
bat_v_ogm.h batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
bat_v.c batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
bat_v.h batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
bitarray.c batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
bitarray.h batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
bridge_loop_avoidance.c batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
bridge_loop_avoidance.h batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
debugfs.c batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
debugfs.h batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
distributed-arp-table.c batman-adv: fix memory leak in in batadv_dat_put_dhcp 2019-02-06 19:42:52 +01:00
distributed-arp-table.h batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
fragmentation.c batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
fragmentation.h batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
gateway_client.c batman-adv: Add gateway mesh genl configuration 2019-02-09 14:28:14 +01:00
gateway_client.h batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
gateway_common.c batman-adv: Add gateway mesh genl configuration 2019-02-09 14:28:14 +01:00
gateway_common.h batman-adv: Add gateway mesh genl configuration 2019-02-09 14:28:14 +01:00
hard-interface.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-02-08 15:00:17 -08:00
hard-interface.h batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
hash.c batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
hash.h batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
icmp_socket.c This feature/cleanup patchset includes the following patches: 2019-02-01 11:04:13 -08:00
icmp_socket.h batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
Kconfig batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
log.c This feature/cleanup patchset includes the following patches: 2019-02-01 11:04:13 -08:00
log.h batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
main.c batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
main.h batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
Makefile batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
multicast.c This feature/cleanup patchset includes the following patches: 2019-02-01 11:04:13 -08:00
multicast.h batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
netlink.c genetlink: make policy common to family 2019-03-22 10:38:23 -04:00
netlink.h batman-adv: Trigger genl notification on sysfs config change 2019-02-09 14:28:15 +01:00
network-coding.c batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
network-coding.h batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
originator.c batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
originator.h batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
routing.c batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
routing.h batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
send.c batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
send.h batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
soft-interface.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-02-15 12:38:38 -08:00
soft-interface.h batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
sysfs.c batman-adv: Trigger genl notification on sysfs config change 2019-02-09 14:28:15 +01:00
sysfs.h batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
tp_meter.c batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
tp_meter.h batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
trace.c batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
trace.h batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
translation-table.c batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
translation-table.h batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
tvlv.c batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
tvlv.h batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00
types.h batman-adv: Update copyright years for 2019 2019-01-04 11:04:24 +01:00