ERROR: trailing statements should be on next line #173: FILE: net/core/dev.h:37: +DEFINE_FREE(netdev_unlock, struct net_device *, if (_T) netdev_unlock(_T)); CHECK: Macro argument 'var_name' may be better as '(var_name)' to avoid precedence issues #175: FILE: net/core/dev.h:39: +#define for_each_netdev_lock_scoped(net, var_name, ifindex) \ + for (struct net_device *var_name __free(netdev_unlock) = NULL; \ + (var_name = netdev_xa_find_lock(net, var_name, &ifindex)); \ + ifindex++) CHECK: Macro argument 'ifindex' may be better as '(ifindex)' to avoid precedence issues #175: FILE: net/core/dev.h:39: +#define for_each_netdev_lock_scoped(net, var_name, ifindex) \ + for (struct net_device *var_name __free(netdev_unlock) = NULL; \ + (var_name = netdev_xa_find_lock(net, var_name, &ifindex)); \ + ifindex++) total: 1 errors, 0 warnings, 2 checks, 152 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. Commit ef58ea5c426c ("net: add helpers for lookup and walking netdevs under netdev_lock()") has style problems, please review. NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT BAD_REPORTED_BY_LINK CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS.