2014-04-10 18:45:31

by Paul McQuade

[permalink] [raw]
Subject: [PATCH 03/15] ipc:sem.c #include <linux/uaccess.h>

WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>

Signed-off-by: Paul McQuade <[email protected]>
---
ipc/sem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ipc/sem.c b/ipc/sem.c
index bee5554..3bbfa6c 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -87,7 +87,7 @@
#include <linux/nsproxy.h>
#include <linux/ipc_namespace.h>

-#include <asm/uaccess.h>
+#include <linux/uaccess.h>
#include "util.h"

/* One semaphore structure for each semaphore in the system. */
--
1.8.3.2


2014-04-10 21:49:08

by Davidlohr Bueso

[permalink] [raw]
Subject: Re: [PATCH 03/15] ipc:sem.c #include <linux/uaccess.h>

On Thu, 2014-04-10 at 19:45 +0100, Paul McQuade wrote:
> WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>

Nit: the subject should be less code and more text, something like "do
not include asm uaccess directly" or "replace <asm/uaccess.h> by
<linux/uaccess.h>"

Curious, how are you seeing these warnings?

Also, while at it we should probably get rid of the rest in ipc/:

compat.c:#include <asm/uaccess.h>
compat_mq.c:#include <asm/uaccess.h>
msg.c:#include <asm/uaccess.h>
sem.c:#include <asm/uaccess.h>
shm.c:#include <asm/uaccess.h>

2014-04-10 21:51:53

by Davidlohr Bueso

[permalink] [raw]
Subject: Re: [PATCH 03/15] ipc:sem.c #include <linux/uaccess.h>

On Thu, 2014-04-10 at 14:49 -0700, Davidlohr Bueso wrote:
> On Thu, 2014-04-10 at 19:45 +0100, Paul McQuade wrote:
> > WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
>
> Nit: the subject should be less code and more text, something like "do
> not include asm uaccess directly" or "replace <asm/uaccess.h> by
> <linux/uaccess.h>"
>
> Curious, how are you seeing these warnings?
>
> Also, while at it we should probably get rid of the rest in ipc/:
>
> compat.c:#include <asm/uaccess.h>
> compat_mq.c:#include <asm/uaccess.h>
> msg.c:#include <asm/uaccess.h>
> sem.c:#include <asm/uaccess.h>
> shm.c:#include <asm/uaccess.h>

*sigh* you did but didn't maintain the CCs. It would make a lot more
sense to keep it in the same patch.