DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] checkpatches: suppress warning about strlcpy
Date: Mon, 13 Sep 2021 09:08:49 +0100	[thread overview]
Message-ID: <YT8HEaB+Il348bBt@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <20210910175443.527801-1-stephen@networkplumber.org>

On Fri, Sep 10, 2021 at 10:54:43AM -0700, Stephen Hemminger wrote:
> Latest versions of Linux kernel checkpatch now complain about
> uses of strlcpy (kernel perfers strcspy).
> 
> WARNING:STRLCPY: Prefer strscpy over strlcpy
> 
> But DPDK does not have strcspy so suppress the warning.
                           ^^^
typo :-)
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

We actually do have an rte_strscpy function, but on the other hand I
believe that strlcpy should very much also be acceptable.

Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>  devtools/checkpatches.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
> index c314d83a29d3..057208c8e1ea 100755
> --- a/devtools/checkpatches.sh
> +++ b/devtools/checkpatches.sh
> @@ -33,7 +33,7 @@ VOLATILE,PREFER_PACKED,PREFER_ALIGNED,PREFER_PRINTF,\
>  PREFER_KERNEL_TYPES,PREFER_FALLTHROUGH,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,STRLCPY"
>  options="$options $DPDK_CHECKPATCH_OPTIONS"
>  
>  print_usage () {
> -- 
> 2.30.2
> 

  reply	other threads:[~2021-09-13  8:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-10 17:54 Stephen Hemminger
2021-09-13  8:08 ` Bruce Richardson [this message]
2021-11-15 23:20 ` [PATCH v2] " Stephen Hemminger
2021-11-15 23:26 ` [PATCH v3] " Stephen Hemminger
2021-11-26 10:15   ` 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=YT8HEaB+Il348bBt@bricha3-MOBL.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=stephen@networkplumber.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).