Message ID | 8de343c4-f34c-1f31-5be0-8ce6ca1dc19a@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | c5ab51df03e2d7ec8e57904aaa2c4d03b607b2b5 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | ethtool: runtime-resume netdev parent before ethtool ops | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net-next |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | warning | 6 maintainers not CCed: vladyslavt@nvidia.com johannes.berg@intel.com ffmancera@riseup.net danieller@nvidia.com yangbo.lu@nxp.com zhengyongjun3@huawei.com |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 1 this patch: 1 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 41 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 1 this patch: 1 |
netdev/header_inline | success | Link |
diff --git a/net/ethtool/netlink.c b/net/ethtool/netlink.c index 73e0f5b62..ac720d684 100644 --- a/net/ethtool/netlink.c +++ b/net/ethtool/netlink.c @@ -29,6 +29,20 @@ const struct nla_policy ethnl_header_policy_stats[] = { ETHTOOL_FLAGS_STATS), }; +int ethnl_ops_begin(struct net_device *dev) +{ + if (dev && dev->ethtool_ops->begin) + return dev->ethtool_ops->begin(dev); + else + return 0; +} + +void ethnl_ops_complete(struct net_device *dev) +{ + if (dev && dev->ethtool_ops->complete) + dev->ethtool_ops->complete(dev); +} + /** * ethnl_parse_header_dev_get() - parse request header * @req_info: structure to put results into diff --git a/net/ethtool/netlink.h b/net/ethtool/netlink.h index 3fc395c86..077aac392 100644 --- a/net/ethtool/netlink.h +++ b/net/ethtool/netlink.h @@ -247,19 +247,8 @@ struct ethnl_reply_data { struct net_device *dev; }; -static inline int ethnl_ops_begin(struct net_device *dev) -{ - if (dev && dev->ethtool_ops->begin) - return dev->ethtool_ops->begin(dev); - else - return 0; -} - -static inline void ethnl_ops_complete(struct net_device *dev) -{ - if (dev && dev->ethtool_ops->complete) - dev->ethtool_ops->complete(dev); -} +int ethnl_ops_begin(struct net_device *dev); +void ethnl_ops_complete(struct net_device *dev); /** * struct ethnl_request_ops - unified handling of GET requests
In preparation of subsequent extensions to both functions move the implementations from netlink.h to netlink.c. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> --- net/ethtool/netlink.c | 14 ++++++++++++++ net/ethtool/netlink.h | 15 ++------------- 2 files changed, 16 insertions(+), 13 deletions(-)