linux-next/drivers/net/vxlan
Johannes Berg a885a6b2d3 net: convert to nla_get_*_default()
Most of the original conversion is from the spatch below,
but I edited some and left out other instances that were
either buggy after conversion (where default values don't
fit into the type) or just looked strange.

    @@
    expression attr, def;
    expression val;
    identifier fn =~ "^nla_get_.*";
    fresh identifier dfn = fn ## "_default";
    @@
    (
    -if (attr)
    -  val = fn(attr);
    -else
    -  val = def;
    +val = dfn(attr, def);
    |
    -if (!attr)
    -  val = def;
    -else
    -  val = fn(attr);
    +val = dfn(attr, def);
    |
    -if (!attr)
    -  return def;
    -return fn(attr);
    +return dfn(attr, def);
    |
    -attr ? fn(attr) : def
    +dfn(attr, def)
    |
    -!attr ? def : fn(attr)
    +dfn(attr, def)
    )

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Toke Høiland-Jørgensen <toke@kernel.org>
Link: https://patch.msgid.link/20241108114145.0580b8684e7f.I740beeaa2f70ebfc19bfca1045a24d6151992790@changeid
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-11-11 10:32:06 -08:00
..
Makefile vxlan: mdb: Add MDB control path support 2023-03-17 08:05:49 +00:00
vxlan_core.c net: convert to nla_get_*_default() 2024-11-11 10:32:06 -08:00
vxlan_mdb.c net: vxlan: use kfree_skb_reason() in vxlan_mdb_xmit() 2024-10-13 11:33:09 +01:00
vxlan_multicast.c vxlan: vni filtering support on collect metadata device 2022-03-01 08:38:02 +00:00
vxlan_private.h vxlan: Handle error of rtnl_register_module(). 2024-10-10 15:39:35 +02:00
vxlan_vnifilter.c vxlan: Handle error of rtnl_register_module(). 2024-10-10 15:39:35 +02:00