ethtool: move implementation of ethnl_ops_begin/complete to netlink.c
authorHeiner Kallweit <hkallweit1@gmail.com>
Sun, 1 Aug 2021 10:37:39 +0000 (12:37 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 3 Aug 2021 11:58:22 +0000 (12:58 +0100)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ethtool/netlink.c
net/ethtool/netlink.h

index 73e0f5b626bfba4d5b575470a7e69a0039882ce8..ac720d684789cab9094daea9d84e7ff3e65005f2 100644 (file)
@@ -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
index 3fc395c867021919c114cbbb878b06b20e6a33a9..077aac3929a8bdd244d0ea20c2794bffd299db4e 100644 (file)
@@ -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