Linux s390 Architecture development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Mete Durlu" <meted@linux.ibm.com>
Cc: "Heiko Carstens" <hca@linux.ibm.com>,
	"Alexander Gordeev" <agordeev@linux.ibm.com>,
	linux-s390@vger.kernel.org, "Vasily Gorbik" <gor@linux.ibm.com>
Subject: Re: [PATCH v2 3/3] sparc: Implement arch_do_panic
Date: Mon, 27 Jul 2026 10:49:06 +0000	[thread overview]
Message-ID: <20260727104907.3B03C1F00A3D@smtp.kernel.org> (raw)
In-Reply-To: <20260727-arch_do_panic-v2-3-4e25ceb05075@linux.ibm.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] The function `arch_do_panic` is defined without a visible prototype, triggering a `-Wmissing-prototypes` compiler warning.
- [Low] Redundant local `extern` declaration of `stop_a_enabled`.
--

--- Patch [3]: [PATCH v2 3/3] sparc: Implement arch_do_panic ---
commit ab46dd14f9e80619721232e0fc090eea0709afa1
Author: Mete Durlu <meted@linux.ibm.com>

sparc: Implement arch_do_panic

Implement sparc specific arch_do_panic() instead of using sparc specific
ifdef sections in vpanic() code.

> diff --git a/arch/sparc/kernel/setup.c b/arch/sparc/kernel/setup.c
> index 4975867d9001b..87d3569c520f8 100644
> --- a/arch/sparc/kernel/setup.c
> +++ b/arch/sparc/kernel/setup.c

[ ... ]

> @@ -36,6 +36,14 @@ static const struct ctl_table sparc_sysctl_table[] = {
>  #endif
>  };
>  
> +void arch_do_panic(void)

[Severity: Low]
Does this trigger a -Wmissing-prototypes compiler warning? The patch
declares arch_do_panic() in arch/sparc/include/asm/bug.h, but fails to
include that header (or linux/bug.h) here where the function is actually
implemented. 

While it might appear that asm/setup.h indirectly includes linux/bug.h
via linux/interrupt.h -> linux/jump_label.h, the jump_label.h header
only includes linux/bug.h if CONFIG_JUMP_LABEL is disabled. If enabled,
the indirect inclusion path is broken. Could we add a direct include of
linux/bug.h or asm/bug.h to ensure safety across all configurations?

> +{
> +	extern int stop_a_enabled;

[Severity: Low]
Is this local extern declaration still needed? Because
arch/sparc/kernel/setup.c directly includes asm/setup.h at the top of the
file, stop_a_enabled is already globally declared for all configurations.

Could we remove this redundant block-scope declaration that was leftover
from when the code resided in kernel/panic.c?

> +	/* Make sure the user can actually press Stop-A (L1-A) */
> +	stop_a_enabled = 1;
> +	pr_emerg("Press Stop-A (L1-A) from sun keyboard or send break\n"
> +		 "twice on console to return to the boot prom\n");
> +}

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260727-arch_do_panic-v2-0-4e25ceb05075@linux.ibm.com?part=3

  reply	other threads:[~2026-07-27 10:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-27 10:36 [PATCH v2 0/3] Introduce arch_do_panic Mete Durlu
2026-07-27 10:36 ` [PATCH v2 1/3] panic: " Mete Durlu
2026-07-27 10:43   ` sashiko-bot
2026-07-27 12:59   ` Bradley Morgan
2026-07-27 10:36 ` [PATCH v2 2/3] s390: Implement arch_do_panic Mete Durlu
2026-07-27 10:52   ` sashiko-bot
2026-07-27 13:01   ` Bradley Morgan
2026-07-27 10:36 ` [PATCH v2 3/3] sparc: " Mete Durlu
2026-07-27 10:49   ` sashiko-bot [this message]
2026-07-27 13:02   ` Bradley Morgan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260727104907.3B03C1F00A3D@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=agordeev@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=meted@linux.ibm.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox