# Re: \[PATCH v2\] powerpc/bug: Cast to unsigned long before passing to inline asm

- From: Michael Ellerman \<hidden\>
- Date: 2021-09-04 01:03:20 
- List: linuxppc-dev
- Page: https://ratatoskr.run/linuxppc-dev/2021/09/9524359
- Thread: https://ratatoskr.run/linuxppc-dev/2021/09/9524319/t.md

```text
On Wed, 1 Sep 2021 21:25:22 +1000, Michael Ellerman wrote:
> In commit 1e688dd2a3d6 ("powerpc/bug: Provide better flexibility to
> WARN_ON/__WARN_FLAGS() with asm goto") we changed WARN_ON(). Previously
> it would take the warning condition, x, and double negate it before
> converting the result to int, and passing that int to the underlying
> inline asm. ie:
> 
>   #define WARN_ON(x) ({
>   	int __ret_warn_on = !!(x);
>   	if (__builtin_constant_p(__ret_warn_on)) {
>   	...
>   	} else {
>   		BUG_ENTRY(PPC_TLNEI " %4, 0",
>   			  BUGFLAG_WARNING | BUGFLAG_TAINT(TAINT_WARN),
>   			  "r" (__ret_warn_on));
> 
> [...]

Applied to powerpc/next.

[1/1] powerpc/bug: Cast to unsigned long before passing to inline asm
      https://git.kernel.org/powerpc/c/e432fe97f3e5de325b40021e505cce53877586c5

cheers
```
