mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jannik Becher <becher.jannik@gmail.com>
To: gregkh@linuxfoundation.org
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	Jannik Becher <becher.jannik@gmail.com>
Subject: [PATCH 06/13] staging: rtl8712: changed typecast to __le
Date: Tue, 20 Dec 2016 18:59:43 +0100	[thread overview]
Message-ID: <1482256790-14376-7-git-send-email-becher.jannik@gmail.com> (raw)
In-Reply-To: <1482256790-14376-1-git-send-email-becher.jannik@gmail.com>

Fixed sparse warning.
Changed uint to __le16 and __le32.

Signed-off-by: Jannik Becher <becher.jannik@gmail.com>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
---
 drivers/staging/rtl8712/hal_init.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8712/hal_init.c b/drivers/staging/rtl8712/hal_init.c
index 0dd458d..c83d7eb 100644
--- a/drivers/staging/rtl8712/hal_init.c
+++ b/drivers/staging/rtl8712/hal_init.c
@@ -117,16 +117,16 @@ static void fill_fwpriv(struct _adapter *padapter, struct fw_priv *pfwpriv)
 
 static void update_fwhdr(struct fw_hdr	*pfwhdr, const u8 *pmappedfw)
 {
-	pfwhdr->signature = le16_to_cpu(*(u16 *)pmappedfw);
-	pfwhdr->version = le16_to_cpu(*(u16 *)(pmappedfw + 2));
+	pfwhdr->signature = le16_to_cpu(*(__le16 *)pmappedfw);
+	pfwhdr->version = le16_to_cpu(*(__le16 *)(pmappedfw + 2));
 	/* define the size of boot loader */
-	pfwhdr->dmem_size = le32_to_cpu(*(uint *)(pmappedfw + 4));
+	pfwhdr->dmem_size = le32_to_cpu(*(__le32 *)(pmappedfw + 4));
 	/* define the size of FW in IMEM */
-	pfwhdr->img_IMEM_size = le32_to_cpu(*(uint *)(pmappedfw + 8));
+	pfwhdr->img_IMEM_size = le32_to_cpu(*(__le32 *)(pmappedfw + 8));
 	/* define the size of FW in SRAM */
-	pfwhdr->img_SRAM_size = le32_to_cpu(*(uint *)(pmappedfw + 12));
+	pfwhdr->img_SRAM_size = le32_to_cpu(*(__le32 *)(pmappedfw + 12));
 	/* define the size of DMEM variable */
-	pfwhdr->fw_priv_sz = le32_to_cpu(*(uint *)(pmappedfw + 16));
+	pfwhdr->fw_priv_sz = le32_to_cpu(*(__le32 *)(pmappedfw + 16));
 }
 
 static u8 chk_fwhdr(struct fw_hdr *pfwhdr, u32 ulfilelength)
-- 
2.7.4

  parent reply	other threads:[~2016-12-20 18:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-20 17:59 [PATCH 00/13] staging: rtl8712: Fixed sparse warnings Jannik Becher
2016-12-20 17:59 ` [PATCH 01/13] staging: rtl8712: changed struct members to __le32 Jannik Becher
2016-12-20 17:59 ` [PATCH 02/13] staging: rtl8712: changed variables " Jannik Becher
2016-12-20 17:59 ` [PATCH 03/13] staging: rtl8712: changed function argument " Jannik Becher
2016-12-20 17:59 ` [PATCH 04/13] staging: rtl8712: casted variables " Jannik Becher
2016-12-20 17:59 ` [PATCH 05/13] staging: rtl8712: changed GetFrameSubType macro Jannik Becher
2016-12-20 17:59 ` Jannik Becher [this message]
2016-12-20 17:59 ` [PATCH 07/13] staging: rtl8712: changed u32 to __le32 Jannik Becher
2016-12-20 17:59 ` [PATCH 08/13] staging: rtl8712: changed uint " Jannik Becher
2016-12-20 17:59 ` [PATCH 09/13] staging: rtl8712: fixed little endian problem Jannik Becher
2016-12-20 17:59 ` [PATCH 10/13] staging: rtl8712: changed u32 to __le32 Jannik Becher
2016-12-20 17:59 ` [PATCH 11/13] staging: rtl8712: changed cast to __le16 Jannik Becher
2016-12-20 17:59 ` [PATCH 12/13] staging: rtl8712: changed u16 to __be16 Jannik Becher
2016-12-20 17:59 ` [PATCH 13/13] staging: rtl8712: used a better macro Jannik Becher

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=1482256790-14376-7-git-send-email-becher.jannik@gmail.com \
    --to=becher.jannik@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®