From: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
To: Stefano Stabellini <sstabellini@kernel.org>
Cc: Federico Serafini <federico.serafini@bugseng.com>,
xen-devel@lists.xenproject.org, consulting@bugseng.com,
"Daniel P. Smith" <dpsmith@apertussolutions.com>,
Jan Beulich <jbeulich@suse.com>,
Andrew Cooper <andrew.cooper3@citrix.com>
Subject: Re: [XEN PATCH v2 1/3] EFI: address a violation of MISRA C Rule 13.6
Date: Fri, 4 Oct 2024 23:16:39 +0200 [thread overview]
Message-ID: <ZwBbOAyfmgtjYcse@mail-itl> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2410021736050.1138574@ubuntu-linux-20-04-desktop>
[-- Attachment #1: Type: text/plain, Size: 1016 bytes --]
On Wed, Oct 02, 2024 at 05:36:47PM -0700, Stefano Stabellini wrote:
> On Mon, 30 Sep 2024, Federico Serafini wrote:
> > guest_handle_ok()'s expansion contains a sizeof() involving its
> > first argument which is guest_handle_cast().
> > The expansion of the latter, in turn, contains a variable
> > initialization.
> >
> > Since MISRA considers the initialization (even of a local variable)
> > a side effect, the chain of expansions mentioned above violates
> > MISRA C:2012 Rule 13.6 (The operand of the `sizeof' operator shall not
> > contain any expression which has potential side effect).
> >
> > Refactor the code to address the rule violation.
> >
> > Suggested-by: Andrew Cooper <andrew.cooper3@citrix.com>
> > Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
>
> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
--
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2024-10-04 21:17 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-30 12:49 [XEN PATCH v2 0/3] xen: address violations of MISRA C Rule 13.6 Federico Serafini
2024-09-30 12:49 ` [XEN PATCH v2 1/3] EFI: address a violation " Federico Serafini
2024-09-30 13:07 ` Jan Beulich
2024-10-01 5:25 ` Roberto Bagnara
2024-10-01 6:32 ` Jan Beulich
2024-10-01 21:36 ` Stefano Stabellini
2024-10-02 6:09 ` Jan Beulich
2024-10-02 6:54 ` Roberto Bagnara
2024-10-08 5:59 ` Jan Beulich
2024-10-08 12:49 ` Roberto Bagnara
2024-10-08 13:00 ` Marek Marczykowski-Górecki
2024-10-08 13:41 ` Jan Beulich
2024-10-03 0:36 ` Stefano Stabellini
2024-10-04 21:16 ` Marek Marczykowski-Górecki [this message]
2024-09-30 12:49 ` [XEN PATCH v2 2/3] xen/gnttab: " Federico Serafini
2024-09-30 22:53 ` Stefano Stabellini
2024-10-01 9:54 ` Jan Beulich
2024-10-01 21:35 ` Stefano Stabellini
2024-09-30 12:49 ` [XEN PATCH v2 3/3] automation/eclair: tag Rule 13.6 as clean Federico Serafini
2024-10-03 0:37 ` Stefano Stabellini
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=ZwBbOAyfmgtjYcse@mail-itl \
--to=marmarek@invisiblethingslab.com \
--cc=andrew.cooper3@citrix.com \
--cc=consulting@bugseng.com \
--cc=dpsmith@apertussolutions.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.