All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicola Vetrini <nicola.vetrini@bugseng.com>
To: Julien Grall <julien@xen.org>
Cc: xen-devel@lists.xenproject.org, sstabellini@kernel.org,
	michal.orzel@amd.com, xenia.ragiadakou@amd.com,
	ayan.kumar.halder@amd.com, consulting@bugseng.com,
	jbeulich@suse.com, andrew.cooper3@citrix.com,
	roger.pau@citrix.com,
	Simone Ballarin <simone.ballarin@bugseng.com>,
	Doug Goldstein <cardoe@cardoe.com>,
	George Dunlap <george.dunlap@citrix.com>, Wei Liu <wl@xen.org>
Subject: Re: [XEN PATCH][for-4.19 1/2] xen: introduce a deviation for Rule 11.9
Date: Fri, 06 Oct 2023 11:58:03 +0200	[thread overview]
Message-ID: <2aafb9710b4754e8d57acc1f769693b4@bugseng.com> (raw)
In-Reply-To: <605f8045-754d-4d3c-b1b3-3bb34112bfc8@xen.org>

On 06/10/2023 11:27, Julien Grall wrote:
> Hi,
> 
> On 05/10/2023 09:45, Nicola Vetrini wrote:
>> The constant 0 is used instead of NULL in '__ACCESS_ONCE' as a
>> compile-time check to detect non-scalar types; its usage for this
>> purpose is documented in rules.rst as an exception.
> Documenting ACCESS_ONCE() in rules.rst seems a bit odd. I am guessing
> that other analysis tool may point out the same error and therefore it
> would seem more appropriate to use a deviation.
> 
> This would also avoid having a specific rule in the Eclair
> configuration for __ACCESS_ONCE().
> 

I figured a single accepted use would benefit from an explicit 
exclusion.
I can rework it to use an in-code comment to deviate, in whatever form 
that comment may be
(still with some bits of ECLAIR-specific configuration anyway, as 
discussed for R2.1).

>> 
>> Furthermore, the 'access_field' and 'typeof_field' macros are
>> introduced as a general way to deal with accesses to structs
>> without declaring a struct variable.
>> 
>> Cleanup of spurious MISRA deviations.
> 
> Please don't do that. This is making the review of the patches a lot
> more complicated because there are unrelated changes (see [1]).
> 
> We often allow simple clean-up if they are in the context. But this is
> not the case here.
> 

Understood. There will be a separate MISRA deviations cleanup/update 
patch anyway,
so these can be included there.


> [1] 
> https://wiki.xenproject.org/wiki/Submitting_Xen_Project_Patches#What_is_in_a_patch_series.3F

-- 
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)


  reply	other threads:[~2023-10-06  9:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-05  8:45 [XEN PATCH][for-4.19 0/2] address violations of MISRA C:2012 Rule 11.9 Nicola Vetrini
2023-10-05  8:45 ` [XEN PATCH][for-4.19 1/2] xen: introduce a deviation for " Nicola Vetrini
2023-10-06  1:06   ` Stefano Stabellini
2023-10-06  9:27   ` Julien Grall
2023-10-06  9:58     ` Nicola Vetrini [this message]
2023-10-06 12:33       ` Julien Grall
2023-10-07  0:33         ` Stefano Stabellini
2023-10-10  9:54           ` Nicola Vetrini
2023-10-05  8:45 ` [XEN PATCH][for-4.19 2/2] xen/spinlock: fix use of 0 as a null pointer constant Nicola Vetrini
2023-10-06  1:07   ` Stefano Stabellini
2023-10-06 19:16     ` andrew.cooper3

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=2aafb9710b4754e8d57acc1f769693b4@bugseng.com \
    --to=nicola.vetrini@bugseng.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ayan.kumar.halder@amd.com \
    --cc=cardoe@cardoe.com \
    --cc=consulting@bugseng.com \
    --cc=george.dunlap@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=roger.pau@citrix.com \
    --cc=simone.ballarin@bugseng.com \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    --cc=xenia.ragiadakou@amd.com \
    /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.