diff options
author | Luca Coelho <luciano.coelho@intel.com> | 2017-11-02 11:59:35 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2017-11-17 10:47:40 +0100 |
commit | 2697a217cace11c3e97f51a9e2e9bc55eb29c2b4 (patch) | |
tree | cdbd67cde5118b807b4e11aa6779d2046a58fe9a /patches | |
parent | 662da74dff753be0da8ecc8a66a52484f4f3b7d7 (diff) |
patches: pre-declare stats64_fn_wrap() to avoid sparse warnings
The stats64_fn_wrap() function was changed to be not-static so it can
be used by usbnet. This causes problems in files that don't export
it. Work around that byt just pre-declaring it before the actual
definition.
Fixes: 5a00d8489c7 ("patches: adapt the stat64 usage for usbnet")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'patches')
-rw-r--r-- | patches/0075-ndo-stats-64.cocci | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/patches/0075-ndo-stats-64.cocci b/patches/0075-ndo-stats-64.cocci index 86131824..8971a97c 100644 --- a/patches/0075-ndo-stats-64.cocci +++ b/patches/0075-ndo-stats-64.cocci @@ -18,6 +18,10 @@ identifier r.stats64_fn; @@ void stats64_fn(...) {...} +#if LINUX_VERSION_IS_LESS(4,11,0) ++/* Just declare it here to keep sparse happy */ ++struct rtnl_link_stats64 * ++stats64_fn_wrap(struct net_device *dev, ++ struct rtnl_link_stats64 *stats); +struct rtnl_link_stats64 * +stats64_fn_wrap(struct net_device *dev, + struct rtnl_link_stats64 *stats) |