[PATCH] patches: pre-declare stats64_fn_wrap() to avoid sparse warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: Luca Coelho <luciano.coelho@xxxxxxxxx>

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

Fixes: 5a00d8489c7 ("patches: adapt the stat64 usage for usbnet")
Signed-off-by: Luca Coelho <luciano.coelho@xxxxxxxxx>
 patches/0075-ndo-stats-64.cocci | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/patches/0075-ndo-stats-64.cocci b/patches/0075-ndo-stats-64.cocci
index 8613182403e2..8971a97c7209 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(...) {...}
++/* 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)

To unsubscribe from this list: send the line "unsubscribe backports" in

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux