mirror of
https://github.com/torvalds/linux.git
synced 2024-12-15 07:33:56 +00:00
a885a6b2d3
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> |
||
---|---|---|
.. | ||
core.c | ||
dev.c | ||
devl_internal.h | ||
dpipe.c | ||
health.c | ||
linecard.c | ||
Makefile | ||
netlink_gen.c | ||
netlink_gen.h | ||
netlink.c | ||
param.c | ||
port.c | ||
rate.c | ||
region.c | ||
resource.c | ||
sb.c | ||
trap.c |