Re: [PATCH 3/4] asmlinkage, x86: Add explicit __visible to arch/x86/crypto/*

From: Linus Torvalds
Date: Tue Apr 01 2014 - 15:09:39 EST


On Tue, Apr 1, 2014 at 11:53 AM, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/