All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: vdso: fix "no previous prototype" warning
@ 2022-01-09 11:35 Marc Kleine-Budde
  2022-01-21 12:12 ` Vincenzo Frascino
  2022-01-21 12:12   ` Vincenzo Frascino
  0 siblings, 2 replies; 11+ messages in thread
From: Marc Kleine-Budde @ 2022-01-09 11:35 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Marc Kleine-Budde, Catalin Marinas, Will Deacon, Vincenzo Frascino

If compiling the arm64 kernel with W=1 the following warning is produced:

| arch/arm64/kernel/vdso/vgettimeofday.c:9:5: error: no previous prototype for ‘__kernel_clock_gettime’ [-Werror=missing-prototypes]
|     9 | int __kernel_clock_gettime(clockid_t clock,
|       |     ^~~~~~~~~~~~~~~~~~~~~~
| arch/arm64/kernel/vdso/vgettimeofday.c:15:5: error: no previous prototype for ‘__kernel_gettimeofday’ [-Werror=missing-prototypes]
|    15 | int __kernel_gettimeofday(struct __kernel_old_timeval *tv,
|       |     ^~~~~~~~~~~~~~~~~~~~~
| arch/arm64/kernel/vdso/vgettimeofday.c:21:5: error: no previous prototype for ‘__kernel_clock_getres’ [-Werror=missing-prototypes]
|    21 | int __kernel_clock_getres(clockid_t clock_id,
|       |     ^~~~~~~~~~~~~~~~~~~~~

This patch adds the missing prototype to fix the warning and make
compilation with "CONFIG_WERROR=y" possible.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 arch/arm64/kernel/vdso/vgettimeofday.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm64/kernel/vdso/vgettimeofday.c b/arch/arm64/kernel/vdso/vgettimeofday.c
index 4236cf34d7d9..cc37674b9d35 100644
--- a/arch/arm64/kernel/vdso/vgettimeofday.c
+++ b/arch/arm64/kernel/vdso/vgettimeofday.c
@@ -6,18 +6,27 @@
  *
  */
 
+int __kernel_clock_gettime(clockid_t clock,
+			   struct __kernel_timespec *ts);
+
 int __kernel_clock_gettime(clockid_t clock,
 			   struct __kernel_timespec *ts)
 {
 	return __cvdso_clock_gettime(clock, ts);
 }
 
+int __kernel_gettimeofday(struct __kernel_old_timeval *tv,
+			  struct timezone *tz);
+
 int __kernel_gettimeofday(struct __kernel_old_timeval *tv,
 			  struct timezone *tz)
 {
 	return __cvdso_gettimeofday(tv, tz);
 }
 
+int __kernel_clock_getres(clockid_t clock_id,
+			  struct __kernel_timespec *res);
+
 int __kernel_clock_getres(clockid_t clock_id,
 			  struct __kernel_timespec *res)
 {
-- 
2.34.1



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] arm64: vdso: fix "no previous prototype" warning
  2022-01-09 11:35 [PATCH] arm64: vdso: fix "no previous prototype" warning Marc Kleine-Budde
@ 2022-01-21 12:12 ` Vincenzo Frascino
  2022-01-22 12:05   ` Marc Kleine-Budde
  2022-01-21 12:12   ` Vincenzo Frascino
  1 sibling, 1 reply; 11+ messages in thread
From: Vincenzo Frascino @ 2022-01-21 12:12 UTC (permalink / raw)
  To: Marc Kleine-Budde, linux-arm-kernel; +Cc: Catalin Marinas, Will Deacon

Hi Marc,

On 1/9/22 11:35 AM, Marc Kleine-Budde wrote:
> If compiling the arm64 kernel with W=1 the following warning is produced:
> 
> | arch/arm64/kernel/vdso/vgettimeofday.c:9:5: error: no previous prototype for ‘__kernel_clock_gettime’ [-Werror=missing-prototypes]
> |     9 | int __kernel_clock_gettime(clockid_t clock,
> |       |     ^~~~~~~~~~~~~~~~~~~~~~
> | arch/arm64/kernel/vdso/vgettimeofday.c:15:5: error: no previous prototype for ‘__kernel_gettimeofday’ [-Werror=missing-prototypes]
> |    15 | int __kernel_gettimeofday(struct __kernel_old_timeval *tv,
> |       |     ^~~~~~~~~~~~~~~~~~~~~
> | arch/arm64/kernel/vdso/vgettimeofday.c:21:5: error: no previous prototype for ‘__kernel_clock_getres’ [-Werror=missing-prototypes]
> |    21 | int __kernel_clock_getres(clockid_t clock_id,
> |       |     ^~~~~~~~~~~~~~~~~~~~~
> 
> This patch adds the missing prototype to fix the warning and make
> compilation with "CONFIG_WERROR=y" possible.
> 

Instead of adding the prototypes, how about we silence the warning for the
specific file? Since adding them does not seem to add any value in this context.

If you agree, could please test the patch I sent in reply to this one and let me
know if it works for your usecase? Thanks.

> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> ---
>  arch/arm64/kernel/vdso/vgettimeofday.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/arch/arm64/kernel/vdso/vgettimeofday.c b/arch/arm64/kernel/vdso/vgettimeofday.c
> index 4236cf34d7d9..cc37674b9d35 100644
> --- a/arch/arm64/kernel/vdso/vgettimeofday.c
> +++ b/arch/arm64/kernel/vdso/vgettimeofday.c
> @@ -6,18 +6,27 @@
>   *
>   */
>  
> +int __kernel_clock_gettime(clockid_t clock,
> +			   struct __kernel_timespec *ts);
> +
>  int __kernel_clock_gettime(clockid_t clock,
>  			   struct __kernel_timespec *ts)
>  {
>  	return __cvdso_clock_gettime(clock, ts);
>  }
>  
> +int __kernel_gettimeofday(struct __kernel_old_timeval *tv,
> +			  struct timezone *tz);
> +
>  int __kernel_gettimeofday(struct __kernel_old_timeval *tv,
>  			  struct timezone *tz)
>  {
>  	return __cvdso_gettimeofday(tv, tz);
>  }
>  
> +int __kernel_clock_getres(clockid_t clock_id,
> +			  struct __kernel_timespec *res);
> +
>  int __kernel_clock_getres(clockid_t clock_id,
>  			  struct __kernel_timespec *res)
>  {
> 

-- 
Regards,
Vincenzo

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH] arm64: vdso: Fix "no previous prototype" warning
  2022-01-09 11:35 [PATCH] arm64: vdso: fix "no previous prototype" warning Marc Kleine-Budde
@ 2022-01-21 12:12   ` Vincenzo Frascino
  2022-01-21 12:12   ` Vincenzo Frascino
  1 sibling, 0 replies; 11+ messages in thread
From: Vincenzo Frascino @ 2022-01-21 12:12 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: Vincenzo Frascino, Catalin Marinas, Will Deacon, Marc Kleine-Budde

If compiling the arm64 kernel with W=1 the following warning is produced:

| arch/arm64/kernel/vdso/vgettimeofday.c:9:5: error: no previous prototype for ‘__kernel_clock_gettime’ [-Werror=missing-prototypes]
|     9 | int __kernel_clock_gettime(clockid_t clock,
|       |     ^~~~~~~~~~~~~~~~~~~~~~
| arch/arm64/kernel/vdso/vgettimeofday.c:15:5: error: no previous prototype for ‘__kernel_gettimeofday’ [-Werror=missing-prototypes]
|    15 | int __kernel_gettimeofday(struct __kernel_old_timeval *tv,
|       |     ^~~~~~~~~~~~~~~~~~~~~
| arch/arm64/kernel/vdso/vgettimeofday.c:21:5: error: no previous prototype for ‘__kernel_clock_getres’ [-Werror=missing-prototypes]
|    21 | int __kernel_clock_getres(clockid_t clock_id,
|       |     ^~~~~~~~~~~~~~~~~~~~~

This patch removes "-Wmissing-prototypes" and "-Wmissing-declarations" compilers
flags from the compilation of vgettimeofday.c to make possible to build the
kernel with CONFIG_WERROR enabled.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Suggested-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
---
 arch/arm64/kernel/vdso/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/kernel/vdso/Makefile b/arch/arm64/kernel/vdso/Makefile
index 60813497a381..172452f79e46 100644
--- a/arch/arm64/kernel/vdso/Makefile
+++ b/arch/arm64/kernel/vdso/Makefile
@@ -29,8 +29,11 @@ ldflags-y := -shared -soname=linux-vdso.so.1 --hash-style=sysv	\
 ccflags-y := -fno-common -fno-builtin -fno-stack-protector -ffixed-x18
 ccflags-y += -DDISABLE_BRANCH_PROFILING -DBUILD_VDSO
 
+# -Wmissing-prototypes and -Wmissing-declarations are removed from
+# the CFLAGS of vgettimeofday.c to make possible to build the
+# kernel with CONFIG_WERROR enabled.
 CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE) -Os $(CC_FLAGS_SCS) $(GCC_PLUGINS_CFLAGS) \
-				$(CC_FLAGS_LTO)
+				$(CC_FLAGS_LTO) -Wmissing-prototypes -Wmissing-declarations
 KASAN_SANITIZE			:= n
 KCSAN_SANITIZE			:= n
 UBSAN_SANITIZE			:= n
-- 
2.34.1


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

* [PATCH] arm64: vdso: Fix "no previous prototype" warning
@ 2022-01-21 12:12   ` Vincenzo Frascino
  0 siblings, 0 replies; 11+ messages in thread
From: Vincenzo Frascino @ 2022-01-21 12:12 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: Vincenzo Frascino, Catalin Marinas, Will Deacon, Marc Kleine-Budde

If compiling the arm64 kernel with W=1 the following warning is produced:

| arch/arm64/kernel/vdso/vgettimeofday.c:9:5: error: no previous prototype for ‘__kernel_clock_gettime’ [-Werror=missing-prototypes]
|     9 | int __kernel_clock_gettime(clockid_t clock,
|       |     ^~~~~~~~~~~~~~~~~~~~~~
| arch/arm64/kernel/vdso/vgettimeofday.c:15:5: error: no previous prototype for ‘__kernel_gettimeofday’ [-Werror=missing-prototypes]
|    15 | int __kernel_gettimeofday(struct __kernel_old_timeval *tv,
|       |     ^~~~~~~~~~~~~~~~~~~~~
| arch/arm64/kernel/vdso/vgettimeofday.c:21:5: error: no previous prototype for ‘__kernel_clock_getres’ [-Werror=missing-prototypes]
|    21 | int __kernel_clock_getres(clockid_t clock_id,
|       |     ^~~~~~~~~~~~~~~~~~~~~

This patch removes "-Wmissing-prototypes" and "-Wmissing-declarations" compilers
flags from the compilation of vgettimeofday.c to make possible to build the
kernel with CONFIG_WERROR enabled.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Suggested-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
---
 arch/arm64/kernel/vdso/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/kernel/vdso/Makefile b/arch/arm64/kernel/vdso/Makefile
index 60813497a381..172452f79e46 100644
--- a/arch/arm64/kernel/vdso/Makefile
+++ b/arch/arm64/kernel/vdso/Makefile
@@ -29,8 +29,11 @@ ldflags-y := -shared -soname=linux-vdso.so.1 --hash-style=sysv	\
 ccflags-y := -fno-common -fno-builtin -fno-stack-protector -ffixed-x18
 ccflags-y += -DDISABLE_BRANCH_PROFILING -DBUILD_VDSO
 
+# -Wmissing-prototypes and -Wmissing-declarations are removed from
+# the CFLAGS of vgettimeofday.c to make possible to build the
+# kernel with CONFIG_WERROR enabled.
 CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE) -Os $(CC_FLAGS_SCS) $(GCC_PLUGINS_CFLAGS) \
-				$(CC_FLAGS_LTO)
+				$(CC_FLAGS_LTO) -Wmissing-prototypes -Wmissing-declarations
 KASAN_SANITIZE			:= n
 KCSAN_SANITIZE			:= n
 UBSAN_SANITIZE			:= n
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] arm64: vdso: fix "no previous prototype" warning
  2022-01-21 12:12 ` Vincenzo Frascino
@ 2022-01-22 12:05   ` Marc Kleine-Budde
  2022-01-24 12:10     ` Vincenzo Frascino
  0 siblings, 1 reply; 11+ messages in thread
From: Marc Kleine-Budde @ 2022-01-22 12:05 UTC (permalink / raw)
  To: Vincenzo Frascino; +Cc: linux-arm-kernel, Catalin Marinas, Will Deacon


[-- Attachment #1.1: Type: text/plain, Size: 2126 bytes --]

On 21.01.2022 12:12:26, Vincenzo Frascino wrote:
> Hi Marc,
> 
> On 1/9/22 11:35 AM, Marc Kleine-Budde wrote:
> > If compiling the arm64 kernel with W=1 the following warning is produced:
> > 
> > | arch/arm64/kernel/vdso/vgettimeofday.c:9:5: error: no previous prototype for ‘__kernel_clock_gettime’ [-Werror=missing-prototypes]
> > |     9 | int __kernel_clock_gettime(clockid_t clock,
> > |       |     ^~~~~~~~~~~~~~~~~~~~~~
> > | arch/arm64/kernel/vdso/vgettimeofday.c:15:5: error: no previous prototype for ‘__kernel_gettimeofday’ [-Werror=missing-prototypes]
> > |    15 | int __kernel_gettimeofday(struct __kernel_old_timeval *tv,
> > |       |     ^~~~~~~~~~~~~~~~~~~~~
> > | arch/arm64/kernel/vdso/vgettimeofday.c:21:5: error: no previous prototype for ‘__kernel_clock_getres’ [-Werror=missing-prototypes]
> > |    21 | int __kernel_clock_getres(clockid_t clock_id,
> > |       |     ^~~~~~~~~~~~~~~~~~~~~
> > 
> > This patch adds the missing prototype to fix the warning and make
> > compilation with "CONFIG_WERROR=y" possible.
> > 
> 
> Instead of adding the prototypes, how about we silence the warning for the
> specific file? Since adding them does not seem to add any value in this context.
> 
> If you agree, could please test the patch I sent in reply to this one and let me
> know if it works for your usecase? Thanks.

The patch silences the W=1 warning, sparse (C=1) however still
complains:

| arch/arm64/kernel/vdso/vgettimeofday.c:9:5: warning: symbol '__kernel_clock_gettime' was not declared. Should it be static?
| arch/arm64/kernel/vdso/vgettimeofday.c:15:5: warning: symbol '__kernel_gettimeofday' was not declared. Should it be static?
| arch/arm64/kernel/vdso/vgettimeofday.c:21:5: warning: symbol '__kernel_clock_getres' was not declared. Should it be static?

regards,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] arm64: vdso: Fix "no previous prototype" warning
  2022-01-21 12:12   ` Vincenzo Frascino
@ 2022-01-22 12:06     ` Marc Kleine-Budde
  -1 siblings, 0 replies; 11+ messages in thread
From: Marc Kleine-Budde @ 2022-01-22 12:06 UTC (permalink / raw)
  To: Vincenzo Frascino
  Cc: linux-arm-kernel, linux-kernel, Catalin Marinas, Will Deacon

[-- Attachment #1: Type: text/plain, Size: 1614 bytes --]

On 21.01.2022 12:12:34, Vincenzo Frascino wrote:
> If compiling the arm64 kernel with W=1 the following warning is produced:
> 
> | arch/arm64/kernel/vdso/vgettimeofday.c:9:5: error: no previous prototype for ‘__kernel_clock_gettime’ [-Werror=missing-prototypes]
> |     9 | int __kernel_clock_gettime(clockid_t clock,
> |       |     ^~~~~~~~~~~~~~~~~~~~~~
> | arch/arm64/kernel/vdso/vgettimeofday.c:15:5: error: no previous prototype for ‘__kernel_gettimeofday’ [-Werror=missing-prototypes]
> |    15 | int __kernel_gettimeofday(struct __kernel_old_timeval *tv,
> |       |     ^~~~~~~~~~~~~~~~~~~~~
> | arch/arm64/kernel/vdso/vgettimeofday.c:21:5: error: no previous prototype for ‘__kernel_clock_getres’ [-Werror=missing-prototypes]
> |    21 | int __kernel_clock_getres(clockid_t clock_id,
> |       |     ^~~~~~~~~~~~~~~~~~~~~
> 
> This patch removes "-Wmissing-prototypes" and "-Wmissing-declarations" compilers
> flags from the compilation of vgettimeofday.c to make possible to build the
> kernel with CONFIG_WERROR enabled.
> 
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Suggested-by: Marc Kleine-Budde <mkl@pengutronix.de>
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>

Tested-by: Marc Kleine-Budde <mkl@pengutronix.de>

regards,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH] arm64: vdso: Fix "no previous prototype" warning
@ 2022-01-22 12:06     ` Marc Kleine-Budde
  0 siblings, 0 replies; 11+ messages in thread
From: Marc Kleine-Budde @ 2022-01-22 12:06 UTC (permalink / raw)
  To: Vincenzo Frascino
  Cc: linux-arm-kernel, linux-kernel, Catalin Marinas, Will Deacon


[-- Attachment #1.1: Type: text/plain, Size: 1614 bytes --]

On 21.01.2022 12:12:34, Vincenzo Frascino wrote:
> If compiling the arm64 kernel with W=1 the following warning is produced:
> 
> | arch/arm64/kernel/vdso/vgettimeofday.c:9:5: error: no previous prototype for ‘__kernel_clock_gettime’ [-Werror=missing-prototypes]
> |     9 | int __kernel_clock_gettime(clockid_t clock,
> |       |     ^~~~~~~~~~~~~~~~~~~~~~
> | arch/arm64/kernel/vdso/vgettimeofday.c:15:5: error: no previous prototype for ‘__kernel_gettimeofday’ [-Werror=missing-prototypes]
> |    15 | int __kernel_gettimeofday(struct __kernel_old_timeval *tv,
> |       |     ^~~~~~~~~~~~~~~~~~~~~
> | arch/arm64/kernel/vdso/vgettimeofday.c:21:5: error: no previous prototype for ‘__kernel_clock_getres’ [-Werror=missing-prototypes]
> |    21 | int __kernel_clock_getres(clockid_t clock_id,
> |       |     ^~~~~~~~~~~~~~~~~~~~~
> 
> This patch removes "-Wmissing-prototypes" and "-Wmissing-declarations" compilers
> flags from the compilation of vgettimeofday.c to make possible to build the
> kernel with CONFIG_WERROR enabled.
> 
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Suggested-by: Marc Kleine-Budde <mkl@pengutronix.de>
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>

Tested-by: Marc Kleine-Budde <mkl@pengutronix.de>

regards,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] arm64: vdso: fix "no previous prototype" warning
  2022-01-22 12:05   ` Marc Kleine-Budde
@ 2022-01-24 12:10     ` Vincenzo Frascino
  2022-01-24 12:13       ` Marc Kleine-Budde
  0 siblings, 1 reply; 11+ messages in thread
From: Vincenzo Frascino @ 2022-01-24 12:10 UTC (permalink / raw)
  To: Marc Kleine-Budde; +Cc: linux-arm-kernel, Catalin Marinas, Will Deacon

Hi Marc,

On 1/22/22 12:05 PM, Marc Kleine-Budde wrote:
> On 21.01.2022 12:12:26, Vincenzo Frascino wrote:
>> Hi Marc,
>>
>> On 1/9/22 11:35 AM, Marc Kleine-Budde wrote:
>>> If compiling the arm64 kernel with W=1 the following warning is produced:
>>>
>>> | arch/arm64/kernel/vdso/vgettimeofday.c:9:5: error: no previous prototype for ‘__kernel_clock_gettime’ [-Werror=missing-prototypes]
>>> |     9 | int __kernel_clock_gettime(clockid_t clock,
>>> |       |     ^~~~~~~~~~~~~~~~~~~~~~
>>> | arch/arm64/kernel/vdso/vgettimeofday.c:15:5: error: no previous prototype for ‘__kernel_gettimeofday’ [-Werror=missing-prototypes]
>>> |    15 | int __kernel_gettimeofday(struct __kernel_old_timeval *tv,
>>> |       |     ^~~~~~~~~~~~~~~~~~~~~
>>> | arch/arm64/kernel/vdso/vgettimeofday.c:21:5: error: no previous prototype for ‘__kernel_clock_getres’ [-Werror=missing-prototypes]
>>> |    21 | int __kernel_clock_getres(clockid_t clock_id,
>>> |       |     ^~~~~~~~~~~~~~~~~~~~~
>>>
>>> This patch adds the missing prototype to fix the warning and make
>>> compilation with "CONFIG_WERROR=y" possible.
>>>
>>
>> Instead of adding the prototypes, how about we silence the warning for the
>> specific file? Since adding them does not seem to add any value in this context.
>>
>> If you agree, could please test the patch I sent in reply to this one and let me
>> know if it works for your usecase? Thanks.
> 
> The patch silences the W=1 warning, sparse (C=1) however still
> complains:
> 
> | arch/arm64/kernel/vdso/vgettimeofday.c:9:5: warning: symbol '__kernel_clock_gettime' was not declared. Should it be static?
> | arch/arm64/kernel/vdso/vgettimeofday.c:15:5: warning: symbol '__kernel_gettimeofday' was not declared. Should it be static?
> | arch/arm64/kernel/vdso/vgettimeofday.c:21:5: warning: symbol '__kernel_clock_getres' was not declared. Should it be static?
> 

I had a look this morning but it seems but it seems that CHECKFLAGS does not
allow to ignore warnings. I need to investigate it further, but in the meantime
I propose to go ahead with the other patch since it addresses a compilation issue.


> regards,
> Marc
> 

-- 
Regards,
Vincenzo

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] arm64: vdso: fix "no previous prototype" warning
  2022-01-24 12:10     ` Vincenzo Frascino
@ 2022-01-24 12:13       ` Marc Kleine-Budde
  0 siblings, 0 replies; 11+ messages in thread
From: Marc Kleine-Budde @ 2022-01-24 12:13 UTC (permalink / raw)
  To: Vincenzo Frascino; +Cc: linux-arm-kernel, Catalin Marinas, Will Deacon


[-- Attachment #1.1: Type: text/plain, Size: 1103 bytes --]

On 24.01.2022 12:10:02, Vincenzo Frascino wrote:
> > The patch silences the W=1 warning, sparse (C=1) however still
> > complains:
> > 
> > | arch/arm64/kernel/vdso/vgettimeofday.c:9:5: warning: symbol '__kernel_clock_gettime' was not declared. Should it be static?
> > | arch/arm64/kernel/vdso/vgettimeofday.c:15:5: warning: symbol '__kernel_gettimeofday' was not declared. Should it be static?
> > | arch/arm64/kernel/vdso/vgettimeofday.c:21:5: warning: symbol '__kernel_clock_getres' was not declared. Should it be static?
> > 
> 
> I had a look this morning but it seems but it seems that CHECKFLAGS does not
> allow to ignore warnings. I need to investigate it further, but in the meantime
> I propose to go ahead with the other patch since it addresses a compilation issue.

Sounds reasonable.

regards,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] arm64: vdso: Fix "no previous prototype" warning
  2022-01-21 12:12   ` Vincenzo Frascino
@ 2022-01-24 15:10     ` Catalin Marinas
  -1 siblings, 0 replies; 11+ messages in thread
From: Catalin Marinas @ 2022-01-24 15:10 UTC (permalink / raw)
  To: linux-arm-kernel, Vincenzo Frascino, linux-kernel
  Cc: Will Deacon, Marc Kleine-Budde

On Fri, 21 Jan 2022 12:12:34 +0000, Vincenzo Frascino wrote:
> If compiling the arm64 kernel with W=1 the following warning is produced:
> 
> | arch/arm64/kernel/vdso/vgettimeofday.c:9:5: error: no previous prototype for ‘__kernel_clock_gettime’ [-Werror=missing-prototypes]
> |     9 | int __kernel_clock_gettime(clockid_t clock,
> |       |     ^~~~~~~~~~~~~~~~~~~~~~
> | arch/arm64/kernel/vdso/vgettimeofday.c:15:5: error: no previous prototype for ‘__kernel_gettimeofday’ [-Werror=missing-prototypes]
> |    15 | int __kernel_gettimeofday(struct __kernel_old_timeval *tv,
> |       |     ^~~~~~~~~~~~~~~~~~~~~
> | arch/arm64/kernel/vdso/vgettimeofday.c:21:5: error: no previous prototype for ‘__kernel_clock_getres’ [-Werror=missing-prototypes]
> |    21 | int __kernel_clock_getres(clockid_t clock_id,
> |       |     ^~~~~~~~~~~~~~~~~~~~~
> 
> [...]

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

[1/1] arm64: vdso: Fix "no previous prototype" warning
      https://git.kernel.org/arm64/c/58cd4a088e89

-- 
Catalin


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

* Re: [PATCH] arm64: vdso: Fix "no previous prototype" warning
@ 2022-01-24 15:10     ` Catalin Marinas
  0 siblings, 0 replies; 11+ messages in thread
From: Catalin Marinas @ 2022-01-24 15:10 UTC (permalink / raw)
  To: linux-arm-kernel, Vincenzo Frascino, linux-kernel
  Cc: Will Deacon, Marc Kleine-Budde

On Fri, 21 Jan 2022 12:12:34 +0000, Vincenzo Frascino wrote:
> If compiling the arm64 kernel with W=1 the following warning is produced:
> 
> | arch/arm64/kernel/vdso/vgettimeofday.c:9:5: error: no previous prototype for ‘__kernel_clock_gettime’ [-Werror=missing-prototypes]
> |     9 | int __kernel_clock_gettime(clockid_t clock,
> |       |     ^~~~~~~~~~~~~~~~~~~~~~
> | arch/arm64/kernel/vdso/vgettimeofday.c:15:5: error: no previous prototype for ‘__kernel_gettimeofday’ [-Werror=missing-prototypes]
> |    15 | int __kernel_gettimeofday(struct __kernel_old_timeval *tv,
> |       |     ^~~~~~~~~~~~~~~~~~~~~
> | arch/arm64/kernel/vdso/vgettimeofday.c:21:5: error: no previous prototype for ‘__kernel_clock_getres’ [-Werror=missing-prototypes]
> |    21 | int __kernel_clock_getres(clockid_t clock_id,
> |       |     ^~~~~~~~~~~~~~~~~~~~~
> 
> [...]

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

[1/1] arm64: vdso: Fix "no previous prototype" warning
      https://git.kernel.org/arm64/c/58cd4a088e89

-- 
Catalin


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

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

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-09 11:35 [PATCH] arm64: vdso: fix "no previous prototype" warning Marc Kleine-Budde
2022-01-21 12:12 ` Vincenzo Frascino
2022-01-22 12:05   ` Marc Kleine-Budde
2022-01-24 12:10     ` Vincenzo Frascino
2022-01-24 12:13       ` Marc Kleine-Budde
2022-01-21 12:12 ` [PATCH] arm64: vdso: Fix " Vincenzo Frascino
2022-01-21 12:12   ` Vincenzo Frascino
2022-01-22 12:06   ` Marc Kleine-Budde
2022-01-22 12:06     ` Marc Kleine-Budde
2022-01-24 15:10   ` Catalin Marinas
2022-01-24 15:10     ` Catalin Marinas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.