linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] asm-generic: Add missing brackets for io_stop_wc macro
@ 2022-01-14 10:58 Xiongfeng Wang
  2022-01-14 11:56 ` Catalin Marinas
  2022-01-20 15:56 ` Catalin Marinas
  0 siblings, 2 replies; 3+ messages in thread
From: Xiongfeng Wang @ 2022-01-14 10:58 UTC (permalink / raw)
  To: arnd, catalin.marinas
  Cc: linux-arch, linux-kernel, wangxiongfeng2, huangguangbin2

After using io_stop_wc(), drivers reports following compile error when
compiled on X86.

  drivers/net/ethernet/hisilicon/hns3/hns3_enet.c: In function ‘hns3_tx_push_bd’:
  drivers/net/ethernet/hisilicon/hns3/hns3_enet.c:2058:12: error: expected ‘;’ before ‘(’ token
    io_stop_wc();
              ^
It is because I missed to add the brackets after io_stop_wc macro. So
let's add the missing brackets.

Fixes: d5624bb29f49 ("asm-generic: introduce io_stop_wc() and add implementation for ARM64")
Reported-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
---
 include/asm-generic/barrier.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/asm-generic/barrier.h b/include/asm-generic/barrier.h
index 3d503e74037f..fd7e8fbaeef1 100644
--- a/include/asm-generic/barrier.h
+++ b/include/asm-generic/barrier.h
@@ -285,7 +285,7 @@ do {									\
  * write-combining memory accesses before this macro with those after it.
  */
 #ifndef io_stop_wc
-#define io_stop_wc do { } while (0)
+#define io_stop_wc() do { } while (0)
 #endif
 
 #endif /* !__ASSEMBLY__ */
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] asm-generic: Add missing brackets for io_stop_wc macro
  2022-01-14 10:58 [PATCH] asm-generic: Add missing brackets for io_stop_wc macro Xiongfeng Wang
@ 2022-01-14 11:56 ` Catalin Marinas
  2022-01-20 15:56 ` Catalin Marinas
  1 sibling, 0 replies; 3+ messages in thread
From: Catalin Marinas @ 2022-01-14 11:56 UTC (permalink / raw)
  To: Xiongfeng Wang; +Cc: arnd, linux-arch, linux-kernel, huangguangbin2

On Fri, Jan 14, 2022 at 06:58:57PM +0800, Xiongfeng Wang wrote:
> After using io_stop_wc(), drivers reports following compile error when
> compiled on X86.
> 
>   drivers/net/ethernet/hisilicon/hns3/hns3_enet.c: In function ‘hns3_tx_push_bd’:
>   drivers/net/ethernet/hisilicon/hns3/hns3_enet.c:2058:12: error: expected ‘;’ before ‘(’ token
>     io_stop_wc();
>               ^
> It is because I missed to add the brackets after io_stop_wc macro. So
> let's add the missing brackets.
> 
> Fixes: d5624bb29f49 ("asm-generic: introduce io_stop_wc() and add implementation for ARM64")
> Reported-by: Guangbin Huang <huangguangbin2@huawei.com>
> Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
> ---
>  include/asm-generic/barrier.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/asm-generic/barrier.h b/include/asm-generic/barrier.h
> index 3d503e74037f..fd7e8fbaeef1 100644
> --- a/include/asm-generic/barrier.h
> +++ b/include/asm-generic/barrier.h
> @@ -285,7 +285,7 @@ do {									\
>   * write-combining memory accesses before this macro with those after it.
>   */
>  #ifndef io_stop_wc
> -#define io_stop_wc do { } while (0)
> +#define io_stop_wc() do { } while (0)

Acked-by: Catalin Marinas <catalin.marinas@arm.com>

Arnd, do you plan to take this fix or you'd like me to?

Thanks.

-- 
Catalin

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] asm-generic: Add missing brackets for io_stop_wc macro
  2022-01-14 10:58 [PATCH] asm-generic: Add missing brackets for io_stop_wc macro Xiongfeng Wang
  2022-01-14 11:56 ` Catalin Marinas
@ 2022-01-20 15:56 ` Catalin Marinas
  1 sibling, 0 replies; 3+ messages in thread
From: Catalin Marinas @ 2022-01-20 15:56 UTC (permalink / raw)
  To: arnd, Xiongfeng Wang
  Cc: Will Deacon, linux-kernel, linux-arch, huangguangbin2

On Fri, 14 Jan 2022 18:58:57 +0800, Xiongfeng Wang wrote:
> After using io_stop_wc(), drivers reports following compile error when
> compiled on X86.
> 
>   drivers/net/ethernet/hisilicon/hns3/hns3_enet.c: In function ‘hns3_tx_push_bd’:
>   drivers/net/ethernet/hisilicon/hns3/hns3_enet.c:2058:12: error: expected ‘;’ before ‘(’ token
>     io_stop_wc();
>               ^
> It is because I missed to add the brackets after io_stop_wc macro. So
> let's add the missing brackets.
> 
> [...]

Applied to arm64 (for-next/core), thanks!

[1/1] asm-generic: Add missing brackets for io_stop_wc macro
      https://git.kernel.org/arm64/c/440323b6cf5b

-- 
Catalin


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-20 15:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-14 10:58 [PATCH] asm-generic: Add missing brackets for io_stop_wc macro Xiongfeng Wang
2022-01-14 11:56 ` Catalin Marinas
2022-01-20 15:56 ` Catalin Marinas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).