Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758690AbcLTSAk (ORCPT ); Tue, 20 Dec 2016 13:00:40 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:36634 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757108AbcLTSA3 (ORCPT ); Tue, 20 Dec 2016 13:00:29 -0500 From: Jannik Becher To: gregkh@linuxfoundation.org Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Jannik Becher Subject: [PATCH 07/13] staging: rtl8712: changed u32 to __le32 Date: Tue, 20 Dec 2016 18:59:44 +0100 Message-Id: <1482256790-14376-8-git-send-email-becher.jannik@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1482256790-14376-1-git-send-email-becher.jannik@gmail.com> References: <1482256790-14376-1-git-send-email-becher.jannik@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2492 Lines: 89 Fixed sparse warning. Just changed u32 to __le32. Signed-off-by: Jannik Becher Tested-by: Larry Finger --- drivers/staging/rtl8712/usb_ops.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/staging/rtl8712/usb_ops.c b/drivers/staging/rtl8712/usb_ops.c index 9172400..332e2e5 100644 --- a/drivers/staging/rtl8712/usb_ops.c +++ b/drivers/staging/rtl8712/usb_ops.c @@ -41,7 +41,7 @@ static u8 usb_read8(struct intf_hdl *pintfhdl, u32 addr) u16 wvalue; u16 index; u16 len; - u32 data; + __le32 data; struct intf_priv *pintfpriv = pintfhdl->pintfpriv; request = 0x05; @@ -61,7 +61,7 @@ static u16 usb_read16(struct intf_hdl *pintfhdl, u32 addr) u16 wvalue; u16 index; u16 len; - u32 data; + __le32 data; struct intf_priv *pintfpriv = pintfhdl->pintfpriv; request = 0x05; @@ -81,7 +81,7 @@ static u32 usb_read32(struct intf_hdl *pintfhdl, u32 addr) u16 wvalue; u16 index; u16 len; - u32 data; + __le32 data; struct intf_priv *pintfpriv = pintfhdl->pintfpriv; request = 0x05; @@ -101,7 +101,7 @@ static void usb_write8(struct intf_hdl *pintfhdl, u32 addr, u8 val) u16 wvalue; u16 index; u16 len; - u32 data; + __le32 data; struct intf_priv *pintfpriv = pintfhdl->pintfpriv; request = 0x05; @@ -109,8 +109,7 @@ static void usb_write8(struct intf_hdl *pintfhdl, u32 addr, u8 val) index = 0; wvalue = (u16)(addr & 0x0000ffff); len = 1; - data = val; - data = cpu_to_le32(data & 0x000000ff); + data = cpu_to_le32((u32)val & 0x000000ff); r8712_usbctrl_vendorreq(pintfpriv, request, wvalue, index, &data, len, requesttype); } @@ -122,7 +121,7 @@ static void usb_write16(struct intf_hdl *pintfhdl, u32 addr, u16 val) u16 wvalue; u16 index; u16 len; - u32 data; + __le32 data; struct intf_priv *pintfpriv = pintfhdl->pintfpriv; request = 0x05; @@ -130,8 +129,7 @@ static void usb_write16(struct intf_hdl *pintfhdl, u32 addr, u16 val) index = 0; wvalue = (u16)(addr & 0x0000ffff); len = 2; - data = val; - data = cpu_to_le32(data & 0x0000ffff); + data = cpu_to_le32((u32)val & 0x0000ffff); r8712_usbctrl_vendorreq(pintfpriv, request, wvalue, index, &data, len, requesttype); } @@ -143,7 +141,7 @@ static void usb_write32(struct intf_hdl *pintfhdl, u32 addr, u32 val) u16 wvalue; u16 index; u16 len; - u32 data; + __le32 data; struct intf_priv *pintfpriv = pintfhdl->pintfpriv; request = 0x05; -- 2.7.4