* [dpdk-dev] [PATCH] checkpatches: suppress warning about strlcpy
@ 2021-09-10 17:54 Stephen Hemminger
2021-09-13 8:08 ` Bruce Richardson
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Stephen Hemminger @ 2021-09-10 17:54 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
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.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] checkpatches: suppress warning about strlcpy
2021-09-10 17:54 [dpdk-dev] [PATCH] checkpatches: suppress warning about strlcpy Stephen Hemminger
@ 2021-09-13 8:08 ` Bruce Richardson
2021-11-15 23:20 ` [PATCH v2] " Stephen Hemminger
2021-11-15 23:26 ` [PATCH v3] " Stephen Hemminger
2 siblings, 0 replies; 5+ messages in thread
From: Bruce Richardson @ 2021-09-13 8:08 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dev
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
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] checkpatches: suppress warning about strlcpy
2021-09-10 17:54 [dpdk-dev] [PATCH] checkpatches: suppress warning about strlcpy Stephen Hemminger
2021-09-13 8:08 ` Bruce Richardson
@ 2021-11-15 23:20 ` Stephen Hemminger
2021-11-15 23:26 ` [PATCH v3] " Stephen Hemminger
2 siblings, 0 replies; 5+ messages in thread
From: Stephen Hemminger @ 2021-11-15 23:20 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Bruce Richardson
Current version of Linux kernel checkpatch now complains about
usages of strlcpy because the Linux kernel perfers strcspy.
WARNING:STRLCPY: Prefer strscpy over strlcpy
But DPDK project allows strlcpy, therefore suppress the warning.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
v2 - fix typo in commit messag
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v3] checkpatches: suppress warning about strlcpy
2021-09-10 17:54 [dpdk-dev] [PATCH] checkpatches: suppress warning about strlcpy Stephen Hemminger
2021-09-13 8:08 ` Bruce Richardson
2021-11-15 23:20 ` [PATCH v2] " Stephen Hemminger
@ 2021-11-15 23:26 ` Stephen Hemminger
2021-11-26 10:15 ` Thomas Monjalon
2 siblings, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2021-11-15 23:26 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Bruce Richardson
Current version of Linux kernel checkpatch now complains about
usages of strlcpy because the Linux kernel prefers strcspy.
WARNING:STRLCPY: Prefer strscpy over strlcpy
But DPDK project allows strlcpy, therefore suppress the warning.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
v3 - yet another commit message typo
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3] checkpatches: suppress warning about strlcpy
2021-11-15 23:26 ` [PATCH v3] " Stephen Hemminger
@ 2021-11-26 10:15 ` Thomas Monjalon
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2021-11-26 10:15 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dev, Bruce Richardson
16/11/2021 00:26, Stephen Hemminger:
> Current version of Linux kernel checkpatch now complains about
> usages of strlcpy because the Linux kernel prefers strcspy.
>
> WARNING:STRLCPY: Prefer strscpy over strlcpy
>
> But DPDK project allows strlcpy, therefore suppress the warning.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> v3 - yet another commit message typo
There is yet another typo that I fixed: strcspy -> strscpy
Applied, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-11-26 10:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-10 17:54 [dpdk-dev] [PATCH] checkpatches: suppress warning about strlcpy Stephen Hemminger
2021-09-13 8:08 ` Bruce Richardson
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
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).