linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] mac80211: fix mis-match in {test,set}_bit qdisc_pool
@ 2008-02-03 21:54 Tomas Winkler
  2008-02-05 20:54 ` John W. Linville
  0 siblings, 1 reply; 5+ messages in thread
From: Tomas Winkler @ 2008-02-03 21:54 UTC (permalink / raw)
  To: linville, johannes; +Cc: linux-wireless, Ron Rindjunsky

From: Ron Rindjunsky <ron.rindjunsky@intel.com>

This patch fixes a mis-match in {test,set}_bit for qdisc_pool created by
the move to an array of bits.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
---
 net/mac80211/wme.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/net/mac80211/wme.c b/net/mac80211/wme.c
index f12e044..4ecfb5e 100644
--- a/net/mac80211/wme.c
+++ b/net/mac80211/wme.c
@@ -158,7 +158,7 @@ static int wme_qdiscop_enqueue(struct sk_buff *skb, struct Qdisc* qd)
 		if (sta) {
 			int ampdu_queue = sta->tid_to_tx_q[tid];
 			if ((ampdu_queue < local->hw.queues) &&
-			    test_bit(ampdu_queue, &q->qdisc_pool)) {
+			    test_bit(ampdu_queue, q->qdisc_pool)) {
 				queue = ampdu_queue;
 				pkt_data->flags |= IEEE80211_TXPD_AMPDU;
 			} else {
@@ -191,7 +191,7 @@ static int wme_qdiscop_enqueue(struct sk_buff *skb, struct Qdisc* qd)
 		if (sta) {
 			int ampdu_queue = sta->tid_to_tx_q[tid];
 			if ((ampdu_queue < local->hw.queues) &&
-				test_bit(ampdu_queue, &q->qdisc_pool)) {
+				test_bit(ampdu_queue, q->qdisc_pool)) {
 				queue = ampdu_queue;
 				pkt_data->flags |= IEEE80211_TXPD_AMPDU;
 			} else {
@@ -272,7 +272,7 @@ static struct sk_buff *wme_qdiscop_dequeue(struct Qdisc* qd)
 				&local->state[queue])) ||
 		    (test_bit(IEEE80211_LINK_STATE_PENDING,
 				&local->state[queue])) ||
-			 (!test_bit(queue, &q->qdisc_pool)))
+			 (!test_bit(queue, q->qdisc_pool)))
 			continue;
 
 		/* there is space - try and get a frame */
@@ -396,7 +396,7 @@ static int wme_qdiscop_init(struct Qdisc *qd, struct rtattr *opt)
 
 	/* reserve all legacy QoS queues */
 	for (i = 0; i < min(IEEE80211_TX_QUEUE_DATA4, queues); i++)
-		set_bit(i, &q->qdisc_pool);
+		set_bit(i, q->qdisc_pool);
 
 	return err;
 }
@@ -657,7 +657,7 @@ int ieee80211_ht_agg_queue_add(struct ieee80211_local *local,
 
 	/* try to get a Qdisc from the pool */
 	for (i = IEEE80211_TX_QUEUE_BEACON; i < local->hw.queues; i++)
-		if (!test_and_set_bit(i, &q->qdisc_pool)) {
+		if (!test_and_set_bit(i, q->qdisc_pool)) {
 			ieee80211_stop_queue(local_to_hw(local), i);
 			sta->tid_to_tx_q[tid] = i;
 
@@ -668,9 +668,9 @@ int ieee80211_ht_agg_queue_add(struct ieee80211_local *local,
 #ifdef CONFIG_MAC80211_HT_DEBUG
 			if (net_ratelimit())
 				printk(KERN_DEBUG "allocated aggregation queue"
-					" %d tid %d addr %s pool=0x%lX\n",
+					" %d tid %d addr %s pool=0x%lX",
 					i, tid, print_mac(mac, sta->addr),
-					q->qdisc_pool);
+					q->qdisc_pool[0]);
 #endif /* CONFIG_MAC80211_HT_DEBUG */
 			return 0;
 		}
@@ -690,7 +690,7 @@ void ieee80211_ht_agg_queue_remove(struct ieee80211_local *local,
 	int agg_queue = sta->tid_to_tx_q[tid];
 
 	/* return the qdisc to the pool */
-	clear_bit(agg_queue, &q->qdisc_pool);
+	clear_bit(agg_queue, q->qdisc_pool);
 	sta->tid_to_tx_q[tid] = local->hw.queues;
 
 	if (requeue)
-- 
1.5.2.2


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

* Re: [PATCH 1/1] mac80211: fix mis-match in {test,set}_bit qdisc_pool
  2008-02-03 21:54 [PATCH 1/1] mac80211: fix mis-match in {test,set}_bit qdisc_pool Tomas Winkler
@ 2008-02-05 20:54 ` John W. Linville
  2008-02-05 23:36   ` Tomas Winkler
  0 siblings, 1 reply; 5+ messages in thread
From: John W. Linville @ 2008-02-05 20:54 UTC (permalink / raw)
  To: Tomas Winkler; +Cc: johannes, linux-wireless, Ron Rindjunsky

On Sun, Feb 03, 2008 at 11:54:38PM +0200, Tomas Winkler wrote:
> From: Ron Rindjunsky <ron.rindjunsky@intel.com>
>=20
> This patch fixes a mis-match in {test,set}_bit for qdisc_pool created=
 by
> the move to an array of bits.
>=20
> Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>

  CC [M]  net/mac80211/wme.o
net/mac80211/wme.c: In function =E2=80=98wme_qdiscop_enqueue=E2=80=99:
net/mac80211/wme.c:161: warning: passing argument 2 of =E2=80=98constan=
t_test_bit=E2=80=99 makes pointer from integer without a cast
net/mac80211/wme.c:161: warning: passing argument 2 of =E2=80=98variabl=
e_test_bit=E2=80=99 makes pointer from integer without a cast
net/mac80211/wme.c:194: warning: passing argument 2 of =E2=80=98constan=
t_test_bit=E2=80=99 makes pointer from integer without a cast
net/mac80211/wme.c:194: warning: passing argument 2 of =E2=80=98variabl=
e_test_bit=E2=80=99 makes pointer from integer without a cast
net/mac80211/wme.c: In function =E2=80=98wme_qdiscop_dequeue=E2=80=99:
net/mac80211/wme.c:275: warning: passing argument 2 of =E2=80=98constan=
t_test_bit=E2=80=99 makes pointer from integer without a cast
net/mac80211/wme.c:275: warning: passing argument 2 of =E2=80=98variabl=
e_test_bit=E2=80=99 makes pointer from integer without a cast
net/mac80211/wme.c: In function =E2=80=98wme_qdiscop_init=E2=80=99:
net/mac80211/wme.c:399: warning: passing argument 2 of =E2=80=98set_bit=
=E2=80=99 makes pointer from integer without a cast
net/mac80211/wme.c: In function =E2=80=98ieee80211_ht_agg_queue_add=E2=80=
=99:
net/mac80211/wme.c:660: warning: passing argument 2 of =E2=80=98test_an=
d_set_bit=E2=80=99 makes pointer from integer without a cast
net/mac80211/wme.c:673: error: subscripted value is neither array nor p=
ointer
net/mac80211/wme.c: In function =E2=80=98ieee80211_ht_agg_queue_remove=E2=
=80=99:
net/mac80211/wme.c:693: warning: passing argument 2 of =E2=80=98clear_b=
it=E2=80=99 makes pointer from integer without a cast
make[1]: *** [net/mac80211/wme.o] Error 1
make: *** [net/mac80211/] Error 2

Am I missing something?

John
--=20
John W. Linville
linville@tuxdriver.com
-
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 1/1] mac80211: fix mis-match in {test,set}_bit qdisc_pool
  2008-02-05 20:54 ` John W. Linville
