All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] wlcore: a few sparse and compiler warning fixes
@ 2012-05-16  2:59 Luciano Coelho
  2012-05-16  2:59 ` [PATCH 1/2] wlcore: fix pointer print out in wl1271_acx_set_rx_filter() Luciano Coelho
  2012-05-16  3:00 ` [PATCH 2/2] wlcore: fix some sparse warnings due to missing static declaration Luciano Coelho
  0 siblings, 2 replies; 3+ messages in thread
From: Luciano Coelho @ 2012-05-16  2:59 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless

Hi John,

These two patches fix the warning you reported to me and a few sparse
warnings that I just found.  Please take them directly into your tree
(ie. I won't send a separate pull for this).

Thanks and sorry for the trouble!

Cheers,
Luca.

Luciano Coelho (2):
  wlcore: fix pointer print out in wl1271_acx_set_rx_filter()
  wlcore: fix some sparse warnings due to missing static declaration

 drivers/net/wireless/ti/wlcore/acx.c  |    5 +++--
 drivers/net/wireless/ti/wlcore/main.c |    7 ++++---
 2 files changed, 7 insertions(+), 5 deletions(-)

-- 
1.7.10


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

* [PATCH 1/2] wlcore: fix pointer print out in wl1271_acx_set_rx_filter()
  2012-05-16  2:59 [PATCH 0/2] wlcore: a few sparse and compiler warning fixes Luciano Coelho
@ 2012-05-16  2:59 ` Luciano Coelho
  2012-05-16  3:00 ` [PATCH 2/2] wlcore: fix some sparse warnings due to missing static declaration Luciano Coelho
  1 sibling, 0 replies; 3+ messages in thread
From: Luciano Coelho @ 2012-05-16  2:59 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless

The debug print in wl1271_acx_set_rx_filter() was causing the
following warning:

  CC      drivers/net/wireless/ti/wlcore/acx.o
drivers/net/wireless/ti/wlcore/acx.c: In function ‘wl1271_acx_set_rx_filter’:
drivers/net/wireless/ti/wlcore/acx.c:1759:2: warning: cast from pointer to integer of different size

Instead of casting the pointer to an integer, use %p to print it our
instead.

Reported-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
---
 drivers/net/wireless/ti/wlcore/acx.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ti/wlcore/acx.c b/drivers/net/wireless/ti/wlcore/acx.c
index 0fd78a0..509aa88 100644
--- a/drivers/net/wireless/ti/wlcore/acx.c
+++ b/drivers/net/wireless/ti/wlcore/acx.c
@@ -1756,8 +1756,9 @@ int wl1271_acx_set_rx_filter(struct wl1271 *wl, u8 index, bool enable,
 	WARN_ON(enable && !filter);
 	WARN_ON(index >= WL1271_MAX_RX_FILTERS);
 
-	wl1271_debug(DEBUG_ACX, "acx set rx filter idx: %d enable: %d"
-		     "filter: 0x%x", index, enable, (unsigned int)filter);
+	wl1271_debug(DEBUG_ACX,
+		     "acx set rx filter idx: %d enable: %d filter: %p",
+		     index, enable, filter);
 
 	if (enable) {
 		fields_size = wl1271_rx_filter_get_fields_size(filter);
-- 
1.7.10


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

* [PATCH 2/2] wlcore: fix some sparse warnings due to missing static declaration
  2012-05-16  2:59 [PATCH 0/2] wlcore: a few sparse and compiler warning fixes Luciano Coelho
  2012-05-16  2:59 ` [PATCH 1/2] wlcore: fix pointer print out in wl1271_acx_set_rx_filter() Luciano Coelho
@ 2012-05-16  3:00 ` Luciano Coelho
  1 sibling, 0 replies; 3+ messages in thread
From: Luciano Coelho @ 2012-05-16  3:00 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless

There were three sparse warnings in main.c due to missing static
declaration:

  CHECK   drivers/net/wireless/ti/wlcore/main.c
drivers/net/wireless/ti/wlcore/main.c:1265:5: warning: symbol 'wl1271_validate_wowlan_pattern' was not declared. Should it be static?
drivers/net/wireless/ti/wlcore/main.c:1408:5: warning: symbol 'wl1271_convert_wowlan_pattern_to_rx_filter' was not declared. Should it be static?
drivers/net/wireless/ti/wlcore/main.c:4823:6: warning: symbol 'wl1271_connection_loss_work' was not declared. Should it be static?

Fix these by adding the static declaration to those functions.

Signed-off-by: Luciano Coelho <coelho@ti.com>
---
 drivers/net/wireless/ti/wlcore/main.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 45fe911..acef933 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -1262,7 +1262,8 @@ static struct sk_buff *wl12xx_alloc_dummy_packet(struct wl1271 *wl)
 
 
 #ifdef CONFIG_PM
-int wl1271_validate_wowlan_pattern(struct cfg80211_wowlan_trig_pkt_pattern *p)
+static int
+wl1271_validate_wowlan_pattern(struct cfg80211_wowlan_trig_pkt_pattern *p)
 {
 	int num_fields = 0, in_field = 0, fields_size = 0;
 	int i, pattern_len = 0;
@@ -1405,7 +1406,7 @@ void wl1271_rx_filter_flatten_fields(struct wl12xx_rx_filter *filter,
  * Allocates an RX filter returned through f
  * which needs to be freed using rx_filter_free()
  */
-int wl1271_convert_wowlan_pattern_to_rx_filter(
+static int wl1271_convert_wowlan_pattern_to_rx_filter(
 	struct cfg80211_wowlan_trig_pkt_pattern *p,
 	struct wl12xx_rx_filter **f)
 {
@@ -4820,7 +4821,7 @@ static struct bin_attribute fwlog_attr = {
 	.read = wl1271_sysfs_read_fwlog,
 };
 
-void wl1271_connection_loss_work(struct work_struct *work)
+static void wl1271_connection_loss_work(struct work_struct *work)
 {
 	struct delayed_work *dwork;
 	struct wl1271 *wl;
-- 
1.7.10


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

end of thread, other threads:[~2012-05-16  3:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-16  2:59 [PATCH 0/2] wlcore: a few sparse and compiler warning fixes Luciano Coelho
2012-05-16  2:59 ` [PATCH 1/2] wlcore: fix pointer print out in wl1271_acx_set_rx_filter() Luciano Coelho
2012-05-16  3:00 ` [PATCH 2/2] wlcore: fix some sparse warnings due to missing static declaration Luciano Coelho

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.