linux/net/ieee802154
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
..
6lowpan netdev_features: convert NETIF_F_NETNS_LOCAL to dev->netns_local 2024-09-03 11:36:43 +02:00
core.c netdev_features: convert NETIF_F_NETNS_LOCAL to dev->netns_local 2024-09-03 11:36:43 +02:00
core.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
header_ops.c mac802154: Handle received BEACON_REQ 2023-03-23 21:51:30 +01:00
ieee802154.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile ieee802154: Internal PAN management 2023-11-20 11:41:06 +01:00
netlink.c genetlink: start to validate reserved header bytes 2022-08-29 12:47:15 +01:00
nl802154.c net: convert to nla_get_*_default() 2024-11-11 10:32:06 -08:00
nl802154.h ieee802154: Add support for user beaconing requests 2023-01-28 13:51:22 +01:00
nl_policy.c nl802154: add missing attribute validation for dev_type 2020-03-03 13:28:48 -08:00
nl-mac.c net: convert to nla_get_*_default() 2024-11-11 10:32:06 -08:00
nl-phy.c net: ieee802154: Use the IEEE802154_MAX_PAGE define when relevant 2022-01-28 11:23:30 +01:00
pan.c mac802154: Avoid new associations while disassociating 2023-12-15 11:14:57 +01:00
rdev-ops.h ieee802154: Add support for user disassociation requests 2023-11-20 11:42:47 +01:00
socket.c net: ieee802154: do not leave a dangling sk pointer in ieee802154_create() 2024-10-15 18:43:08 -07:00
sysfs.c ieee802154: cfg802154: make wpan_phy_class constant 2024-03-06 21:23:10 +01:00
sysfs.h ieee802154: cfg802154: make wpan_phy_class constant 2024-03-06 21:23:10 +01:00
trace.c
trace.h tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00