[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140223221217.4f09b9d1.akpm@linux-foundation.org>
Date: Sun, 23 Feb 2014 22:12:17 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Stephen Rothwell <sfr@...b.auug.org.au>
Cc: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...e.hu>,
"H. Peter Anvin" <hpa@...or.com>,
Peter Zijlstra <peterz@...radead.org>,
linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
Andi Kleen <ak@...ux.intel.com>,
Rashika Kheria <rashika.kheria@...il.com>
Subject: Re: linux-next: build warning after merge of the tip tree
On Mon, 24 Feb 2014 16:56:21 +1100 Stephen Rothwell <sfr@...b.auug.org.au> wrote:
> Hi all,
>
> On Mon, 24 Feb 2014 15:17:32 +1100 Stephen Rothwell <sfr@...b.auug.org.au> wrote:
> >
> > I guess that there may be more places where "asmlinkage" is used with
> > "static" - I assume that they are all incorrect?
> >
> > $ git grep -l 'static.*asmlinkage'
> > arch/x86/crypto/sha1_ssse3_glue.c
> > arch/x86/crypto/sha256_ssse3_glue.c
> > arch/x86/crypto/sha512_ssse3_glue.c
>
> In fact, my x86_64 allmodconfig build produces these:
>
> arch/x86/crypto/sha1_ssse3_glue.c:43:1: warning: 'externally_visible' attribute have effect only on public objects [-Wattributes]
> static asmlinkage void (*sha1_transform_asm)(u32 *, const char *, unsigned int);
> ^
> arch/x86/crypto/sha256_ssse3_glue.c:56:1: warning: 'externally_visible' attribute have effect only on public objects [-Wattributes]
> static asmlinkage void (*sha256_transform_asm)(const char *, u32 *, u64);
> ^
> arch/x86/crypto/sha512_ssse3_glue.c:55:1: warning: 'externally_visible' attribute have effect only on public objects [-Wattributes]
> static asmlinkage void (*sha512_transform_asm)(const char *, u64 *, u64);
> ^
> mm/process_vm_access.c:422:1: warning: 'externally_visible' attribute have effect only on public objects [-Wattributes]
> {
> ^
>
> That last is added by commit 700d00f85598 ("mm/process_vm_access.c: mark
> function as static") from the akpm-current tree.
>
> So is "static asmlinkage" not allowed?
Doh, I missed that. I don't know if it's "allowed" or not, but it's
clearly the wrong thing to do - the whole point of asmlinkage is to
export the thing to other compilation units.
So I suppose this:
mm/process_vm_access.c:416:1: warning: no previous prototype for `compat_process_vm_rw' [-Wmissing-prototypes]
should be squashed by giving it a prototype. Something like
--- a/include/linux/compat.h~a
+++ a/include/linux/compat.h
@@ -644,6 +644,13 @@ asmlinkage ssize_t compat_sys_mq_timedre
asmlinkage long compat_sys_socketcall(int call, u32 __user *args);
asmlinkage long compat_sys_sysctl(struct compat_sysctl_args __user *args);
+asmlinkage ssize_t compat_process_vm_rw(compat_pid_t pid,
+ const struct compat_iovec __user *lvec,
+ unsigned long liovcnt,
+ const struct compat_iovec __user *rvec,
+ unsigned long riovcnt,
+ unsigned long flags, int vm_write);
+
extern ssize_t compat_rw_copy_check_uvector(int type,
const struct compat_iovec __user *uvector,
unsigned long nr_segs,
_
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists