public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: simran singhal <singhalsimran0@gmail.com>
To: gregkh@linuxfoundation.org
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	sergio.paracuellos@gmail.com, juliana.orod@gmail.com,
	thomas.petazzoni@free-electrons.com, noralf@tronnes.org,
	outreachy-kernel@googlegroups.com
Subject: [PATCH 5/6] staging: rtl8192u: Fix Sparse warning of cast from restricted __le16
Date: Thu,  2 Mar 2017 15:19:05 +0530	[thread overview]
Message-ID: <1488448146-29452-5-git-send-email-singhalsimran0@gmail.com> (raw)
In-Reply-To: <1488448146-29452-1-git-send-email-singhalsimran0@gmail.com>

This patch fixes the following Sparse warning-

drivers/staging/rtl8192u/r8192U_dm.c:2307:49: warning: cast from restricted __le16
drivers/staging/rtl8192u/r8192U_dm.c:2308:44: warning: cast from restricted __le16
drivers/staging/rtl8192u/r8192U_dm.c:2309:44: warning: cast from restricted __le16

And added space before '|'

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
---
 drivers/staging/rtl8192u/r8192U_dm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U_dm.c b/drivers/staging/rtl8192u/r8192U_dm.c
index 9209aad..e1c83a3 100644
--- a/drivers/staging/rtl8192u/r8192U_dm.c
+++ b/drivers/staging/rtl8192u/r8192U_dm.c
@@ -2304,9 +2304,9 @@ static void dm_check_edca_turbo(
 				/*  For Each time updating EDCA parameter, reset EDCA turbo mode status. */
 				dm_init_edca_turbo(dev);
 				u1bAIFS = qos_parameters->aifs[0] * ((mode&(IEEE_G|IEEE_N_24G)) ? 9 : 20) + aSifsTime;
-				u4bAcParam = (((u32)(qos_parameters->tx_op_limit[0])) << AC_PARAM_TXOP_LIMIT_OFFSET)|
-					(((u32)(qos_parameters->cw_max[0])) << AC_PARAM_ECW_MAX_OFFSET)|
-					(((u32)(qos_parameters->cw_min[0])) << AC_PARAM_ECW_MIN_OFFSET)|
+				u4bAcParam = ((le16_to_cpu(qos_parameters->tx_op_limit[0])) << AC_PARAM_TXOP_LIMIT_OFFSET) |
+					((le16_to_cpu(qos_parameters->cw_max[0])) << AC_PARAM_ECW_MAX_OFFSET) |
+					((le16_to_cpu(qos_parameters->cw_min[0])) << AC_PARAM_ECW_MIN_OFFSET) |
 					((u32)u1bAIFS << AC_PARAM_AIFS_OFFSET);
 				/*write_nic_dword(dev, WDCAPARA_ADD[i], u4bAcParam);*/
 				write_nic_dword(dev, EDCAPARA_BE,  u4bAcParam);
-- 
2.7.4

  parent reply	other threads:[~2017-03-02 20:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-02  9:49 [PATCH 1/6] staging: wlan-ng: Fix sparse warning of restricted __le16 simran singhal
2017-03-02  9:48 ` [Outreachy kernel] " Julia Lawall
2017-03-02  9:50   ` Julia Lawall
2017-03-02 11:11     ` SIMRAN SINGHAL
2017-03-02 11:14       ` Julia Lawall
2017-03-02 17:34         ` Alison Schofield
2017-03-02  9:49 ` [PATCH 2/6] staging: wlan-ng: Fix sparse warnings simran singhal
2017-03-02  9:49 ` [PATCH 3/6] staging: wlan-ng: Fix sparse warnings in hfa384x_usb.c simran singhal
2017-03-02  9:49 ` [PATCH 4/6] staging: fbtft: Fix sparse warnings of incorrect type in assignment simran singhal
2017-03-02  9:49 ` simran singhal [this message]
2017-03-02  9:49 ` [PATCH 6/6] staging: rtl8192u: Fix Sparse warning of cast to restricted __le16 simran singhal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1488448146-29452-5-git-send-email-singhalsimran0@gmail.com \
    --to=singhalsimran0@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=juliana.orod@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=noralf@tronnes.org \
    --cc=outreachy-kernel@googlegroups.com \
    --cc=sergio.paracuellos@gmail.com \
    --cc=thomas.petazzoni@free-electrons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox