* [PATCH] net1080: Remove unused function nc_dump_ttl()
@ 2017-05-18 17:57 Matthias Kaehlcke
2017-05-18 18:46 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Matthias Kaehlcke @ 2017-05-18 17:57 UTC (permalink / raw)
To: David S . Miller; +Cc: linux-usb, netdev, linux-kernel, Matthias Kaehlcke
The function is not used, removing it fixes the following warning when
building with clang:
drivers/net/usb/net1080.c:271:20: error: unused function
'nc_dump_ttl' [-Werror,-Wunused-function]
Also remove the definition of TTL_THIS, which is only used in
nc_dump_ttl()
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---
drivers/net/usb/net1080.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/drivers/net/usb/net1080.c b/drivers/net/usb/net1080.c
index 4cbdb1307f3e..3202c19df83d 100644
--- a/drivers/net/usb/net1080.c
+++ b/drivers/net/usb/net1080.c
@@ -264,17 +264,9 @@ static inline void nc_dump_status(struct usbnet *dev, u16 status)
* TTL register
*/
-#define TTL_THIS(ttl) (0x00ff & ttl)
#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)
-{
- 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,
- ttl, TTL_THIS(ttl), TTL_OTHER(ttl));
-}
-
/*-------------------------------------------------------------------------*/
static int net1080_reset(struct usbnet *dev)
@@ -308,7 +300,6 @@ static int net1080_reset(struct usbnet *dev)
goto done;
}
ttl = vp;
- // nc_dump_ttl(dev, ttl);
nc_register_write(dev, REG_TTL,
MK_TTL(NC_READ_TTL_MS, TTL_OTHER(ttl)) );
--
2.13.0.303.g4ebf302169-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-05-18 18:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-18 17:57 [PATCH] net1080: Remove unused function nc_dump_ttl() Matthias Kaehlcke
2017-05-18 18:46 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox