All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
	Stefano Stabellini <sstabellini@kernel.org>
Cc: george.dunlap@citrix.com, julien@xen.org,
	bertrand.marquis@arm.com, roger.pau@citrix.com,
	xen-devel@lists.xenproject.org, roberto.bagnara@bugseng.com,
	federico.serafini@bugseng.com
Subject: Re: [PATCH v2] docs/misra/rules.rst: add more rules
Date: Mon, 11 Dec 2023 12:20:03 +0100	[thread overview]
Message-ID: <8ebe1be6-e082-4716-9da9-5534f9f84a97@suse.com> (raw)
In-Reply-To: <1974e461-78f8-4a5c-90f2-d637ee3341e7@citrix.com>

On 11.12.2023 11:53, Andrew Cooper wrote:
> On 08/12/2023 12:09 am, Stefano Stabellini wrote:
>> Add the rules accepted in the last three MISRA C working group meetings.
>>
>> Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
>> ---
>> Changes in v2:
>> - remove 17.1 for now, to be a separate patch
>> - add a clarification comment for 17.7
>> ---
>>  docs/misra/rules.rst | 34 ++++++++++++++++++++++++++++++++++
>>  1 file changed, 34 insertions(+)
>>
>> diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst
>> index 75921b9a34..2b570af0e0 100644
>> --- a/docs/misra/rules.rst
>> +++ b/docs/misra/rules.rst
>> @@ -462,6 +462,13 @@ maintainers if you want to suggest a change.
>>  
>>         while(0) and while(1) and alike are allowed.
>>  
>> +   * - `Rule 16.3 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_16_03.c>`_
>> +     - Required
>> +     - An unconditional break statement shall terminate every
>> +       switch-clause
>> +     - In addition to break, also other flow control statements such as
>> +       continue, return, goto are allowed.
> 
> And what about fallthrough ?
> 
> $ git grep -iwe fallthrough -e "fall through" | wc -l
> 315
> 
> This is an under-estimate because there are other comment based
> justifications too.
> 
> All are an explicit statement that a break, or other control flow
> statement, is wrong in the given context.

But that's going to be documented in deviations.rst according to my
understanding.

Jan


      reply	other threads:[~2023-12-11 11:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-08  0:09 [PATCH v2] docs/misra/rules.rst: add more rules Stefano Stabellini
2023-12-08  7:18 ` Jan Beulich
2023-12-09  1:36   ` Stefano Stabellini
2023-12-11 10:53 ` Andrew Cooper
2023-12-11 11:20   ` Jan Beulich [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=8ebe1be6-e082-4716-9da9-5534f9f84a97@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=bertrand.marquis@arm.com \
    --cc=federico.serafini@bugseng.com \
    --cc=george.dunlap@citrix.com \
    --cc=julien@xen.org \
    --cc=roberto.bagnara@bugseng.com \
    --cc=roger.pau@citrix.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.