@ 2008-02-05 23:36   ` Tomas Winkler
  2008-02-06  0:33     ` John W. Linville
  0 siblings, 1 reply; 5+ messages in thread
From: Tomas Winkler @ 2008-02-05 23:36 UTC (permalink / raw)
  To: John W. Linville; +Cc: johannes, linux-wireless, Ron Rindjunsky

On Feb 5, 2008 10:54 PM, John W. Linville <linville@tuxdriver.com> wrote:
> On Sun, Feb 03, 2008 at 11:54:38PM +0200, Tomas Winkler wrote:
> > From: Ron Rindjunsky <ron.rindjunsky@intel.com>
> >
> > This patch fixes a mis-match in {test,set}_bit for qdisc_pool created by
> > the move to an array of bits.
> >
> > Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
> > Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
>
>   CC [M]  net/mac80211/wme.o
> net/mac80211/wme.c: In function 'wme_qdiscop_enqueue':
> net/mac80211/wme.c:161: warning: passing argument 2 of 'constant_test_bit' makes pointer from integer without a cast
> net/mac80211/wme.c:161: warning: passing argument 2 of 'variable_test_bit' makes pointer from integer without a cast
> net/mac80211/wme.c:194: warning: passing argument 2 of 'constant_test_bit' makes pointer from integer without a cast
> net/mac80211/wme.c:194: warning: passing argument 2 of 'variable_test_bit' makes pointer from integer without a cast
> net/mac80211/wme.c: In function 'wme_qdiscop_dequeue':
> net/mac80211/wme.c:275: warning: passing argument 2 of 'constant_test_bit' makes pointer from integer without a cast
> net/mac80211/wme.c:275: warning: passing argument 2 of 'variable_test_bit' makes pointer from integer without a cast
> net/mac80211/wme.c: In function 'wme_qdiscop_init':
> net/mac80211/wme.c:399: warning: passing argument 2 of 'set_bit' makes pointer from integer without a cast
> net/mac80211/wme.c: In function 'ieee80211_ht_agg_queue_add':
> net/mac80211/wme.c:660: warning: passing argument 2 of 'test_and_set_bit' makes pointer from integer without a cast
> net/mac80211/wme.c:673: error: subscripted value is neither array nor pointer
> net/mac80211/wme.c: In function 'ieee80211_ht_agg_queue_remove':
> net/mac80211/wme.c:693: warning: passing argument 2 of 'clear_bit' makes pointer from integer without a cast
> make[1]: *** [net/mac80211/wme.o] Error 1
> make: *** [net/mac80211/] Error 2
>
> Am I missing something?

