lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <e61b9ed119c05d0fcb8d7a9acaa33f0d5f1be066.1483454071.git.Ramiro.Oliveira@synopsys.com>
Date:   Tue,  3 Jan 2017 14:43:40 +0000
From:   Ramiro Oliveira <Ramiro.Oliveira@...opsys.com>
To:     gregkh@...uxfoundation.org, christian.gromm@...rochip.com,
        andrey.shvetsov@....de, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org
Cc:     Ramiro Oliveira <Ramiro.Oliveira@...opsys.com>
Subject: [PATCH] staging: most: change dma_buf variable to __le16

dma_buf is being cast to __le16 *, but it was defined as u16 *.
sparse reported this error as:
drivers/staging/most/hdm-usb/hdm_usb.c:158:16: warning: cast to restricted
__le16

This patch changes dma_buf from u16 to __le16.

Signed-off-by: Ramiro Oliveira <Ramiro.Oliveira@...opsys.com>
---
 drivers/staging/most/hdm-usb/hdm_usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/most/hdm-usb/hdm_usb.c b/drivers/staging/most/hdm-usb/hdm_usb.c
index d6db0bd65be0..8a6da169bb12 100644
--- a/drivers/staging/most/hdm-usb/hdm_usb.c
+++ b/drivers/staging/most/hdm-usb/hdm_usb.c
@@ -145,7 +145,7 @@ static void wq_netinfo(struct work_struct *wq_obj);
 static inline int drci_rd_reg(struct usb_device *dev, u16 reg, u16 *buf)
 {
 	int retval;
-	u16 *dma_buf = kzalloc(sizeof(u16), GFP_KERNEL);
+	__le16 *dma_buf = kzalloc(sizeof(__le16), GFP_KERNEL);
 	u8 req_type = USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE;
 
 	if (!dma_buf)
-- 
2.11.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