linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net1080: Mark nc_dump_ttl() as __maybe_unused
@ 2017-05-17 22:17 Matthias Kaehlcke
  2017-05-18 14:48 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Matthias Kaehlcke @ 2017-05-17 22:17 UTC (permalink / raw)
  To: linux-usb; +Cc: netdev, linux-kernel, Matthias Kaehlcke

The function is not used, but it looks useful for debugging. Adding the
attribute fixes the following clang warning:

drivers/net/usb/net1080.c:271:20: error: unused function
    'nc_dump_ttl' [-Werror,-Wunused-function]

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---
 drivers/net/usb/net1080.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/usb/net1080.c b/drivers/net/usb/net1080.c
index 4cbdb1307f3e..7ade2119f462 100644
--- a/drivers/net/usb/net1080.c
+++ b/drivers/net/usb/net1080.c
@@ -268,7 +268,7 @@ static inline void nc_dump_status(struct usbnet *dev, u16 status)
 #define	TTL_OTHER(ttl)	(0x00ff & (ttl >> 8))
 #define MK_TTL(this,other)	((u16)(((other)<<8)|(0x00ff&(this))))
 
-static inline void nc_dump_ttl(struct usbnet *dev, u16 ttl)
+static inline void __maybe_unused nc_dump_ttl(struct usbnet *dev, u16 ttl)
 {
 	netif_dbg(dev, link, dev->net, "net1080 %s-%s ttl 0x%x this = %d, other = %d\n",
 		  dev->udev->bus->bus_name, dev->udev->devpath,
-- 
2.13.0.303.g4ebf302169-goog

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] net1080: Mark nc_dump_ttl() as __maybe_unused
  2017-05-17 22:17 [PATCH] net1080: Mark nc_dump_ttl() as __maybe_unused Matthias Kaehlcke
@ 2017-05-18 14:48 ` David Miller
  2017-05-18 16:44   ` Matthias Kaehlcke
  0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2017-05-18 14:48 UTC (permalink / raw)
  To: mka; +Cc: linux-usb, netdev, linux-kernel

From: Matthias Kaehlcke <mka@chromium.org>
Date: Wed, 17 May 2017 15:17:08 -0700

> The function is not used, but it looks useful for debugging. Adding the
> attribute fixes the following clang warning:
> 
> drivers/net/usb/net1080.c:271:20: error: unused function
>     'nc_dump_ttl' [-Werror,-Wunused-function]
> 
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>

For this and the r8152 patch, I definitely prefer that the function is
removed.

If someone needs them, they can pull it out of the GIT history.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net1080: Mark nc_dump_ttl() as __maybe_unused
  2017-05-18 14:48 ` David Miller
@ 2017-05-18 16:44   ` Matthias Kaehlcke
  0 siblings, 0 replies; 3+ messages in thread
From: Matthias Kaehlcke @ 2017-05-18 16:44 UTC (permalink / raw)
  To: David Miller; +Cc: linux-usb, netdev, linux-kernel

Hi David,

El Thu, May 18, 2017 at 10:48:08AM -0400 David Miller ha dit:

> From: Matthias Kaehlcke <mka@chromium.org>
> Date: Wed, 17 May 2017 15:17:08 -0700
> 
> > The function is not used, but it looks useful for debugging. Adding the
> > attribute fixes the following clang warning:
> > 
> > drivers/net/usb/net1080.c:271:20: error: unused function
> >     'nc_dump_ttl' [-Werror,-Wunused-function]
> > 
> > Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> 
> For this and the r8152 patch, I definitely prefer that the function is
> removed.
> 
> If someone needs them, they can pull it out of the GIT history.

Thanks for you comments, I'll send out updated patches soon.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-05-18 16:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-17 22:17 [PATCH] net1080: Mark nc_dump_ttl() as __maybe_unused Matthias Kaehlcke
2017-05-18 14:48 ` David Miller
2017-05-18 16:44   ` Matthias Kaehlcke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).