This patch should fix warning that was caused Ron's patch

'adjustable number of bits for qdisc pool'

Thanks
Tomas

> John
> --
> John W. Linville
> linville@tuxdriver.com
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

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

* Re: [PATCH 1/1] mac80211: fix mis-match in {test,set}_bit qdisc_pool
  2008-02-05 23:36   ` Tomas Winkler
@ 2008-02-06  0:33     ` John W. Linville
  2008-02-06  8:53       ` Ron Rindjunsky
  0 siblings, 1 reply; 5+ messages in thread
From: John W. Linville @ 2008-02-06  0:33 UTC (permalink / raw)
  To: Tomas Winkler; +Cc: johannes, linux-wireless, Ron Rindjunsky

On Wed, Feb 06, 2008 at 01:36:53AM +0200, Tomas Winkler wrote:
> On Feb 5, 2008 10:54 PM, John W. Linville <linville@tuxdriver.com> wrote:
> > On Sun, Feb 03, 2008 at 11:54:38PM +0200, Tomas Winkler wrote:
> > > From: Ron Rindjunsky <ron.rindjunsky@intel.com>
> > >
> > > This patch fixes a mis-match in {test,set}_bit for qdisc_pool created by
> > > the move to an array of bits.
> > >
> > > Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
> > > Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
> >
> >   CC [M]  net/mac80211/wme.o
> > net/mac80211/wme.c: In function 'wme_qdiscop_enqueue':
> > net/mac80211/wme.c:161: warning: passing argument 2 of 'constant_test_bit' makes pointer from integer without a cast
> > net/mac80211/wme.c:161: warning: passing argument 2 of 'variable_test_bit' makes pointer from integer without a cast
> > net/mac80211/wme.c:194: warning: passing argument 2 of 'constant_test_bit' makes pointer from integer without a cast
> > net/mac80211/wme.c:194: warning: passing argument 2 of 'variable_test_bit' makes pointer from integer without a cast
> > net/mac80211/wme.c: In function 'wme_qdiscop_dequeue':
> > net/mac80211/wme.c:275: warning: passing argument 2 of 'constant_test_bit' makes pointer from integer without a cast
> > net/mac80211/wme.c:275: warning: passing argument 2 of 'variable_test_bit' makes pointer from integer without a cast
> > net/mac80211/wme.c: In function 'wme_qdiscop_init':
> > net/mac80211/wme.c:399: warning: passing argument 2 of 'set_bit' makes pointer from integer without a cast
> > net/mac80211/wme.c: In function 'ieee80211_ht_agg_queue_add':
> > net/mac80211/wme.c:660: warning: passing argument 2 of 'test_and_set_bit' makes pointer from integer without a cast
> > net/mac80211/wme.c:673: error: subscripted value is neither array nor pointer
> > net/mac80211/wme.c: In function 'ieee80211_ht_agg_queue_remove':
> > net/mac80211/wme.c:693: warning: passing argument 2 of 'clear_bit' makes pointer from integer without a cast
> > make[1]: *** [net/mac80211/wme.o] Error 1
> > make: *** [net/mac80211/] Error 2
> >
> > Am I missing something?
> 
> This patch should fix warning that was caused Ron's patch
> 
> 'adjustable number of bits for qdisc pool'

I don't see a warning w/o it -- only build breakage w/ it.

-- 
John W. Linville
linville@tuxdriver.com

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

* Re: [PATCH 1/1] mac80211: fix mis-match in {test,set}_bit qdisc_pool
  2008-02-06  0:33     ` John W. Linville
