* [PATCH 0/2] s390: A couple of fixes for -Wmissing-prototypes
@ 2023-12-01 0:22 Nathan Chancellor
2023-12-01 0:22 ` [PATCH 1/2] s390/dasd: Remove dasd_stats_generic_show() Nathan Chancellor
2023-12-01 0:22 ` [PATCH 2/2] s390/traps: Only define is_valid_bugaddr() under CONFIG_GENERIC_BUG Nathan Chancellor
0 siblings, 2 replies; 8+ messages in thread
From: Nathan Chancellor @ 2023-12-01 0:22 UTC (permalink / raw)
To: akpm, hca, gor, agordeev
Cc: borntraeger, svens, linux-s390, patches, Nathan Chancellor, sth,
hoeppner
Hi all,
This series resolves a couple of -Wmissing-prototypes that I see in my
builds of -next, even though the issues appear to be latent. The patch
to enable -Wmissing-prototypes is in Andrew's tree, so these should
likely go there as well with acks from the s390 maintainers.
---
Nathan Chancellor (2):
s390/dasd: Remove dasd_stats_generic_show()
s390/traps: Only define is_valid_bugaddr() under CONFIG_GENERIC_BUG
arch/s390/kernel/traps.c | 2 ++
drivers/s390/block/dasd.c | 6 ------
2 files changed, 2 insertions(+), 6 deletions(-)
---
base-commit: 2cc14f52aeb78ce3f29677c2de1f06c0e91471ab
change-id: 20231130-s390-missing-prototypes-7d95aae2cdcb
Best regards,
--
Nathan Chancellor <nathan@kernel.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] s390/dasd: Remove dasd_stats_generic_show()
2023-12-01 0:22 [PATCH 0/2] s390: A couple of fixes for -Wmissing-prototypes Nathan Chancellor
@ 2023-12-01 0:22 ` Nathan Chancellor
2023-12-04 7:41 ` Alexander Gordeev
2023-12-04 13:13 ` Stefan Haberland
2023-12-01 0:22 ` [PATCH 2/2] s390/traps: Only define is_valid_bugaddr() under CONFIG_GENERIC_BUG Nathan Chancellor
1 sibling, 2 replies; 8+ messages in thread
From: Nathan Chancellor @ 2023-12-01 0:22 UTC (permalink / raw)
To: akpm, hca, gor, agordeev
Cc: borntraeger, svens, linux-s390, patches, Nathan Chancellor, sth,
hoeppner
With CONFIG_DASD_PROFILE=n, there is a warning that
dasd_stats_generic_show() is missing a prototype:
drivers/s390/block/dasd.c:1109:5: warning: no previous prototype for 'dasd_stats_generic_show' [-Wmissing-prototypes]
1109 | int dasd_stats_generic_show(struct seq_file *m, void *v)
| ^~~~~~~~~~~~~~~~~~~~~~~
This function has been unused since its introduction in
commit 4fa52aa7a82f ("[S390] dasd: add enhanced DASD statistics
interface"), remove it to clear up the warning.
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
Cc: sth@linux.ibm.com
Cc: hoeppner@linux.ibm.com
---
drivers/s390/block/dasd.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index 833cfab7d877..7327e81352e9 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -1106,12 +1106,6 @@ static void dasd_statistics_removeroot(void)
return;
}
-int dasd_stats_generic_show(struct seq_file *m, void *v)
-{
- seq_puts(m, "Statistics are not activated in this kernel\n");
- return 0;
-}
-
static void dasd_profile_init(struct dasd_profile *profile,
struct dentry *base_dentry)
{
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] s390/traps: Only define is_valid_bugaddr() under CONFIG_GENERIC_BUG
2023-12-01 0:22 [PATCH 0/2] s390: A couple of fixes for -Wmissing-prototypes Nathan Chancellor
2023-12-01 0:22 ` [PATCH 1/2] s390/dasd: Remove dasd_stats_generic_show() Nathan Chancellor
@ 2023-12-01 0:22 ` Nathan Chancellor
2023-12-04 9:06 ` Alexander Gordeev
2023-12-05 12:59 ` Alexander Gordeev
1 sibling, 2 replies; 8+ messages in thread
From: Nathan Chancellor @ 2023-12-01 0:22 UTC (permalink / raw)
To: akpm, hca, gor, agordeev
Cc: borntraeger, svens, linux-s390, patches, Nathan Chancellor
When building with -Wmissing-prototypes without CONFIG_GENERIC_BUG,
there is a warning about a missing prototype for is_valid_bugaddr():
arch/s390/kernel/traps.c:46:5: warning: no previous prototype for 'is_valid_bugaddr' [-Wmissing-prototypes]
46 | int is_valid_bugaddr(unsigned long addr)
| ^~~~~~~~~~~~~~~~
The prototype is only declared with CONFIG_GENERIC_BUG, so only define
the function under the same condition to clear up the warning, which
matches other architectures.
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
arch/s390/kernel/traps.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c
index 1d2aa448d103..cc3e3a01dfa5 100644
--- a/arch/s390/kernel/traps.c
+++ b/arch/s390/kernel/traps.c
@@ -43,10 +43,12 @@ static inline void __user *get_trap_ip(struct pt_regs *regs)
return (void __user *) (address - (regs->int_code >> 16));
}
+#ifdef CONFIG_GENERIC_BUG
int is_valid_bugaddr(unsigned long addr)
{
return 1;
}
+#endif
void do_report_trap(struct pt_regs *regs, int si_signo, int si_code, char *str)
{
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] s390/dasd: Remove dasd_stats_generic_show()
2023-12-01 0:22 ` [PATCH 1/2] s390/dasd: Remove dasd_stats_generic_show() Nathan Chancellor
@ 2023-12-04 7:41 ` Alexander Gordeev
2023-12-04 13:13 ` Stefan Haberland
1 sibling, 0 replies; 8+ messages in thread
From: Alexander Gordeev @ 2023-12-04 7:41 UTC (permalink / raw)
To: Nathan Chancellor
Cc: akpm, hca, gor, borntraeger, svens, linux-s390, patches, sth,
hoeppner
On Thu, Nov 30, 2023 at 05:22:32PM -0700, Nathan Chancellor wrote:
> With CONFIG_DASD_PROFILE=n, there is a warning that
> dasd_stats_generic_show() is missing a prototype:
>
> drivers/s390/block/dasd.c:1109:5: warning: no previous prototype for 'dasd_stats_generic_show' [-Wmissing-prototypes]
> 1109 | int dasd_stats_generic_show(struct seq_file *m, void *v)
> | ^~~~~~~~~~~~~~~~~~~~~~~
>
> This function has been unused since its introduction in
> commit 4fa52aa7a82f ("[S390] dasd: add enhanced DASD statistics
> interface"), remove it to clear up the warning.
>
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
> Cc: sth@linux.ibm.com
> Cc: hoeppner@linux.ibm.com
> ---
> drivers/s390/block/dasd.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
> index 833cfab7d877..7327e81352e9 100644
> --- a/drivers/s390/block/dasd.c
> +++ b/drivers/s390/block/dasd.c
> @@ -1106,12 +1106,6 @@ static void dasd_statistics_removeroot(void)
> return;
> }
>
> -int dasd_stats_generic_show(struct seq_file *m, void *v)
> -{
> - seq_puts(m, "Statistics are not activated in this kernel\n");
> - return 0;
> -}
> -
> static void dasd_profile_init(struct dasd_profile *profile,
> struct dentry *base_dentry)
> {
>
Acked-by: Alexander Gordeev <agordeev@linux.ibm.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] s390/traps: Only define is_valid_bugaddr() under CONFIG_GENERIC_BUG
2023-12-01 0:22 ` [PATCH 2/2] s390/traps: Only define is_valid_bugaddr() under CONFIG_GENERIC_BUG Nathan Chancellor
@ 2023-12-04 9:06 ` Alexander Gordeev
2023-12-04 16:38 ` Nathan Chancellor
2023-12-05 12:59 ` Alexander Gordeev
1 sibling, 1 reply; 8+ messages in thread
From: Alexander Gordeev @ 2023-12-04 9:06 UTC (permalink / raw)
To: Nathan Chancellor; +Cc: akpm, hca, gor, borntraeger, svens, linux-s390, patches
On Thu, Nov 30, 2023 at 05:22:33PM -0700, Nathan Chancellor wrote:
Hi Nathan,
> When building with -Wmissing-prototypes without CONFIG_GENERIC_BUG,
> there is a warning about a missing prototype for is_valid_bugaddr():
>
> arch/s390/kernel/traps.c:46:5: warning: no previous prototype for 'is_valid_bugaddr' [-Wmissing-prototypes]
> 46 | int is_valid_bugaddr(unsigned long addr)
> | ^~~~~~~~~~~~~~~~
>
> The prototype is only declared with CONFIG_GENERIC_BUG, so only define
> the function under the same condition to clear up the warning, which
> matches other architectures.
Thanks for the fix!
The patch is fine, although I have not been able to reproduce the warning.
How did you trigger it?
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
> arch/s390/kernel/traps.c | 2 ++
> 1 file changed, 2 insertions(+)
...
Thanks!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] s390/dasd: Remove dasd_stats_generic_show()
2023-12-01 0:22 ` [PATCH 1/2] s390/dasd: Remove dasd_stats_generic_show() Nathan Chancellor
2023-12-04 7:41 ` Alexander Gordeev
@ 2023-12-04 13:13 ` Stefan Haberland
1 sibling, 0 replies; 8+ messages in thread
From: Stefan Haberland @ 2023-12-04 13:13 UTC (permalink / raw)
To: Nathan Chancellor, akpm, hca, gor, agordeev
Cc: borntraeger, svens, linux-s390, patches, hoeppner
Am 01.12.23 um 01:22 schrieb Nathan Chancellor:
> With CONFIG_DASD_PROFILE=n, there is a warning that
> dasd_stats_generic_show() is missing a prototype:
>
> drivers/s390/block/dasd.c:1109:5: warning: no previous prototype for 'dasd_stats_generic_show' [-Wmissing-prototypes]
> 1109 | int dasd_stats_generic_show(struct seq_file *m, void *v)
> | ^~~~~~~~~~~~~~~~~~~~~~~
>
> This function has been unused since its introduction in
> commit 4fa52aa7a82f ("[S390] dasd: add enhanced DASD statistics
> interface"), remove it to clear up the warning.
>
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
Acked-by: Stefan Haberland<sth@linux.ibm.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] s390/traps: Only define is_valid_bugaddr() under CONFIG_GENERIC_BUG
2023-12-04 9:06 ` Alexander Gordeev
@ 2023-12-04 16:38 ` Nathan Chancellor
0 siblings, 0 replies; 8+ messages in thread
From: Nathan Chancellor @ 2023-12-04 16:38 UTC (permalink / raw)
To: Alexander Gordeev; +Cc: akpm, hca, gor, borntraeger, svens, linux-s390, patches
On Mon, Dec 04, 2023 at 10:06:43AM +0100, Alexander Gordeev wrote:
> On Thu, Nov 30, 2023 at 05:22:33PM -0700, Nathan Chancellor wrote:
>
> Hi Nathan,
>
> > When building with -Wmissing-prototypes without CONFIG_GENERIC_BUG,
> > there is a warning about a missing prototype for is_valid_bugaddr():
> >
> > arch/s390/kernel/traps.c:46:5: warning: no previous prototype for 'is_valid_bugaddr' [-Wmissing-prototypes]
> > 46 | int is_valid_bugaddr(unsigned long addr)
> > | ^~~~~~~~~~~~~~~~
> >
> > The prototype is only declared with CONFIG_GENERIC_BUG, so only define
> > the function under the same condition to clear up the warning, which
> > matches other architectures.
>
> Thanks for the fix!
> The patch is fine, although I have not been able to reproduce the warning.
> How did you trigger it?
Thanks for taking a look! I am able to trigger this on v6.7-rc4 with:
# Flip off CONFIG_BUG in menuconfig
$ make -skj"$(nproc)" ARCH=s390 CROSS_COMPILE=s390-linux- KCFLAGS=-Wmissing-prototypes defconfig menuconfig arch/s390/kernel/traps.o
arch/s390/kernel/traps.c:46:5: warning: no previous prototype for 'is_valid_bugaddr' [-Wmissing-prototypes]
46 | int is_valid_bugaddr(unsigned long addr)
| ^~~~~~~~~~~~~~~~
I initially found this by testing just the tinyconfig target.
> > Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> > ---
> > arch/s390/kernel/traps.c | 2 ++
> > 1 file changed, 2 insertions(+)
> ...
>
> Thanks!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] s390/traps: Only define is_valid_bugaddr() under CONFIG_GENERIC_BUG
2023-12-01 0:22 ` [PATCH 2/2] s390/traps: Only define is_valid_bugaddr() under CONFIG_GENERIC_BUG Nathan Chancellor
2023-12-04 9:06 ` Alexander Gordeev
@ 2023-12-05 12:59 ` Alexander Gordeev
1 sibling, 0 replies; 8+ messages in thread
From: Alexander Gordeev @ 2023-12-05 12:59 UTC (permalink / raw)
To: Nathan Chancellor; +Cc: akpm, hca, gor, borntraeger, svens, linux-s390, patches
On Thu, Nov 30, 2023 at 05:22:33PM -0700, Nathan Chancellor wrote:
> When building with -Wmissing-prototypes without CONFIG_GENERIC_BUG,
> there is a warning about a missing prototype for is_valid_bugaddr():
>
> arch/s390/kernel/traps.c:46:5: warning: no previous prototype for 'is_valid_bugaddr' [-Wmissing-prototypes]
> 46 | int is_valid_bugaddr(unsigned long addr)
> | ^~~~~~~~~~~~~~~~
>
> The prototype is only declared with CONFIG_GENERIC_BUG, so only define
> the function under the same condition to clear up the warning, which
> matches other architectures.
>
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
> arch/s390/kernel/traps.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c
> index 1d2aa448d103..cc3e3a01dfa5 100644
> --- a/arch/s390/kernel/traps.c
> +++ b/arch/s390/kernel/traps.c
> @@ -43,10 +43,12 @@ static inline void __user *get_trap_ip(struct pt_regs *regs)
> return (void __user *) (address - (regs->int_code >> 16));
> }
>
> +#ifdef CONFIG_GENERIC_BUG
> int is_valid_bugaddr(unsigned long addr)
> {
> return 1;
> }
> +#endif
>
> void do_report_trap(struct pt_regs *regs, int si_signo, int si_code, char *str)
> {
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-12-05 12:59 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-01 0:22 [PATCH 0/2] s390: A couple of fixes for -Wmissing-prototypes Nathan Chancellor
2023-12-01 0:22 ` [PATCH 1/2] s390/dasd: Remove dasd_stats_generic_show() Nathan Chancellor
2023-12-04 7:41 ` Alexander Gordeev
2023-12-04 13:13 ` Stefan Haberland
2023-12-01 0:22 ` [PATCH 2/2] s390/traps: Only define is_valid_bugaddr() under CONFIG_GENERIC_BUG Nathan Chancellor
2023-12-04 9:06 ` Alexander Gordeev
2023-12-04 16:38 ` Nathan Chancellor
2023-12-05 12:59 ` Alexander Gordeev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox