Skip to contentSkip to conversation

staging: lustre: libcfs: Fix warnings reported by 'make C=1'

PATCH New Aleksey Fedotov 3 participants 3 messages Apr 11, 2016

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 staging: lustre: libcfs: Fix warnings reported by 'make C=1'

Quoted 4 lines · Aleksey Fedotov
Quoted 1 line

From 08473aa48a1726c09dbab43e99059be9b0e88af2 Mon Sep 17 00:00:00 2001

From: Aleksei Fedotov <[email protected]>
Date: Mon, 11 Apr 2016 21:13:27 +0300
Subject: [PATCH] staging: lustre: libcfs: Fix warnings reported by sparse

Why is this here in the body of your patch?

Please use git send-email so it does not show up.

thanks,

greg k-h

#2 lore raw

PATCH 1/1 staging: lustre: libcfs: Fix warnings reported by 'make C=1'

In reply to Aleksey Fedotov
Quoted 4 lines · Aleksey Fedotov

From 08473aa48a1726c09dbab43e99059be9b0e88af2 Mon Sep 17 00:00:00 2001
From: Aleksei Fedotov <[email protected]>
Date: Mon, 11 Apr 2016 21:13:27 +0300
Subject: [PATCH] staging: lustre: libcfs: Fix warnings reported by sparse

A better title would be something like:
staging: lustre: libcfs: Fix libcfs_ioctl() prototype.

Thanks.

Quoted 30 lines

This patch fixes sparse warnings:

lustre/lnet/libcfs/linux/linux-module.c:177:35: warning: incorrect type in argument 2 (different address spaces)

lustre/lnet/libcfs/module.c:101:5: error: symbol 'libcfs_ioctl' redeclared with different type

---
drivers/staging/lustre/include/linux/libcfs/libcfs.h | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/include/linux/libcfs/libcfs.h +1 -1
index 9158c61..4141afb 100644
@@ -106,7 +106,7 @@ int libcfs_deregister_ioctl(struct libcfs_ioctl_handler *hand);
 int libcfs_ioctl_getdata(struct libcfs_ioctl_hdr **hdr_pp,
 			 const struct libcfs_ioctl_hdr __user *uparam);
 int libcfs_ioctl_data_adjust(struct libcfs_ioctl_data *data);
-int libcfs_ioctl(unsigned long cmd, void *arg);
+int libcfs_ioctl(unsigned long cmd, void __user *arg);
 
 /* container_of depends on "likely" which is defined in libcfs_private.h */
 static inline void *__container_of(void *ptr, unsigned long shift)
Signature · 1 line
2.5.5