All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Federico Serafini <federico.serafini@bugseng.com>
Cc: xen-devel@lists.xenproject.org, consulting@bugseng.com,
	Jan Beulich <jbeulich@suse.com>,
	Stefano Stabellini <sstabellini@kernel.org>
Subject: Re: [XEN PATCH v2 4/4] xen/pci: address a violation of MISRA C Rule 16.3
Date: Fri, 11 Oct 2024 10:45:46 +0200	[thread overview]
Message-ID: <ZwjlurKU7FrFvObG@macbook.local> (raw)
In-Reply-To: <c662cae0f545a4e4e3921ae13bf69dc02884d9ee.1728308312.git.federico.serafini@bugseng.com>

On Mon, Oct 07, 2024 at 04:16:19PM +0200, Federico Serafini wrote:
> Refactor the code to avoid an implicit fallthrough and address
> a violation of MISRA C:2012 Rule 16.3: "An unconditional `break'
> statement shall terminate every switch-clause".
> 
> No functional change.
> 
> Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
> ---
> Changes in v2:
> - improved description.
> ---
>  xen/drivers/passthrough/pci.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c
> index 5a446d3dce..a5705def3f 100644
> --- a/xen/drivers/passthrough/pci.c
> +++ b/xen/drivers/passthrough/pci.c
> @@ -170,8 +170,10 @@ static int __init cf_check parse_phantom_dev(const char *str)
>      {
>      case 1: case 2: case 4:
>          if ( *s )
> -    default:
>              return -EINVAL;
> +        break;

Would you mind adding a newline here between the break and the default
case?

With that:

Acked-by: Roger Pau Monné <roger.pau@citrix.com>

Thanks, Roger.


  parent reply	other threads:[~2024-10-11  8:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-07 14:16 [XEN PATCH v2 0/4] x86: address violations of MISRA C Rule 16.3 Federico Serafini
2024-10-07 14:16 ` [XEN PATCH v2 1/4] x86/emul: add defensive code Federico Serafini
2024-10-07 14:24   ` Jan Beulich
2024-10-07 14:16 ` [XEN PATCH v2 2/4] x86/emul: address violations of MISRA C Rule 16.3 Federico Serafini
2024-10-07 14:28   ` Jan Beulich
2024-10-07 14:16 ` [XEN PATCH v2 3/4] xen/vpci: " Federico Serafini
2024-10-07 21:44   ` Stefano Stabellini
2024-10-11  8:43     ` Roger Pau Monné
2024-10-07 14:16 ` [XEN PATCH v2 4/4] xen/pci: address a violation " Federico Serafini
2024-10-07 21:45   ` Stefano Stabellini
2024-10-11  8:45   ` Roger Pau Monné [this message]
2024-10-11  8:48     ` Jan Beulich
2024-10-11  9:03       ` Roger Pau Monné

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=ZwjlurKU7FrFvObG@macbook.local \
    --to=roger.pau@citrix.com \
    --cc=consulting@bugseng.com \
    --cc=federico.serafini@bugseng.com \
    --cc=jbeulich@suse.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.