[linux-yocto] [PATCH] mousedev: fix warning err caused by __cpu_to_le16p()

Zhenbo Gao zhenbo.gao at windriver.com
Tue Jul 26 01:28:12 PDT 2016


following warning msg is found when compiling the kernel for qemumips:
.../drivers/input/mousedev.c:749:15: warning: passing argument 1 of
'__cpu_to_le16p' from incompatible pointer type [-Wincompatible-pointer-types]

convert the function's parameter to (__u16 *) to fix this warning.

Signed-off-by: Zhenbo Gao <zhenbo.gao at windriver.com>
---
 drivers/input/mousedev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c
index 0cc262b..2ad79ca 100644
--- a/drivers/input/mousedev.c
+++ b/drivers/input/mousedev.c
@@ -746,7 +746,7 @@ static ssize_t mousedev_read(struct file *file, char __user *buffer,
 #ifdef CONFIG_CPU_BIG_ENDIAN
 	/* Force mouse data LE in userspace as consumers
 	   of the data expect it in this format */
-	cpu_to_le16p(data);
+	cpu_to_le16p((__u16 *)data);
 #endif
 	spin_unlock_irq(&client->packet_lock);
 
-- 
1.9.1



More information about the linux-yocto mailing list