@ 2008-02-06  8:53       ` Ron Rindjunsky
  0 siblings, 0 replies; 5+ messages in thread
From: Ron Rindjunsky @ 2008-02-06  8:53 UTC (permalink / raw)
  To: John W. Linville; +Cc: Tomas Winkler, johannes, linux-wireless

> > > > This patch fixes a mis-match in {test,set}_bit for qdisc_pool created by
> > > > the move to an array of bits.

> > >   CC [M]  net/mac80211/wme.o
> > > net/mac80211/wme.c: In function 'wme_qdiscop_enqueue':
> > > net/mac80211/wme.c:161: warning: passing argument 2 of 'constant_test_bit' makes pointer from integer without a cast
> > > net/mac80211/wme.c:161: warning: passing argument 2 of 'variable_test_bit' makes pointer from integer without a cast
> > > net/mac80211/wme.c:194: warning: passing argument 2 of 'constant_test_bit' makes pointer from integer without a cast
> > > net/mac80211/wme.c:194: warning: passing argument 2 of 'variable_test_bit' makes pointer from integer without a cast
> > > net/mac80211/wme.c: In function 'wme_qdiscop_dequeue':
> > > net/mac80211/wme.c:275: warning: passing argument 2 of 'constant_test_bit' makes pointer from integer without a cast
> > > net/mac80211/wme.c:275: warning: passing argument 2 of 'variable_test_bit' makes pointer from integer without a cast
> > > net/mac80211/wme.c: In function 'wme_qdiscop_init':
> > > net/mac80211/wme.c:399: warning: passing argument 2 of 'set_bit' makes pointer from integer without a cast
> > > net/mac80211/wme.c: In function 'ieee80211_ht_agg_queue_add':
> > > net/mac80211/wme.c:660: warning: passing argument 2 of 'test_and_set_bit' makes pointer from integer without a cast
> > > net/mac80211/wme.c:673: error: subscripted value is neither array nor pointer
> > > net/mac80211/wme.c: In function 'ieee80211_ht_agg_queue_remove':
> > > net/mac80211/wme.c:693: warning: passing argument 2 of 'clear_bit' makes pointer from integer without a cast
> > > make[1]: *** [net/mac80211/wme.o] Error 1
> > > make: *** [net/mac80211/] Error 2
> > >
>
> I don't see a warning w/o it -- only build breakage w/ it.
>

John, the same errors i get when trying to apply this patch without
applying first
"adjustable number of bits for qdisc pool" patch. in fact i think it
is better that both would be united to one patch, as this patch is a
fix to warnings caused by "adjustable number of bits for qdisc pool",
but i leave it to your decision
thanks
ron

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

end of thread, other threads:[~2008-02-06  8:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-03 21:54 [PATCH 1/1] mac80211: fix mis-match in {test,set}_bit qdisc_pool Tomas Winkler
2008-02-05 20:54 ` John W. Linville
2008-02-05 23:36   ` Tomas Winkler
2008-02-06  0:33     ` John W. Linville
2008-02-06  8:53       ` Ron Rindjunsky

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).