lkml.org 
[lkml]   [2014]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 3/4] asmlinkage, x86: Add explicit __visible to arch/x86/crypto/*
From
On Tue, Apr 1, 2014 at 11:53 AM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> You're adding them to assembly routines called from C, which is
> exactly the wrong way around, and pointless. And it's worse than
> pointless churn, it just confuses people, and shows that you are
> confused about the meaning of it.

Basically, all these grep's should return the empty set:

git grep static.*__visible
git grep extern.*__visible
git grep "__visible.*(.*);"

because they are all signs of confusion. A 'static' variable
(declaration _or_ definition) should never be externally visible (as a
definition it might be called from inline asm, I guess, but then it
should be done as an argument so that the compiler sees the use). An
extern declaration can never sanely be marked "__visible", because the
only use of such a declaration is for C code (which by definition
doesn't need it). And the last case is for a function declaration,
which have an implicit extern.

And yeah, we do have a few confused users already (28, to be exact).
They should be fixed. But more importantly, we certainly shouldn't be
adding more of them.

Linus


\
 
 \ /
  Last update: 2014-04-01 22:01    [W:0.065 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site