* [dpdk-dev] coding style question - c99 comments @ 2020-01-23 16:05 Lance Richardson 2020-01-23 16:15 ` Stephen Hemminger 0 siblings, 1 reply; 7+ messages in thread From: Lance Richardson @ 2020-01-23 16:05 UTC (permalink / raw) To: dev The DPDK Coding Style document doesn't mention the use of c99 comments using '//' as a comment delimiter, but it does say that traditional '/* */' comment delimiters should be used and therefore seems to imply that c99-style comments are not allowed. Is this correct? Lance ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] coding style question - c99 comments 2020-01-23 16:05 [dpdk-dev] coding style question - c99 comments Lance Richardson @ 2020-01-23 16:15 ` Stephen Hemminger 2020-01-23 16:43 ` Lance Richardson 0 siblings, 1 reply; 7+ messages in thread From: Stephen Hemminger @ 2020-01-23 16:15 UTC (permalink / raw) To: Lance Richardson; +Cc: dev On Thu, 23 Jan 2020 11:05:58 -0500 Lance Richardson <lance.richardson@broadcom.com> wrote: > The DPDK Coding Style document doesn't mention the use of c99 comments > using '//' as a comment delimiter, but it does say that traditional > '/* */' comment > delimiters should be used and therefore seems to imply that c99-style comments > are not allowed. > > Is this correct? > > Lance Don't use c99 comments. These will get flagged by checkpatch ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] coding style question - c99 comments 2020-01-23 16:15 ` Stephen Hemminger @ 2020-01-23 16:43 ` Lance Richardson 2020-01-24 17:07 ` Ferruh Yigit 0 siblings, 1 reply; 7+ messages in thread From: Lance Richardson @ 2020-01-23 16:43 UTC (permalink / raw) To: Stephen Hemminger; +Cc: dev On Thu, Jan 23, 2020 at 11:15 AM Stephen Hemminger <stephen@networkplumber.org> wrote: > > On Thu, 23 Jan 2020 11:05:58 -0500 > Lance Richardson <lance.richardson@broadcom.com> wrote: > > > The DPDK Coding Style document doesn't mention the use of c99 comments > > using '//' as a comment delimiter, but it does say that traditional > > '/* */' comment > > delimiters should be used and therefore seems to imply that c99-style comments > > are not allowed. > > > > Is this correct? > > > > Lance > > Don't use c99 comments. > These will get flagged by checkpatch Hi Stephen, Actually, the reason I was asking was they aren't being flagged by checkpatch. It seems checkpatch.pl now has this: my $allow_c99_comments = 1; # Can be overridden by --ignore C99_COMMENT_TOLERANCE If c99 comments are should not be allowed, it looks like C99_COMMENT_TOLERANCE should be added to the list of checkers to ignore in checkpatches.sh. I was thinking of rolling a patch, but wanted to first confirm that they are actually not allowed. Thanks, Lance ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] coding style question - c99 comments 2020-01-23 16:43 ` Lance Richardson @ 2020-01-24 17:07 ` Ferruh Yigit 2020-01-24 21:37 ` Lance Richardson 2020-02-15 17:09 ` [dpdk-dev] [PATCH v2] devtools: check c99 comment use in checkpatches.sh Lance Richardson 0 siblings, 2 replies; 7+ messages in thread From: Ferruh Yigit @ 2020-01-24 17:07 UTC (permalink / raw) To: Lance Richardson, Stephen Hemminger; +Cc: dev On 1/23/2020 4:43 PM, Lance Richardson wrote: > On Thu, Jan 23, 2020 at 11:15 AM Stephen Hemminger > <stephen@networkplumber.org> wrote: >> >> On Thu, 23 Jan 2020 11:05:58 -0500 >> Lance Richardson <lance.richardson@broadcom.com> wrote: >> >>> The DPDK Coding Style document doesn't mention the use of c99 comments >>> using '//' as a comment delimiter, but it does say that traditional >>> '/* */' comment >>> delimiters should be used and therefore seems to imply that c99-style comments >>> are not allowed. >>> >>> Is this correct? >>> >>> Lance >> >> Don't use c99 comments. >> These will get flagged by checkpatch > > Hi Stephen, > > Actually, the reason I was asking was they aren't being flagged by checkpatch. > > It seems checkpatch.pl now has this: > my $allow_c99_comments = 1; # Can be overridden by --ignore > C99_COMMENT_TOLERANCE > > If c99 comments are should not be allowed, it looks like > C99_COMMENT_TOLERANCE should > be added to the list of checkers to ignore in checkpatches.sh. I was > thinking of rolling a patch, > but wanted to first confirm that they are actually not allowed. > Hi Lance, That is what I understand from coding style document that c99 comments are not allowed and agree to not use them. +1 to add C99_COMMENT_TOLERANCE ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] coding style question - c99 comments 2020-01-24 17:07 ` Ferruh Yigit @ 2020-01-24 21:37 ` Lance Richardson 2020-02-15 17:09 ` [dpdk-dev] [PATCH v2] devtools: check c99 comment use in checkpatches.sh Lance Richardson 1 sibling, 0 replies; 7+ messages in thread From: Lance Richardson @ 2020-01-24 21:37 UTC (permalink / raw) To: Ferruh Yigit; +Cc: Stephen Hemminger, dev Thanks, a patch adding C99_COMMENT_TOLERANCE has been posted. Lance On Fri, Jan 24, 2020 at 12:10 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote: > On 1/23/2020 4:43 PM, Lance Richardson wrote: > > On Thu, Jan 23, 2020 at 11:15 AM Stephen Hemminger > > <stephen@networkplumber.org> wrote: > >> > >> On Thu, 23 Jan 2020 11:05:58 -0500 > >> Lance Richardson <lance.richardson@broadcom.com> wrote: > >> > >>> The DPDK Coding Style document doesn't mention the use of c99 comments > >>> using '//' as a comment delimiter, but it does say that traditional > >>> '/* */' comment > >>> delimiters should be used and therefore seems to imply that c99-style > comments > >>> are not allowed. > >>> > >>> Is this correct? > >>> > >>> Lance > >> > >> Don't use c99 comments. > >> These will get flagged by checkpatch > > > > Hi Stephen, > > > > Actually, the reason I was asking was they aren't being flagged by > checkpatch. > > > > It seems checkpatch.pl now has this: > > my $allow_c99_comments = 1; # Can be overridden by --ignore > > C99_COMMENT_TOLERANCE > > > > If c99 comments are should not be allowed, it looks like > > C99_COMMENT_TOLERANCE should > > be added to the list of checkers to ignore in checkpatches.sh. I was > > thinking of rolling a patch, > > but wanted to first confirm that they are actually not allowed. > > > > Hi Lance, > > That is what I understand from coding style document that c99 comments are > not > allowed and agree to not use them. > > +1 to add C99_COMMENT_TOLERANCE > > ^ permalink raw reply [flat|nested] 7+ messages in thread
* [dpdk-dev] [PATCH v2] devtools: check c99 comment use in checkpatches.sh 2020-01-24 17:07 ` Ferruh Yigit 2020-01-24 21:37 ` Lance Richardson @ 2020-02-15 17:09 ` Lance Richardson 2020-02-22 19:52 ` Thomas Monjalon 1 sibling, 1 reply; 7+ messages in thread From: Lance Richardson @ 2020-02-15 17:09 UTC (permalink / raw) To: thomas; +Cc: dev, Lance Richardson C99-style comments are not permitted according to DPDK coding style guidelines, enable checking for these by checkpatch.pl. Signed-off-by: Lance Richardson <lance.richardson@broadcom.com> --- v2: * Fixed a typo in commit message. devtools/checkpatches.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh index b16bace92..c996a8780 100755 --- 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,\ LINE_SPACING,PARENTHESIS_ALIGNMENT,NETWORKING_BLOCK_COMMENT_STYLE,\ -NEW_TYPEDEFS,COMPARISON_TO_NULL" +NEW_TYPEDEFS,COMPARISON_TO_NULL,C99_COMMENT_TOLERANCE" options="$options $DPDK_CHECKPATCH_OPTIONS" print_usage () { -- 2.17.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH v2] devtools: check c99 comment use in checkpatches.sh 2020-02-15 17:09 ` [dpdk-dev] [PATCH v2] devtools: check c99 comment use in checkpatches.sh Lance Richardson @ 2020-02-22 19:52 ` Thomas Monjalon 0 siblings, 0 replies; 7+ messages in thread From: Thomas Monjalon @ 2020-02-22 19:52 UTC (permalink / raw) To: Lance Richardson; +Cc: dev 15/02/2020 18:09, Lance Richardson: > C99-style comments are not permitted according to DPDK coding > style guidelines, enable checking for these by checkpatch.pl. > > Signed-off-by: Lance Richardson <lance.richardson@broadcom.com> Applied, thanks ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-02-22 19:52 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-01-23 16:05 [dpdk-dev] coding style question - c99 comments Lance Richardson 2020-01-23 16:15 ` Stephen Hemminger 2020-01-23 16:43 ` Lance Richardson 2020-01-24 17:07 ` Ferruh Yigit 2020-01-24 21:37 ` Lance Richardson 2020-02-15 17:09 ` [dpdk-dev] [PATCH v2] devtools: check c99 comment use in checkpatches.sh Lance Richardson 2020-02-22 19:52 ` Thomas Monjalon
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).