DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Adrian Moreno <amorenoz@redhat.com>
Cc: dev@dpdk.org, chenbo.xia@intel.com, david.marchand@redhat.com
Subject: Re: [dpdk-dev] [PATCH] devtools: ignore PREFER_FALLTHROUGH
Date: Wed, 05 Aug 2020 15:54:52 +0200	[thread overview]
Message-ID: <3554258.jWZQtkDrRB@thomas> (raw)
In-Reply-To: <3cabbc35-c774-bfa1-1584-1a4d911c4090@redhat.com>

05/08/2020 15:34, Adrian Moreno:
> Hi Thomas,
> 
> On 8/5/20 11:12 AM, Thomas Monjalon wrote:
> > 04/08/2020 09:38, Adrian Moreno:
> >> The PREFER_FALLTHROUGH check warns if a passthrough comment is found
> >> because, in the kernel, the special macro "fallthrough" is prefered.
> >>
> >> Since that keyword is not defined in DPDK, ignore the warning.
> > 
> > We could ask why not defining a similar keyword?
> > 
> 
> Surely, we can also add the keyword. Given that unintended fallthrough is
> already protected by the "MISSING_BREAK" and that fallthrough comments are
> already used in DPDK, I thought it made sense to ignore the check.

Yes this patch makes sense.
And anyway, we'll never use the same keyword as in kernel.

> If you prefer to add the keyword, let me ask:
> - Where is the right place for it? Maybe rte_common.h?

Yes

> - Should all the comments be replaced with the pseudo-keyword?

Yes

Before doing that, please send a RFC.
I remember we already tried that but failed.

> >> --- a/devtools/checkpatches.sh
> >> +++ b/devtools/checkpatches.sh
> >> @@ -33,7 +33,7 @@ VOLATILE,PREFER_PACKED,PREFER_ALIGNED,PREFER_PRINTF,\
> >>  PREFER_KERNEL_TYPES,BIT_MACRO,CONST_STRUCT,\
> >>  SPLIT_STRING,LONG_LINE_STRING,C99_COMMENT_TOLERANCE,\
> >>  LINE_SPACING,PARENTHESIS_ALIGNMENT,NETWORKING_BLOCK_COMMENT_STYLE,\
> >> -NEW_TYPEDEFS,COMPARISON_TO_NULL"
> >> +NEW_TYPEDEFS,COMPARISON_TO_NULL,PREFER_FALLTHROUGH"
> > 
> > I would add this option between PREFER_KERNEL_TYPES and BIT_MACRO
> > to maintain a bit of logic ordering.
> > 
> OK. I'll reorder it if the final decision is to ignore the check.

Yes thanks



  reply	other threads:[~2020-08-05 13:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-04  7:38 Adrian Moreno
2020-08-04  7:43 ` Ferruh Yigit
2020-08-04  8:00 ` Xia, Chenbo
2020-08-05  9:12 ` Thomas Monjalon
2020-08-05 13:34   ` Adrian Moreno
2020-08-05 13:54     ` Thomas Monjalon [this message]
2020-08-07 11:35       ` Thomas Monjalon

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=3554258.jWZQtkDrRB@thomas \
    --to=thomas@monjalon.net \
    --cc=amorenoz@redhat.com \
    --cc=chenbo.xia@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).