]> git.baikalelectronics.ru Git - kernel.git/commit
sparc64: remove cast from output constraints in math asm statements
authorSam Ravnborg <sam@ravnborg.org>
Fri, 16 May 2014 21:25:47 +0000 (23:25 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 19 May 2014 02:01:28 +0000 (19:01 -0700)
commit7f2676857cf1f2b46be211275b29b2c794a1bbf9
treef865b4884accc9163247c8db4169b1c9e6791a91
parentd9c3513a70d8713c74ed812a09825d91585ffd13
sparc64: remove cast from output constraints in math asm statements

The following asm statements generated a sparse warning:

        asm("addcc \n\t" : "=r" (((USItype)(r2)))

warning: asm output is not an lvalue

When asking on the sparse mailing list Linus replyed:

"
Those casts to (USItype) are all pointless to begin with (since the
values are of that type already!) and they mean that the expression
isn't something you can assign to (lvalue).
"

In the math emulation code drop all casts in the output
parts of the asm statements.

This fixes a lot of "warning: asm output is not an lvalue" sparse
warnings in math_64.c.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/math-emu/sfp-util_64.h