All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
To: Stefano Stabellini <sstabellini@kernel.org>
Cc: Dmytro Prokopchuk1 <dmytro_prokopchuk1@epam.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	Julien Grall <julien@xen.org>,
	Bertrand Marquis <bertrand.marquis@arm.com>,
	Michal Orzel <michal.orzel@amd.com>,
	Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>,
	"Daniel P. Smith" <dpsmith@apertussolutions.com>,
	Jan Beulich <jbeulich@suse.com>
Subject: Re: [PATCH] xen: add missing noreturn attribute
Date: Fri, 25 Jul 2025 22:07:54 +0200	[thread overview]
Message-ID: <aIPkGgAii3rc2hsN@mail-itl> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2507241806210.2549622@ubuntu-linux-20-04-desktop>

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

On Thu, Jul 24, 2025 at 06:06:28PM -0700, Stefano Stabellini wrote:
> On Thu, 24 Jul 2025, Dmytro Prokopchuk1 wrote:
> > These functions never return to their caller,
> > causing a violation of MISRA C Rule 2.1:
> > "A project shall not contain unreachable code".
> > Add the `noreturn' attribute to fix this.
> > 
> > No functional changes.
> > 
> > Signed-off-by: Dmytro Prokopchuk <dmytro_prokopchuk1@epam.com>
> 
> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>

Acked-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> # EFI

> 
> 
> > ---
> >  xen/arch/arm/domain.c  | 2 +-
> >  xen/arch/arm/setup.c   | 2 +-
> >  xen/arch/arm/smpboot.c | 2 +-
> >  xen/common/efi/boot.c  | 2 +-
> >  4 files changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
> > index 79a144e61b..310c578909 100644
> > --- a/xen/arch/arm/domain.c
> > +++ b/xen/arch/arm/domain.c
> > @@ -298,7 +298,7 @@ static void schedule_tail(struct vcpu *prev)
> >  extern void noreturn return_to_new_vcpu32(void);
> >  extern void noreturn return_to_new_vcpu64(void);
> >  
> > -static void continue_new_vcpu(struct vcpu *prev)
> > +static void noreturn continue_new_vcpu(struct vcpu *prev)
> >  {
> >      current->arch.actlr = READ_SYSREG(ACTLR_EL1);
> >      processor_vcpu_initialise(current);
> > diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
> > index 27bd3f5a6e..bb35afe56c 100644
> > --- a/xen/arch/arm/setup.c
> > +++ b/xen/arch/arm/setup.c
> > @@ -306,7 +306,7 @@ void __init init_pdx(void)
> >  size_t __read_mostly dcache_line_bytes;
> >  
> >  /* C entry point for boot CPU */
> > -void asmlinkage __init start_xen(unsigned long fdt_paddr)
> > +void asmlinkage __init noreturn start_xen(unsigned long fdt_paddr)
> >  {
> >      size_t fdt_size;
> >      const char *cmdline;
> > diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c
> > index 73de7503e9..7f3cfa812e 100644
> > --- a/xen/arch/arm/smpboot.c
> > +++ b/xen/arch/arm/smpboot.c
> > @@ -315,7 +315,7 @@ smp_prepare_cpus(void)
> >  }
> >  
> >  /* Boot the current CPU */
> > -void asmlinkage start_secondary(void)
> > +void asmlinkage noreturn start_secondary(void)
> >  {
> >      unsigned int cpuid = init_data.cpuid;
> >  
> > diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c
> > index df29444220..4b60bd719e 100644
> > --- a/xen/common/efi/boot.c
> > +++ b/xen/common/efi/boot.c
> > @@ -285,7 +285,7 @@ static bool __init match_guid(const EFI_GUID *guid1, const EFI_GUID *guid2)
> >  }
> >  
> >  /* generic routine for printing error messages */
> > -static void __init PrintErrMesg(const CHAR16 *mesg, EFI_STATUS ErrCode)
> > +static void __init noreturn PrintErrMesg(const CHAR16 *mesg, EFI_STATUS ErrCode)
> >  {
> >      StdOut = StdErr;
> >      PrintErr(mesg);
> > -- 
> > 2.43.0
> > 

-- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab

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

      reply	other threads:[~2025-07-25 20:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-24 22:53 [PATCH] xen: add missing noreturn attribute Dmytro Prokopchuk1
2025-07-25  1:06 ` Stefano Stabellini
2025-07-25 20:07   ` Marek Marczykowski-Górecki [this message]

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=aIPkGgAii3rc2hsN@mail-itl \
    --to=marmarek@invisiblethingslab.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=bertrand.marquis@arm.com \
    --cc=dmytro_prokopchuk1@epam.com \
    --cc=dpsmith@apertussolutions.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /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 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.