linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] LoongArch: Fix warning: #warning syscall fstat not implemented
@ 2022-08-29  9:55 Tiezhu Yang
  2022-08-29 10:18 ` WANG Xuerui
  2022-08-29 11:36 ` Arnd Bergmann
  0 siblings, 2 replies; 5+ messages in thread
From: Tiezhu Yang @ 2022-08-29  9:55 UTC (permalink / raw)
  To: Huacai Chen, WANG Xuerui; +Cc: loongarch, linux-kernel

Define __ARCH_WANT_NEW_STAT to fix the following build warning:

  CALL    scripts/checksyscalls.sh
<stdin>:569:2: warning: #warning syscall fstat not implemented [-Wcpp]

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
 arch/loongarch/include/uapi/asm/unistd.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/loongarch/include/uapi/asm/unistd.h b/arch/loongarch/include/uapi/asm/unistd.h
index fcb6689..b344b1f 100644
--- a/arch/loongarch/include/uapi/asm/unistd.h
+++ b/arch/loongarch/include/uapi/asm/unistd.h
@@ -1,4 +1,5 @@
 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+#define __ARCH_WANT_NEW_STAT
 #define __ARCH_WANT_SYS_CLONE
 #define __ARCH_WANT_SYS_CLONE3
 
-- 
2.1.0


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

* Re: [PATCH] LoongArch: Fix warning: #warning syscall fstat not implemented
  2022-08-29  9:55 [PATCH] LoongArch: Fix warning: #warning syscall fstat not implemented Tiezhu Yang
@ 2022-08-29 10:18 ` WANG Xuerui
  2022-08-29 11:36 ` Arnd Bergmann
  1 sibling, 0 replies; 5+ messages in thread
From: WANG Xuerui @ 2022-08-29 10:18 UTC (permalink / raw)
  To: Tiezhu Yang, Huacai Chen; +Cc: loongarch, linux-kernel

On 2022/8/29 17:55, Tiezhu Yang wrote:
> Define __ARCH_WANT_NEW_STAT to fix the following build warning:
> 
>    CALL    scripts/checksyscalls.sh
> <stdin>:569:2: warning: #warning syscall fstat not implemented [-Wcpp]
> 
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> ---
>   arch/loongarch/include/uapi/asm/unistd.h | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/arch/loongarch/include/uapi/asm/unistd.h b/arch/loongarch/include/uapi/asm/unistd.h
> index fcb6689..b344b1f 100644
> --- a/arch/loongarch/include/uapi/asm/unistd.h
> +++ b/arch/loongarch/include/uapi/asm/unistd.h
> @@ -1,4 +1,5 @@
>   /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
> +#define __ARCH_WANT_NEW_STAT
>   #define __ARCH_WANT_SYS_CLONE
>   #define __ARCH_WANT_SYS_CLONE3
>   
No. We explicitly removed support for fstat/newfstatat in favor of 
statx, so the correct way forward is to amend the checksyscalls.sh, to 
make it aware of the fact that loongarch is the latest shiny addition so 
it doesn't carry any of the "legacy" around.

-- 
WANG "xen0n" Xuerui

Linux/LoongArch mailing list: https://lore.kernel.org/loongarch/


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

* Re: [PATCH] LoongArch: Fix warning: #warning syscall fstat not implemented
  2022-08-29  9:55 [PATCH] LoongArch: Fix warning: #warning syscall fstat not implemented Tiezhu Yang
  2022-08-29 10:18 ` WANG Xuerui
@ 2022-08-29 11:36 ` Arnd Bergmann
  2022-08-29 14:34   ` Tiezhu Yang
  1 sibling, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2022-08-29 11:36 UTC (permalink / raw)
  To: Tiezhu Yang, Huacai Chen, WANG Xuerui; +Cc: loongarch, linux-kernel

On Mon, Aug 29, 2022, at 11:55 AM, Tiezhu Yang wrote:

>   CALL    scripts/checksyscalls.sh
> <stdin>:569:2: warning: #warning syscall fstat not implemented [-Wcpp]

> @@ -1,4 +1,5 @@
> /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
> +#define __ARCH_WANT_NEW_STAT
> #define __ARCH_WANT_SYS_CLONE
> #define __ARCH_WANT_SYS_CLONE3

The correct fix is to change scripts/checksyscalls.sh,
making it always define __IGNORE_fstat

        Arnd

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

* Re: [PATCH] LoongArch: Fix warning: #warning syscall fstat not implemented
  2022-08-29 11:36 ` Arnd Bergmann
@ 2022-08-29 14:34   ` Tiezhu Yang
  2022-08-30 11:37     ` Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: Tiezhu Yang @ 2022-08-29 14:34 UTC (permalink / raw)
  To: Arnd Bergmann, Huacai Chen, WANG Xuerui; +Cc: loongarch, linux-kernel



On 8/29/22 19:36, Arnd Bergmann wrote:
> On Mon, Aug 29, 2022, at 11:55 AM, Tiezhu Yang wrote:
> 
>>    CALL    scripts/checksyscalls.sh
>> <stdin>:569:2: warning: #warning syscall fstat not implemented [-Wcpp]
> 
>> @@ -1,4 +1,5 @@
>> /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
>> +#define __ARCH_WANT_NEW_STAT
>> #define __ARCH_WANT_SYS_CLONE
>> #define __ARCH_WANT_SYS_CLONE3
> 
> The correct fix is to change scripts/checksyscalls.sh,
> making it always define __IGNORE_fstat
> 

Hi Arnd,

Thank you very much.

I read the commit message in the commit 82b355d161c9 ("y2038: Remove
newstat family from default syscall set"), I am not quite sure whether
we should check __ARCH_WANT_NEW_STAT first, like this:

   #ifndef __ARCH_WANT_NEW_STAT
   #define __IGNORE_fstat
   #endif

Thanks,
Tiezhu


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

* Re: [PATCH] LoongArch: Fix warning: #warning syscall fstat not implemented
  2022-08-29 14:34   ` Tiezhu Yang
@ 2022-08-30 11:37     ` Arnd Bergmann
  0 siblings, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2022-08-30 11:37 UTC (permalink / raw)
  To: Tiezhu Yang, Huacai Chen, WANG Xuerui; +Cc: loongarch, linux-kernel

On Mon, Aug 29, 2022, at 4:34 PM, Tiezhu Yang wrote:
>
> I read the commit message in the commit 82b355d161c9 ("y2038: Remove
> newstat family from default syscall set"), I am not quite sure whether
> we should check __ARCH_WANT_NEW_STAT first, like this:
>
>    #ifndef __ARCH_WANT_NEW_STAT
>    #define __IGNORE_fstat
>    #endif

No, the #ifdef is not needed here, the entry just means we
no longer warn about the missing syscall because it has
been replaced by statx and this is true regardless of
__ARCH_WANT_NEW_STAT.

       Arnd

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

end of thread, other threads:[~2022-08-30 11:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-29  9:55 [PATCH] LoongArch: Fix warning: #warning syscall fstat not implemented Tiezhu Yang
2022-08-29 10:18 ` WANG Xuerui
2022-08-29 11:36 ` Arnd Bergmann
2022-08-29 14:34   ` Tiezhu Yang
2022-08-30 11:37     ` Arnd Bergmann

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).