All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5 v2]wireless:hostap_main.c warning: variable 'iface' set but not used
@ 2010-06-21 22:02 Justin P. Mattock
  2010-06-22 18:13 ` John W. Linville
  0 siblings, 1 reply; 3+ messages in thread
From: Justin P. Mattock @ 2010-06-21 22:02 UTC (permalink / raw)
  To: linux-wireless; +Cc: netdev, linux-kernel, Justin P. Mattock

This is a resend from version one due to trying a different approach
than the original(probably important to leave netdev_priv() in).

In any case have a look, if there's another approach let me know
and ill test it out. The below patch fixes a warning im seeing
when compiling with gcc 4.6.0

CC [M]  drivers/net/wireless/hostap/hostap_main.o
drivers/net/wireless/hostap/hostap_main.c: In function 'hostap_set_multicast_list_queue':
drivers/net/wireless/hostap/hostap_main.c:744:27: warning: variable 'iface' set but not used
 Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>

---
 drivers/net/wireless/hostap/hostap_main.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/hostap/hostap_main.c b/drivers/net/wireless/hostap/hostap_main.c
index eb57d1e..a866e7a 100644
--- a/drivers/net/wireless/hostap/hostap_main.c
+++ b/drivers/net/wireless/hostap/hostap_main.c
@@ -741,9 +741,8 @@ void hostap_set_multicast_list_queue(struct work_struct *work)
 	local_info_t *local =
 		container_of(work, local_info_t, set_multicast_list_queue);
 	struct net_device *dev = local->dev;
-	struct hostap_interface *iface;
 
-	iface = netdev_priv(dev);
+	netdev_priv(dev);
 	if (hostap_set_word(dev, HFA384X_RID_PROMISCUOUSMODE,
 			    local->is_promisc)) {
 		printk(KERN_INFO "%s: %sabling promiscuous mode failed\n",
-- 
1.7.1.rc1.21.gf3bd6


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

* Re: [PATCH 1/5 v2]wireless:hostap_main.c warning: variable 'iface' set but not used
  2010-06-21 22:02 [PATCH 1/5 v2]wireless:hostap_main.c warning: variable 'iface' set but not used Justin P. Mattock
@ 2010-06-22 18:13 ` John W. Linville
  2010-06-22 18:34   ` Justin P. Mattock
  0 siblings, 1 reply; 3+ messages in thread
From: John W. Linville @ 2010-06-22 18:13 UTC (permalink / raw)
  To: Justin P. Mattock; +Cc: linux-wireless, netdev, linux-kernel

On Mon, Jun 21, 2010 at 03:02:13PM -0700, Justin P. Mattock wrote:
> This is a resend from version one due to trying a different approach
> than the original(probably important to leave netdev_priv() in).
> 
> In any case have a look, if there's another approach let me know
> and ill test it out. The below patch fixes a warning im seeing
> when compiling with gcc 4.6.0
> 
> CC [M]  drivers/net/wireless/hostap/hostap_main.o
> drivers/net/wireless/hostap/hostap_main.c: In function 'hostap_set_multicast_list_queue':
> drivers/net/wireless/hostap/hostap_main.c:744:27: warning: variable 'iface' set but not used
>  Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>

I already applied the other version to wireless-next-2.6.  I can't
imagine what you mean to accomplish by leaving in a call to netdev_priv
w/o assigning the result to something.

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

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

* Re: [PATCH 1/5 v2]wireless:hostap_main.c warning: variable 'iface' set but not used
  2010-06-22 18:13 ` John W. Linville
@ 2010-06-22 18:34   ` Justin P. Mattock
  0 siblings, 0 replies; 3+ messages in thread
From: Justin P. Mattock @ 2010-06-22 18:34 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, netdev, linux-kernel

On 06/22/2010 11:13 AM, John W. Linville wrote:
> On Mon, Jun 21, 2010 at 03:02:13PM -0700, Justin P. Mattock wrote:
>> This is a resend from version one due to trying a different approach
>> than the original(probably important to leave netdev_priv() in).
>>
>> In any case have a look, if there's another approach let me know
>> and ill test it out. The below patch fixes a warning im seeing
>> when compiling with gcc 4.6.0
>>
>> CC [M]  drivers/net/wireless/hostap/hostap_main.o
>> drivers/net/wireless/hostap/hostap_main.c: In function 'hostap_set_multicast_list_queue':
>> drivers/net/wireless/hostap/hostap_main.c:744:27: warning: variable 'iface' set but not used
>>   Signed-off-by: Justin P. Mattock<justinmattock@gmail.com>
>
> I already applied the other version to wireless-next-2.6.  I can't
> imagine what you mean to accomplish by leaving in a call to netdev_priv
> w/o assigning the result to something.
>
> John

alright..
as for the netdev_priv, I was getting confused on this one.

Thanks for taking the time to look at this.

Justin P. Mattock

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

end of thread, other threads:[~2010-06-22 18:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-21 22:02 [PATCH 1/5 v2]wireless:hostap_main.c warning: variable 'iface' set but not used Justin P. Mattock
2010-06-22 18:13 ` John W. Linville
2010-06-22 18:34   ` Justin P. Mattock

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.