All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8192u: Fix sparse warning
@ 2017-04-23 20:51 Marcos Paulo de Souza
  2017-04-28 10:29 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: Marcos Paulo de Souza @ 2017-04-23 20:51 UTC (permalink / raw)
  Cc: Marcos Paulo de Souza, Greg Kroah-Hartman, Bhumika Goyal,
	Arnd Bergmann, simran singhal, Tobias Klauser, Elise Lennion,
	devel, linux-kernel

Fix the following sparse warning:
rtl8192u/ieee80211/ieee80211_rx.c:1489:45: warning: incorrect type in assignment (different base types)
rtl8192u/ieee80211/ieee80211_rx.c:1489:45:    expected restricted __le16 <noident>
rtl8192u/ieee80211/ieee80211_rx.c:1489:45:    got unsigned short [unsigned] [usertype] <noident>

Since ac_params->tx_op_limit is already an __le16, we shouldn't convert it into cpu type.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
---

 Sorry, I don't have the hardware to test, so please review and tell me if I'm wrong in this one!

 drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
index 5241c50..3a6a533 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
@@ -1486,7 +1486,7 @@ static int ieee80211_qos_convert_ac_to_parameters(struct
 
 		qos_param->flag[aci] =
 		    (ac_params->aci_aifsn & 0x10) ? 0x01 : 0x00;
-		qos_param->tx_op_limit[aci] = le16_to_cpu(ac_params->tx_op_limit);
+		qos_param->tx_op_limit[aci] = ac_params->tx_op_limit;
 	}
 	return 0;
 }
-- 
2.9.3

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

* Re: [PATCH] staging: rtl8192u: Fix sparse warning
  2017-04-23 20:51 [PATCH] staging: rtl8192u: Fix sparse warning Marcos Paulo de Souza
@ 2017-04-28 10:29 ` Greg Kroah-Hartman
  2017-04-28 10:52   ` Marcos Paulo de Souza
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Kroah-Hartman @ 2017-04-28 10:29 UTC (permalink / raw)
  To: Marcos Paulo de Souza
  Cc: devel, Elise Lennion, Arnd Bergmann, linux-kernel, Tobias Klauser,
	simran singhal, Bhumika Goyal

On Sun, Apr 23, 2017 at 05:51:17PM -0300, Marcos Paulo de Souza wrote:
> Fix the following sparse warning:
> rtl8192u/ieee80211/ieee80211_rx.c:1489:45: warning: incorrect type in assignment (different base types)
> rtl8192u/ieee80211/ieee80211_rx.c:1489:45:    expected restricted __le16 <noident>
> rtl8192u/ieee80211/ieee80211_rx.c:1489:45:    got unsigned short [unsigned] [usertype] <noident>
> 
> Since ac_params->tx_op_limit is already an __le16, we shouldn't convert it into cpu type.
> 
> Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
> ---
> 
>  Sorry, I don't have the hardware to test, so please review and tell me if I'm wrong in this one!

Patch doesn't apply to my tree at all :(

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

* Re: [PATCH] staging: rtl8192u: Fix sparse warning
  2017-04-28 10:29 ` Greg Kroah-Hartman
@ 2017-04-28 10:52   ` Marcos Paulo de Souza
  0 siblings, 0 replies; 3+ messages in thread
From: Marcos Paulo de Souza @ 2017-04-28 10:52 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: devel, Elise Lennion, Arnd Bergmann, linux-kernel, Tobias Klauser,
	simran singhal, Bhumika Goyal

On Fri, Apr 28, 2017 at 12:29:55PM +0200, Greg Kroah-Hartman wrote:
> On Sun, Apr 23, 2017 at 05:51:17PM -0300, Marcos Paulo de Souza wrote:
> > Fix the following sparse warning:
> > rtl8192u/ieee80211/ieee80211_rx.c:1489:45: warning: incorrect type in assignment (different base types)
> > rtl8192u/ieee80211/ieee80211_rx.c:1489:45:    expected restricted __le16 <noident>
> > rtl8192u/ieee80211/ieee80211_rx.c:1489:45:    got unsigned short [unsigned] [usertype] <noident>
> > 
> > Since ac_params->tx_op_limit is already an __le16, we shouldn't convert it into cpu type.
> > 
> > Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
> > ---
> > 
> >  Sorry, I don't have the hardware to test, so please review and tell me if I'm wrong in this one!
> 
> Patch doesn't apply to my tree at all :(

My patch was based on master... my apologies. Will resend based on
staging-next.

-- 
Thanks,
	Marcos

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

end of thread, other threads:[~2017-04-28 10:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-23 20:51 [PATCH] staging: rtl8192u: Fix sparse warning Marcos Paulo de Souza
2017-04-28 10:29 ` Greg Kroah-Hartman
2017-04-28 10:52   ` Marcos Paulo de Souza

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.