All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] wil6210 - fix compilation warnings
@ 2014-09-14  8:14 Vladimir Kondratiev
  2014-09-14  8:14 ` [PATCH] fixup! wil6210: fix usage of print_hex_dump_debug Vladimir Kondratiev
  0 siblings, 1 reply; 2+ messages in thread
From: Vladimir Kondratiev @ 2014-09-14  8:14 UTC (permalink / raw)
  To: John W . Linville; +Cc: Vladimir Kondratiev, linux-wireless, wil6210

This is quick fix for the new warnings reported.
John, could you please squash it with original commit before it
goes up?

Vladimir Kondratiev (1):
  fixup! wil6210: fix usage of print_hex_dump_debug

 drivers/net/wireless/ath/wil6210/wil6210.h | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

-- 
1.9.1


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

* [PATCH] fixup! wil6210: fix usage of print_hex_dump_debug
  2014-09-14  8:14 [PATCH] wil6210 - fix compilation warnings Vladimir Kondratiev
@ 2014-09-14  8:14 ` Vladimir Kondratiev
  0 siblings, 0 replies; 2+ messages in thread
From: Vladimir Kondratiev @ 2014-09-14  8:14 UTC (permalink / raw)
  To: John W . Linville; +Cc: Vladimir Kondratiev, linux-wireless, wil6210

Use empty inline functions instead of empty #define. Fix for "unused variable"
as reported below:

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next.git master
head:   167bf96dd87d2a8360cb9e9783006876dac4f579
commit: 871d8c4bbb0f23c29a21b63b1801071766f69b51 [45/62] wil6210: fix usage of print_hex_dump_debug
config: i386-allyesconfig
reproduce:
  git checkout 871d8c4bbb0f23c29a21b63b1801071766f69b51
  make ARCH=i386  allyesconfig
  make ARCH=i386

All warnings:

   drivers/net/wireless/ath/wil6210/wmi.c: In function 'wmi_evt_rx_mgmt':

>> drivers/net/wireless/ath/wil6210/wmi.c:341:10: warning: unused variable 'ie_len' [-Wunused-variable]
      size_t ie_len = d_len - offsetof(struct ieee80211_mgmt,
             ^

>> drivers/net/wireless/ath/wil6210/wmi.c:340:13: warning: unused variable 'ie_buf' [-Wunused-variable]
      const u8 *ie_buf = rx_mgmt_frame->u.beacon.variable;
                ^

vim +/ie_len +341 drivers/net/wireless/ath/wil6210/wmi.c

2be7d22f Vladimir Kondratiev 2012-12-20  334
2be7d22f Vladimir Kondratiev 2012-12-20  335    if (ieee80211_is_beacon(fc) || ieee80211_is_probe_resp(fc)) {
2be7d22f Vladimir Kondratiev 2012-12-20  336            struct cfg80211_bss *bss;
8eea944a Vladimir Kondratiev 2014-06-16  337            u64 tsf = le64_to_cpu(rx_mgmt_frame->u.beacon.timestamp);
8eea944a Vladimir Kondratiev 2014-06-16  338            u16 cap = le16_to_cpu(rx_mgmt_frame->u.beacon.capab_info);
8eea944a Vladimir Kondratiev 2014-06-16  339            u16 bi = le16_to_cpu(rx_mgmt_frame->u.beacon.beacon_int);
8eea944a Vladimir Kondratiev 2014-06-16  340            const u8 *ie_buf = rx_mgmt_frame->u.beacon.variable;
8eea944a Vladimir Kondratiev 2014-06-16  341            size_t ie_len = d_len - offsetof(struct ieee80211_mgmt,
8eea944a Vladimir Kondratiev 2014-06-16  342                                             u.beacon.variable);
8eea944a Vladimir Kondratiev 2014-06-16  343            wil_dbg_wmi(wil, "Capability info : 0x%04x\n", cap);
8eea944a Vladimir Kondratiev 2014-06-16  344            wil_dbg_wmi(wil, "TSF : 0x%016llx\n", tsf);

:::::: The code at line 341 was first introduced by commit
:::::: 8eea944af0efcdba09dac1ad220c9bfa68293279 wil6210: print more info about BSS found

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
---
 drivers/net/wireless/ath/wil6210/wil6210.h | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/ath/wil6210/wil6210.h b/drivers/net/wireless/ath/wil6210/wil6210.h
index 0ff0dd9..133eeb8 100644
--- a/drivers/net/wireless/ath/wil6210/wil6210.h
+++ b/drivers/net/wireless/ath/wil6210/wil6210.h
@@ -476,12 +476,19 @@ int wil_info(struct wil6210_priv *wil, const char *fmt, ...);
 			 print_hex_dump_debug("DBG[ WMI]" prefix_str,\
 					prefix_type, rowsize,	\
 					groupsize, buf, len, ascii)
-#else
-#define wil_hex_dump_txrx(prefix_str, prefix_type, rowsize,	\
-			  groupsize, buf, len, ascii)
-#define wil_hex_dump_wmi(prefix_str, prefix_type, rowsize,	\
-			 groupsize, buf, len, ascii)
-#endif
+#else /* defined(CONFIG_DYNAMIC_DEBUG) */
+static inline
+void wil_hex_dump_txrx(const char *prefix_str, int prefix_type, int rowsize,
+		       int groupsize, const void *buf, size_t len, bool ascii)
+{
+}
+
+static inline
+void wil_hex_dump_wmi(const char *prefix_str, int prefix_type, int rowsize,
+		      int groupsize, const void *buf, size_t len, bool ascii)
+{
+}
+#endif /* defined(CONFIG_DYNAMIC_DEBUG) */
 
 void wil_memcpy_fromio_32(void *dst, const volatile void __iomem *src,
 			  size_t count);
-- 
1.9.1


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

end of thread, other threads:[~2014-09-14  8:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-14  8:14 [PATCH] wil6210 - fix compilation warnings Vladimir Kondratiev
2014-09-14  8:14 ` [PATCH] fixup! wil6210: fix usage of print_hex_dump_debug Vladimir Kondratiev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.