Re: [PATCH] staging: media: tegra-vde: Align line break to match with the open parenthesis in file trace.h

2021-04-13 Thread Dwaipayan Ray
On Tue, Apr 13, 2021 at 8:59 PM Thierry Reding wrote: > > On Mon, Apr 12, 2021 at 07:20:40PM -0300, Aline Santana Cordeiro wrote: > > Align line break to match with the open parenthesis. > > Issue detected by checkpatch.pl. > > It consequently solved a few end lines with a '(', > > issue also

[PATCH -next v4] docs: document all error message types in checkpatch

2021-03-22 Thread Dwaipayan Ray
All the error message types now have a verbose description. Also there are two new groups of message types: - Macros, Attributes and Symbols - Functions and Variables Rearrange the message types to fit these new groups as needed. Reviewed-by: Lukas Bulwahn Signed-off-by: Dwaipayan Ray

[PATCH] checkpatch: remove check for include/asm modifications

2021-03-18 Thread Dwaipayan Ray
include/asm/ got removed over a decade back. checkpatch still has a check for it: MODIFIED_INCLUDE_ASM Remove the check as it is no longer useful. Signed-off-by: Dwaipayan Ray --- scripts/checkpatch.pl | 4 1 file changed, 4 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts

Re: Checkpatch still worries about include/asm/ ?

2021-03-18 Thread Dwaipayan Ray
On Thu, Mar 18, 2021 at 10:33 PM Lukas Bulwahn wrote: > > On Thu, Mar 18, 2021 at 5:47 PM Dwaipayan Ray wrote: > > > > Hello, > > include/asm/ got removed a long time back (probably v1.1.45). > > Checkpatch still worries about that: > > > > if (

Checkpatch still worries about include/asm/ ?

2021-03-18 Thread Dwaipayan Ray
Hello, include/asm/ got removed a long time back (probably v1.1.45). Checkpatch still worries about that: if ($realfile =~ m@^include/asm/@) { ERROR("MODIFIED_INCLUDE_ASM", "do not modify files in include/asm, change architecture specific files in include/asm-\n" . "$here$rawline\n"); } Can we

[PATCH v8 3/3] MAINTAINERS: clarify responsibility for checkpatch documentation

2021-02-26 Thread Dwaipayan Ray
as reviewers to the counterpart. Link: https://lore.kernel.org/lkml/bcee822d1934772f47702ee257bc735c8f467088.ca...@perches.com/ Signed-off-by: Lukas Bulwahn Signed-off-by: Dwaipayan Ray --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index

[PATCH v8 2/3] checkpatch: add verbose mode

2021-02-26 Thread Dwaipayan Ray
. Verbose mode can be used with the --list-types option. The --list-types output also supports color coding now. Signed-off-by: Dwaipayan Ray --- scripts/checkpatch.pl | 133 +++--- 1 file changed, 113 insertions(+), 20 deletions(-) diff --git a/scripts

[PATCH v8 1/3] docs: add documentation for checkpatch

2021-02-26 Thread Dwaipayan Ray
Add documentation for kernel script checkpatch.pl. This documentation is also parsed by checkpatch to enable a verbose mode. The checkpatch message types are grouped by usage. Under each group the types are described briefly. 34 of such types are documented. Signed-off-by: Dwaipayan Ray

[PATCH v8 0/3] checkpatch: add verbose mode

2021-02-26 Thread Dwaipayan Ray
of --terse with --verbose simpler Changes in v3: - Simplify documentation file parsing in checkpatch - Document a total of 33 message types for checkpatch Changes in v2: - Use .rst Field Lists to specify the type descriptions. - Add a few more type descriptions to documentation. Dwaipayan Ray (2

Re: [PATCH v7 0/2] checkpatch: add verbose mode

2021-02-26 Thread Dwaipayan Ray
On Fri, Feb 26, 2021 at 11:29 AM Lukas Bulwahn wrote: > > On Thu, Feb 25, 2021 at 7:08 PM Dwaipayan Ray wrote: > > > > On Thu, Feb 25, 2021 at 11:03 PM Joe Perches wrote: > > > > > > On Mon, 2021-02-22 at 13:22 +0530, Dwaipayan Ray wrote: > >

Re: [PATCH v7 0/2] checkpatch: add verbose mode

2021-02-26 Thread Dwaipayan Ray
On Fri, Feb 26, 2021 at 2:46 AM Jonathan Corbet wrote: > > Dwaipayan Ray writes: > > > On Thu, Feb 25, 2021 at 11:03 PM Joe Perches wrote: > >> I don't have any real objection to this patch set, but as this > >> might be added to the Documentation tree and in .

Re: [PATCH for Dwaipayan] MAINTAINERS: clarify responsibility for checkpatch documentation

2021-02-26 Thread Dwaipayan Ray
9 insertions(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 16ada1a4b751..6b48b79ba284 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -4181,9 +4181,18 @@ X: drivers/char/tpm/ > CHECKPATCH > M: Andy Whitcroft > M: Joe Perches > +R:

Re: [PATCH v7 0/2] checkpatch: add verbose mode

2021-02-25 Thread Dwaipayan Ray
On Thu, Feb 25, 2021 at 11:03 PM Joe Perches wrote: > > On Mon, 2021-02-22 at 13:22 +0530, Dwaipayan Ray wrote: > > Add a new verbose mode to checkpatch. The verbose test > > descriptions are read from the checkpatch documentation > > file at `Documentation/

[PATCH v7 2/2] docs: add documentation for checkpatch

2021-02-21 Thread Dwaipayan Ray
Add documentation for kernel script checkpatch.pl. This documentation is also parsed by checkpatch to enable a verbose mode. The checkpatch message types are grouped by usage. Under each group the types are described briefly. 34 of such types are documented. Signed-off-by: Dwaipayan Ray

[PATCH v7 1/2] checkpatch: add verbose mode

2021-02-21 Thread Dwaipayan Ray
. Verbose mode can be used with the --list-types option. The --list-types output also supports color coding now. Signed-off-by: Dwaipayan Ray --- scripts/checkpatch.pl | 133 +++--- 1 file changed, 113 insertions(+), 20 deletions(-) diff --git a/scripts

[PATCH v7 0/2] checkpatch: add verbose mode

2021-02-21 Thread Dwaipayan Ray
- Document a total of 33 message types for checkpatch Changes in v2: - Use .rst Field Lists to specify the type descriptions. - Add a few more type descriptions to documentation. Dwaipayan Ray (2): checkpatch: add verbose mode docs: add documentation for checkpatch Documentation/dev-tools

Re: [PATCH v6 1/2] checkpatch: add verbose mode

2021-02-21 Thread Dwaipayan Ray
On Mon, Feb 22, 2021 at 8:14 AM Joe Perches wrote: > > On Mon, 2021-02-22 at 00:05 +0530, Dwaipayan Ray wrote: > > On Sun, Feb 21, 2021 at 11:36 PM Joe Perches wrote: > > > > > > On Sun, 2021-02-21 at 17:28 +0530, Dwaipayan Ray wrote: > > > > Add a

Re: [PATCH v6 1/2] checkpatch: add verbose mode

2021-02-21 Thread Dwaipayan Ray
On Sun, Feb 21, 2021 at 11:36 PM Joe Perches wrote: > > On Sun, 2021-02-21 at 17:28 +0530, Dwaipayan Ray wrote: > > Add a new verbose mode to checkpatch.pl to emit additional verbose > > test descriptions. The verbose mode is optional and can be enabled > > by the flag

[PATCH v6 1/2] checkpatch: add verbose mode

2021-02-21 Thread Dwaipayan Ray
. Verbose mode can also be used with the --list-types option, which will then output the verbose descriptions along with the checkpatch message types. Signed-off-by: Dwaipayan Ray --- scripts/checkpatch.pl | 68 +-- 1 file changed, 65 insertions(+), 3

[PATCH v6 0/2] checkpatch: add verbose mode

2021-02-21 Thread Dwaipayan Ray
.rst Field Lists to specify the type descriptions. - Add a few more type descriptions to documentation. Dwaipayan Ray (2): checkpatch: add verbose mode docs: add documentation for checkpatch Documentation/dev-tools/checkpatch.rst | 526 + Documentation/dev-tools

[PATCH v6 2/2] docs: add documentation for checkpatch

2021-02-21 Thread Dwaipayan Ray
Add documentation for kernel script checkpatch.pl. This documentation is also parsed by checkpatch to enable a verbose mode. The checkpatch message types are grouped by usage. Under each group the types are described briefly. 34 of such types are documented. Signed-off-by: Dwaipayan Ray

[PATCH v5 2/2] docs: add documentation for checkpatch

2021-02-20 Thread Dwaipayan Ray
Add documentation for kernel script checkpatch.pl. This documentation is also parsed by checkpatch to enable a verbose mode. The checkpatch message types are grouped by usage. Under each group the types are described briefly. 34 of such types are documented. Signed-off-by: Dwaipayan Ray

[PATCH v5 1/2] checkpatch: add verbose mode

2021-02-20 Thread Dwaipayan Ray
. Signed-off-by: Dwaipayan Ray --- scripts/checkpatch.pl | 63 --- 1 file changed, 60 insertions(+), 3 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 9a549b009d2f..0a91f818ab6f 100755 --- a/scripts/checkpatch.pl +++ b/scripts

[PATCH v5 0/2] checkpatch: add verbose mode

2021-02-20 Thread Dwaipayan Ray
type descriptions to documentation. Dwaipayan Ray (2): checkpatch: add verbose mode docs: add documentation for checkpatch Documentation/dev-tools/checkpatch.rst | 526 + Documentation/dev-tools/index.rst | 1 + scripts/checkpatch.pl | 63

Re: [PATCH v4 2/2] docs: add documentation for checkpatch

2021-02-19 Thread Dwaipayan Ray
On Fri, Feb 19, 2021 at 11:25 PM Joe Perches wrote: > > On Wed, 2021-02-17 at 22:24 +0530, Dwaipayan Ray wrote: > > Add documentation for kernel script checkpatch.pl. > > This documentation is also parsed by checkpatch to > > enable a verbose mode. > > > > The

[PATCH v4 1/2] checkpatch: add verbose mode

2021-02-17 Thread Dwaipayan Ray
is missing a Signed-off-by line. A signed-off-by line should be added according to Developer's certificate of Origin. ref: `Documentation/process/submitting-patches.rst` The verbose descriptions are not shown when the --terse option is enabled. Signed-off-by: Dwaipayan Ray --- scripts

[PATCH v4 2/2] docs: add documentation for checkpatch

2021-02-17 Thread Dwaipayan Ray
Add documentation for kernel script checkpatch.pl. This documentation is also parsed by checkpatch to enable a verbose mode. The checkpatch message types are grouped by usage. Under each group the types are described briefly. 34 of such types are documented. Signed-off-by: Dwaipayan Ray

[PATCH v4 0/2] checkpatch: add verbose mode

2021-02-17 Thread Dwaipayan Ray
in checkpatch - Document a total of 33 message types for checkpatch Changes in v2: - Use .rst Field Lists to specify the type descriptions. - Add a few more type descriptions to documentation. Dwaipayan Ray (2): checkpatch: add verbose mode docs: add documentation for checkpatch Documentation/dev-tools

Re: [PATCH RFC v3 2/3] docs: add documentation for checkpatch

2021-02-17 Thread Dwaipayan Ray
On Wed, Feb 17, 2021 at 4:07 PM Joe Perches wrote: > > On Tue, 2021-02-16 at 19:48 +0530, Dwaipayan Ray wrote: > > On Sun, Feb 14, 2021 at 10:27 PM Joe Perches wrote: > > > On Sat, 2021-02-13 at 18:45 +0530, Dwaipayan Ray wrote: > > > > Add documentatio

Re: [PATCH RFC v3 2/3] docs: add documentation for checkpatch

2021-02-16 Thread Dwaipayan Ray
On Sun, Feb 14, 2021 at 10:27 PM Joe Perches wrote: > > On Sat, 2021-02-13 at 18:45 +0530, Dwaipayan Ray wrote: > > Add documentation for kernel script checkpatch.pl. > > This documentation is also parsed by checkpatch to > > enable a verbose mode. > > >

Re: [PATCH RFC v3 2/3] docs: add documentation for checkpatch

2021-02-15 Thread Dwaipayan Ray
On Sun, Feb 14, 2021 at 10:27 PM Joe Perches wrote: > > On Sat, 2021-02-13 at 18:45 +0530, Dwaipayan Ray wrote: > > Add documentation for kernel script checkpatch.pl. > > This documentation is also parsed by checkpatch to > > enable a verbose mode. > > >

[PATCH RFC v3 2/3] docs: add documentation for checkpatch

2021-02-13 Thread Dwaipayan Ray
Add documentation for kernel script checkpatch.pl. This documentation is also parsed by checkpatch to enable a verbose mode. The message types in checkpatch are documented with rst field lists. A total of 33 checkpatch type descriptions are added. Signed-off-by: Dwaipayan Ray --- Documentation

[PATCH RFC v3 3/3] docs: add documentation for checkpatch

2021-02-13 Thread Dwaipayan Ray
Link the checkpatch documentation to the dev-tools index for sphinx. Signed-off-by: Dwaipayan Ray --- Documentation/dev-tools/index.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/dev-tools/index.rst b/Documentation/dev-tools/index.rst index 1b1cf4f5c9d9..43d28998118b

[PATCH RFC v3 1/3] checkpatch: add verbose mode

2021-02-13 Thread Dwaipayan Ray
-off-by line. A signed-off-by line should be added according to Developer's certificate of Origin. ref: `Documentation/process/submitting-patches.rst` The verbose descriptions are not shown when the --terse option is enabled. Signed-off-by: Dwaipayan Ray --- scripts/checkpatch.pl | 55

[PATCH RFC v3 0/3] checkpatch: add verbose mode

2021-02-13 Thread Dwaipayan Ray
. - Add a few more type descriptions to documentation. Dwaipayan Ray (3): checkpatch: add verbose mode docs: add documentation for checkpatch docs: add documentation for checkpatch Documentation/dev-tools/checkpatch.rst | 494 + Documentation/dev-tools/index.rst

Re: [Linux-kernel-mentees] Patches from the future - can checkpatch help?

2021-02-01 Thread Dwaipayan Ray
On Mon, Feb 1, 2021 at 10:20 PM Lukas Bulwahn wrote: > > On Mon, Feb 1, 2021 at 5:37 PM Greg KH wrote: > > > > On Mon, Feb 01, 2021 at 10:04:01PM +0530, Dwaipayan Ray wrote: > > > Hi, > > > on linux-next, > > > $ git log --pretty=format:"

Re: [Linux-kernel-mentees] Patches from the future - can checkpatch help?

2021-02-01 Thread Dwaipayan Ray
On Mon, Feb 1, 2021 at 10:07 PM Greg KH wrote: > > On Mon, Feb 01, 2021 at 10:04:01PM +0530, Dwaipayan Ray wrote: > > Hi, > > on linux-next, > > $ git log --pretty=format:"%h%x09%ad" | awk '$6>2021 {print $1}' > > gives: > > 4a2d78822fdf > >

Patches from the future - can checkpatch help?

2021-02-01 Thread Dwaipayan Ray
Hi, on linux-next, $ git log --pretty=format:"%h%x09%ad" | awk '$6>2021 {print $1}' gives: 4a2d78822fdf 12ca45fea91c 09f2724a786f These are patches from the year 2085, 2037 and 2030 respectively. Would a checkpatch rule be helpful for these or are they too isolated to waste runtime on? Thanks!

Re: [PATCH v2 2/3] docs: add documentation for checkpatch

2021-01-28 Thread Dwaipayan Ray
On Fri, Jan 29, 2021 at 12:53 AM Joe Perches wrote: > > On Thu, 2021-01-28 at 20:08 +0530, Dwaipayan Ray wrote: > > Add documentation for kernel script checkpatch.pl. > > This documentation is also parsed by checkpatch to > > enable a verbose mode. > > > > On

[PATCH v2 2/3] docs: add documentation for checkpatch

2021-01-28 Thread Dwaipayan Ray
Add documentation for kernel script checkpatch.pl. This documentation is also parsed by checkpatch to enable a verbose mode. Only a few test descriptions are added and the rest will be added later over time to document all the message types emitted by checkpatch. Signed-off-by: Dwaipayan Ray

[PATCH v2 3/3] docs: add documentation for checkpatch

2021-01-28 Thread Dwaipayan Ray
Link the checkpatch documentation to the dev-tools index for sphinx. Signed-off-by: Dwaipayan Ray --- Documentation/dev-tools/index.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/dev-tools/index.rst b/Documentation/dev-tools/index.rst index 1b1cf4f5c9d9..43d28998118b

[PATCH v2 1/3] checkpatch: add verbose mode

2021-01-28 Thread Dwaipayan Ray
-off-by line should be added according to Developer's certificate of Origin. ref: `Documentation/process/submitting-patches.rst` The verbose descriptions are not shown when the --terse option is enabled. Signed-off-by: Dwaipayan Ray --- scripts/checkpatch.pl | 54

[PATCH v2 0/3] checkpatch: add verbose mode

2021-01-28 Thread Dwaipayan Ray
if the verbose mode is enabled. The verbose mode is also suppressed when the --terse option is specified. Changes in v2: - Use .rst Field Lists to specify the type descriptions. - Add a few more type descriptions to documentation. Dwaipayan Ray (3): checkpatch: add verbose mode docs: add

Re: [PATCH RFC 1/3] checkpatch: add verbose mode

2021-01-26 Thread Dwaipayan Ray
On Wed, Jan 27, 2021 at 1:41 AM Joe Perches wrote: > > On Wed, 2021-01-27 at 00:05 +0530, Dwaipayan Ray wrote: > > Add a new verbose mode to checkpatch.pl to emit additional verbose > > test descriptions. > > > > The verbose mode is optional and can be ena

[PATCH RFC 2/3] docs: add documentation for checkpatch

2021-01-26 Thread Dwaipayan Ray
Add documentation for kernel script checkpatch.pl. This documentation is also parsed by checkpatch to enable a verbose mode. The test descriptions are potentially incomplete and will be added over time to document all the message types in checkpatch. Signed-off-by: Dwaipayan Ray

[PATCH RFC 3/3] docs: add documentation for checkpatch

2021-01-26 Thread Dwaipayan Ray
Link checkpatch.rst to the dev-tools index for sphinx. Signed-off-by: Dwaipayan Ray --- Documentation/dev-tools/index.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/dev-tools/index.rst b/Documentation/dev-tools/index.rst index 1b1cf4f5c9d9..43d28998118b 100644

[PATCH RFC 0/3] checkpatch: add verbose mode

2021-01-26 Thread Dwaipayan Ray
mode needs some work put into. The usual printing of verbose descriptions can cause confusion and maybe hard to distinguish from the actual warnings. Please note that this is only an initial attempt and any comments are welcome. Dwaipayan Ray (3): checkpatch: add verbose mode docs: add

[PATCH RFC 1/3] checkpatch: add verbose mode

2021-01-26 Thread Dwaipayan Ray
option is specified. Signed-off-by: Dwaipayan Ray --- scripts/checkpatch.pl | 55 +++ 1 file changed, 55 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 7a323ca8a177..48eeb01074d5 100755 --- a/scripts/checkpatch.pl +++ b/scripts

[PATCH] scripts: mod: fix checkpatch.pl warnings

2021-01-10 Thread Dwaipayan Ray
nthesis ')' ERROR: code indent should use tabs where possible ERROR: "(foo*)" should be "(foo *)" Signed-off-by: Dwaipayan Ray --- Note: The patch is compile tested only scripts/mod/file2alias.c | 156 +-- 1 file changed, 83 insertions(+),

Re: [PATCH] ACPI: scan: Fix a Hyper-V Linux VM panic caused by buffer overflow

2021-01-07 Thread Dwaipayan Ray
On 18/12/20 9:38 am, Dexuan Cui wrote: Linux VM on Hyper-V crashes with the latest mainline: [4.069624] detected buffer overflow in strcpy [4.077733] kernel BUG at lib/string.c:1149! .. [4.085819] RIP: 0010:fortify_panic+0xf/0x11 ... [4.085819] Call Trace: [4.085819]

[PATCH] checkpatch: trivial style fixes

2021-01-05 Thread Dwaipayan Ray
Indentations should use tabs wherever possible. Replace spaces by tabs for indents. Signed-off-by: Dwaipayan Ray --- scripts/checkpatch.pl | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index e6857bdfcb2d

Re: [PATCH] checkpatch: fix unescaped left braces

2021-01-05 Thread Dwaipayan Ray
On Tue, Jan 5, 2021 at 3:31 PM Joe Perches wrote: > > On Tue, 2021-01-05 at 15:05 +0530, Dwaipayan Ray wrote: > > Perl 5.22 onwards require that "A literal "{" should now be > > escaped in a pattern". > > Not quite correct. > > > checkp

[PATCH] checkpatch: fix unescaped left braces

2021-01-05 Thread Dwaipayan Ray
Perl 5.22 onwards require that "A literal "{" should now be escaped in a pattern". checkpatch contains several literal "{". Fix such instances by preceding them with a backslash. Signed-off-by: Dwaipayan Ray --- scripts/checkpatch.pl | 28 ++

Re: [PATCH] checkpatch: add a new check for strcpy/strlcpy uses

2021-01-05 Thread Dwaipayan Ray
On Tue, Jan 5, 2021 at 2:14 PM Joe Perches wrote: > > On Tue, 2021-01-05 at 13:53 +0530, Dwaipayan Ray wrote: > > strcpy() performs no bounds checking on the destination buffer. > > This could result in linear overflows beyond the end of the buffer. > > > > str

[PATCH] checkpatch: add a new check for strcpy/strlcpy uses

2021-01-05 Thread Dwaipayan Ray
. The safe replacement to both of these is to use strscpy() instead. Add a new checkpatch warning which alerts the user on finding usage of strcpy() or strlcpy(). Signed-off-by: Dwaipayan Ray --- scripts/checkpatch.pl | 7 +++ 1 file changed, 7 insertions(+) diff --git a/scripts/checkpatch.pl b

[PATCH] acpi: Use DEVICE_ATTR_ macros

2020-12-17 Thread Dwaipayan Ray
Instead of open coding DEVICE_ATTR(), use the DEVICE_ATTR_RW(), DEVICE_ATTR_RO() and DEVICE_ATTR_WO() macros wherever possible. This required a few functions to be renamed but the functionality itself is unchanged. Signed-off-by: Dwaipayan Ray --- Note: The patch is compiled tested only. Merges

[PATCH v3] scripts: add more corrections to spelling.txt

2020-12-14 Thread Dwaipayan Ray
Analyzing misspellings over the past 10k commit messages, a few more corrections are added to spelling.txt Signed-off-by: Dwaipayan Ray --- Changes in v3: - Remove duplicate correction for "seperate" - Remove corrections for "uptodate", "wont" Changes in v2: - Fi

Re: [PATCH] scripts: add more corrections to spelling.txt

2020-12-14 Thread Dwaipayan Ray
On Mon, Dec 14, 2020 at 1:39 PM Joe Perches wrote: > > On Mon, 2020-12-14 at 13:28 +0530, Dwaipayan Ray wrote: > > Analyzing misspellings over the past 10k commit messages, > > a few more corrections are added to spelling.txt > > I don't agree with all of these. &g

[PATCH v2] scripts: add more corrections to spelling.txt

2020-12-14 Thread Dwaipayan Ray
Analyzing misspellings over the past 10k commit messages, a few more corrections are added to spelling.txt Signed-off-by: Dwaipayan Ray --- Changes in v2: - Fix additional whitespace before "up to" scripts/spelling.txt | 18 ++ 1 file changed, 18 insertions(+)

[PATCH] scripts: add more corrections to spelling.txt

2020-12-14 Thread Dwaipayan Ray
Analyzing misspellings over the past 10k commit messages, a few more corrections are added to spelling.txt Signed-off-by: Dwaipayan Ray --- scripts/spelling.txt | 18 ++ 1 file changed, 18 insertions(+) diff --git a/scripts/spelling.txt b/scripts/spelling.txt index 953f4a2de1e5

[PATCH v2] leds: Use DEVICE_ATTR_{RW, RO, WO} macros

2020-12-13 Thread Dwaipayan Ray
Instead of open coding DEVICE_ATTR() defines, use the DEVICE_ATTR_RW(), DEVICE_ATTR_WO(), and DEVICE_ATTR_RO() macros. This required a few functions to be renamed, but the functionality itself is unchanged. Reviewed-by: Lukas Bulwahn Signed-off-by: Dwaipayan Ray --- Changes in v2: - Reword

Re: [PATCH] leds: Use DEVICE_ATTR_{RW, RO, WO} macros

2020-12-13 Thread Dwaipayan Ray
On Sun, Dec 13, 2020 at 1:31 PM Lukas Bulwahn wrote: > > On Sat, Dec 12, 2020 at 8:56 PM Dwaipayan Ray wrote: > > > > Instead of open coding DEVICE_ATTR() defines, use the > > DEVICE_ATTR_RW(), DEVICE_ATTR_WO(), and DEVICE_ATTR_RO() > > macros intead. > >

[PATCH] leds: Use DEVICE_ATTR_{RW, RO, WO} macros

2020-12-12 Thread Dwaipayan Ray
: Pavel Machek Cc: Lukas Bulwahn Cc: linux-l...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-kernel-ment...@lists.linuxfoundation.org Signed-off-by: Dwaipayan Ray --- drivers/leds/leds-blinkm.c| 24 drivers/leds/leds-lm3530.c| 10

Re: [PATCH] checkpatch: add --fix option to IS_ENABLED_CONFIG check

2020-12-10 Thread Dwaipayan Ray
> > checkpatch correspondingly has a check for IS_ENABLED() without > > CONFIG_. > > Add a --fix option to the check to automatically correct the argument. > > > > Macros like: > > #if IS_ENABLED(THERMAL) > > > > is corrected to: > > #if IS_ENABLED(CONFIG_THERMAL) > > I think adding a --fix

[PATCH] checkpatch: add --fix option to IS_ENABLED_CONFIG check

2020-12-10 Thread Dwaipayan Ray
)) { ... } checkpatch correspondingly has a check for IS_ENABLED() without CONFIG_. Add a --fix option to the check to automatically correct the argument. Macros like: #if IS_ENABLED(THERMAL) is corrected to: #if IS_ENABLED(CONFIG_THERMAL) Signed-off-by: Dwaipayan Ray --- scripts/checkpatch.pl | 7

Re: [PATCH v3] checkpatch: add --fix option to include linux checks

2020-12-09 Thread Dwaipayan Ray
> Dwaipayan, can you run this rule from checkpatch.pl on all files in > the current linux-next tree and share all findings with me? > > Maybe, we can fix a few places and improve the rule. > > Lukas > Hi, I am actually a bit confused here. I couldn't find any particular place in documentation

[PATCH v3] checkpatch: add --fix option to include linux checks

2020-12-06 Thread Dwaipayan Ray
Add fix option to INCLUDE_LINUX and ARCH_INCLUDE_LINUX checks to replace asm includes. Macros of type: #include #include are corrected to: #include #include Signed-off-by: Dwaipayan Ray --- Changes in v3: - Add --fix option to ARCH_INCLUDE_LINUX check Changes in v2: - Use \Q..\E

[PATCH v3] checkpatch: add warning for lines starting with a '#' in commit log

2020-12-02 Thread Dwaipayan Ray
Commit log lines starting with '#' are dropped by git as comments. Add a check to emit a warning for these lines. Also add a --fix option to insert a space before the leading '#' in such lines. Suggested-by: Joe Perches Suggested-by: Peilin Ye Tested-by: Peilin Ye Signed-off-by: Dwaipayan Ray

[PATCH v2] checkpatch: add warning for lines starting with a '#' in commit log

2020-12-02 Thread Dwaipayan Ray
by adding a tab in front of such lines. Suggested-by: Peilin Ye Tested-by: Peilin Ye Signed-off-by: Dwaipayan Ray --- Changes in v2: - Modify warning message and type - Style fixes scripts/checkpatch.pl | 9 + 1 file changed, 9 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts

Re: [PATCH] checkpatch: add warning for lines starting with a '#' in commit log

2020-12-02 Thread Dwaipayan Ray
On Wed, Dec 2, 2020 at 3:45 PM Dwaipayan Ray wrote: > > Commit log lines starting with a '#' can be dropped by git if > the corresponding commit message is reworded by a maintainer. > This minor error can be easily avoided if checkpatch warns > for the same. > > Add a

[PATCH] checkpatch: add warning for lines starting with a '#' in commit log

2020-12-02 Thread Dwaipayan Ray
by adding a tab in front of such lines. Suggested-by: Peilin Ye Tested-by: Peilin Ye Signed-off-by: Dwaipayan Ray --- scripts/checkpatch.pl | 9 + 1 file changed, 9 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index e8c1ed0b1fad..a12edcf4f63a 100755

[PATCH v3] checkpatch: fix TYPO_SPELLING check for words with apostrophe

2020-12-01 Thread Dwaipayan Ray
eilin Ye Signed-off-by: Dwaipayan Ray --- Changes in v3: - Highlight misspelled word location using a caret Changes in v2: - Use the default codespell word regex. - Modify commit message to specify --codespell usage scripts/checkpatch.pl | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-)

Re: [PATCH v2] checkpatch: fix TYPO_SPELLING check for words with apostrophe

2020-12-01 Thread Dwaipayan Ray
On Tue, Dec 1, 2020 at 11:59 PM Joe Perches wrote: > > On Tue, 2020-12-01 at 23:39 +0530, Dwaipayan Ray wrote: > > On Tue, Dec 1, 2020 at 11:32 PM Joe Perches wrote: > > > On Tue, 2020-12-01 at 12:53 +0530, Dwaipayan Ray wrote: > > > > checkpatch reports a fal

Re: [PATCH v2] checkpatch: fix TYPO_SPELLING check for words with apostrophe

2020-12-01 Thread Dwaipayan Ray
On Tue, Dec 1, 2020 at 11:32 PM Joe Perches wrote: > > On Tue, 2020-12-01 at 12:53 +0530, Dwaipayan Ray wrote: > > checkpatch reports a false TYPO_SPELLING warning for some words > > containing an apostrophe when run with --codespell option. > > > > A false pos

[PATCH v2] checkpatch: fix TYPO_SPELLING check for words with apostrophe

2020-11-30 Thread Dwaipayan Ray
sn't'?" Modify the regex pattern to be more in line with the codespell default word matching regex. This fixes the word capture and avoids the false warning. Suggested-by: Joe Perches Reported-by: Peilin Ye Signed-off-by: Dwaipayan Ray --- Changes in v2: - Use the default codespell word re

Re: [PATCH] checkpatch: fix TYPO_SPELLING check for words with apostrophe

2020-11-30 Thread Dwaipayan Ray
On Mon, Nov 30, 2020 at 11:31 PM Joe Perches wrote: > > On Mon, 2020-11-30 at 23:02 +0530, Dwaipayan Ray wrote: > > Sorry I think i explained wrong. For words like "doesn't", it still > > has the same problem. > > I think you explained it wrong when you didn't

Re: [PATCH] checkpatch: fix TYPO_SPELLING check for words with apostrophe

2020-11-30 Thread Dwaipayan Ray
On Mon, Nov 30, 2020 at 10:54 PM Joe Perches wrote: > > On Mon, 2020-11-30 at 22:33 +0530, Dwaipayan Ray wrote: > > On Mon, Nov 30, 2020 at 10:13 PM Joe Perches wrote: > > > > > > On Mon, 2020-11-30 at 20:15 +0530, Dwaipayan Ray wrote: > > > > checkp

Re: [PATCH] checkpatch: fix TYPO_SPELLING check for words with apostrophe

2020-11-30 Thread Dwaipayan Ray
On Mon, Nov 30, 2020 at 10:13 PM Joe Perches wrote: > > On Mon, 2020-11-30 at 20:15 +0530, Dwaipayan Ray wrote: > > checkpatch reports a false TYPO_SPELLING warning for some words > > containing an apostrophe. > > > > A false positive is "doesn't". Occu

[PATCH] checkpatch: fix TYPO_SPELLING check for words with apostrophe

2020-11-30 Thread Dwaipayan Ray
ry for such cases so that words like "doesn't", "zig-zag", etc. aren't misinterpreted due to wrong splitting of the word by the \b regex metacharacter. Reported-by: Peilin Ye Tested-by: Peilin Ye Signed-off-by: Dwaipayan Ray --- scripts/checkpatch.pl | 2 +- 1 file changed, 1

[PATCH v3] checkpatch: add warning for unnecessary use of %h[xudi] and %hh[xudi]

2020-11-28 Thread Dwaipayan Ray
make the code more obvious)." Add a new check to emit a warning on finding an unneeded use of %h or %hh modifier. Also add a fix option to the check. Link: https://lore.kernel.org/lkml/4910042649a4f3ab22fac93191b8c1fa0a2e17c3.ca...@perches.com/ Suggested-by: Joe Perches Suggested-by: Lu

[PATCH v4] checkpatch: add warning for unnecessary use of %h[xudi] and %hh[xudi]

2020-11-28 Thread Dwaipayan Ray
make the code more obvious)." Add a new check to emit a warning on finding an unneeded use of %h or %hh modifier. Also add a fix option to the check. Link: https://lore.kernel.org/lkml/4910042649a4f3ab22fac93191b8c1fa0a2e17c3.ca...@perches.com/ Suggested-by: Joe Perches Suggested-by: Lu

Re: [PATCH v3] checkpatch: add warning for unnecessary use of %h[xudi] and %hh[xudi]

2020-11-28 Thread Dwaipayan Ray
> Here was what I tried: > > There are uses like %#06hh", so # was addedto the format block > and multiple line uses were also inspected. > > > scripts/checkpatch.pl | 23 +++ > 1 file changed, 23 insertions(+) > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl >

[PATCH v2] checkpatch: add warning for unnecessary use of %h[xudi] and %hh[xudi]

2020-11-26 Thread Dwaipayan Ray
make the code more obvious)." Add a new check to emit a warning on finding an unneeded use of %h or %hh modifier. Link: https://lore.kernel.org/lkml/4910042649a4f3ab22fac93191b8c1fa0a2e17c3.ca...@perches.com/ Suggested-by: Lukas Bulwahn Signed-off-by: Dwaipayan Ray --- Changes in v2

[PATCH RFC] checkpatch: add warning for unnecessary use of %h[xudi] and %hh[xudi]

2020-11-25 Thread Dwaipayan Ray
make the code more obvious)." Add a new check to emit a warning on finding an unneeded use of %h or %hh modifier. Link: https://lore.kernel.org/lkml/4910042649a4f3ab22fac93191b8c1fa0a2e17c3.ca...@perches.com/ Suggested-by: Lukas Bulwahn Signed-off-by: Dwaipayan Ray --- scripts/checkpat

Re: [PATCH v2] checkpatch: add --fix option for INCLUDE_LINUX

2020-11-23 Thread Dwaipayan Ray
On Sun, Nov 22, 2020 at 2:54 AM Dwaipayan Ray wrote: > > Provide fix option to INCLUDE_LINUX check to replace asm > includes. > > Macros of type: > #include > > are corrected to: > #include > > Signed-off-by: Dwaipayan Ray > --- > Hello Joe,

[PATCH v2] checkpatch: add --fix option for INCLUDE_LINUX

2020-11-21 Thread Dwaipayan Ray
Provide fix option to INCLUDE_LINUX check to replace asm includes. Macros of type: #include are corrected to: #include Signed-off-by: Dwaipayan Ray --- Changes in v2: - Use \Q..\E quoting - Use @ as regex delimiter scripts/checkpatch.pl | 7 +-- 1 file changed, 5 insertions(+), 2

Re: [PATCH] checkpatch: add --fix option for INCLUDE_LINUX

2020-11-21 Thread Dwaipayan Ray
On Sun, Nov 22, 2020 at 1:35 AM Joe Perches wrote: > > On Sat, 2020-11-21 at 21:47 +0530, Dwaipayan Ray wrote: > > Provide fix option to INCLUDE_LINUX check to replace asm > > includes. > > > > Macros of type: > > #include > > > > are corrected

[PATCH] checkpatch: add --fix option for INCLUDE_LINUX

2020-11-21 Thread Dwaipayan Ray
Provide fix option to INCLUDE_LINUX check to replace asm includes. Macros of type: #include are corrected to: #include Signed-off-by: Dwaipayan Ray --- scripts/checkpatch.pl | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts

Re: [PATCH] checkpatch: fix spacing check for return with parentheses

2020-11-18 Thread Dwaipayan Ray
On Wed, Nov 18, 2020 at 1:43 AM Dwaipayan Ray wrote: > > The spacing check is unreachable for return statements > followed by an opening parentheses. > For example: > > int foo(int bar, int baz) > { > return(bar+baz); > } > > There should be an error emi

Re: [PATCH] checkpatch: add --fix option for OPEN_BRACE issues

2020-11-18 Thread Dwaipayan Ray
> > > The difference here is that you are dealing with a $stat context and > > > the existing --fix entries are just for single line fixes. > > > > > > > Hi, > > Ya I understand that. Though I am dealing with $stat content, > > I am also directly accessing $rawlines here. > > So I think that

Re: [PATCH] checkpatch: add --fix option for OPEN_BRACE issues

2020-11-18 Thread Dwaipayan Ray
On Thu, Nov 19, 2020 at 1:28 AM Joe Perches wrote: > > On Thu, 2020-11-19 at 00:15 +0530, Dwaipayan Ray wrote: > > On Thu, Nov 19, 2020 at 12:09 AM Joe Perches wrote: > > > > > > On Thu, 2020-11-19 at 00:03 +0530, Dwaipayan Ray wrote: > > > > On Wed, N

Re: [PATCH] checkpatch: add --fix option for OPEN_BRACE issues

2020-11-18 Thread Dwaipayan Ray
On Thu, Nov 19, 2020 at 12:09 AM Joe Perches wrote: > > On Thu, 2020-11-19 at 00:03 +0530, Dwaipayan Ray wrote: > > On Wed, Nov 18, 2020 at 11:44 PM Joe Perches wrote: > > > > > > On Wed, 2020-11-18 at 18:10 +0530, Dwaipayan Ray wrote: > > > > Brace st

Re: [PATCH] checkpatch: add --fix option for OPEN_BRACE issues

2020-11-18 Thread Dwaipayan Ray
On Wed, Nov 18, 2020 at 11:44 PM Joe Perches wrote: > > On Wed, 2020-11-18 at 18:10 +0530, Dwaipayan Ray wrote: > > Brace style misuses of the following types are now > > corrected: > [] > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > [] > >

[PATCH] checkpatch: add --fix option for OPEN_BRACE issues

2020-11-18 Thread Dwaipayan Ray
+; } Signed-off-by: Dwaipayan Ray --- scripts/checkpatch.pl | 38 +- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 0da6422cd0fd..8da6cde20c68 100755 --- a/scripts/checkpatch.pl +++ b/scrip

[PATCH] checkpatch: fix spacing check for return with parentheses

2020-11-17 Thread Dwaipayan Ray
check. Also add --fix option to the check. Signed-off-by: Dwaipayan Ray --- scripts/checkpatch.pl | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 8da6cde20c68..07feeb3321e2 100755 --- a/scripts/checkpatch.pl +++ b

Re: [PATCH] checkpatch: Fix unescaped left brace

2020-11-17 Thread Dwaipayan Ray
On Tue, Nov 17, 2020 at 4:32 AM Joe Perches wrote: > > On Sun, 2020-11-15 at 19:43 -0800, Joe Perches wrote: > > On Mon, 2020-11-16 at 01:59 +0530, Dwaipayan Ray wrote: > > > There is an unescaped left brace in a regex in OPEN_BRACE > > > check. This throws a runtim

[PATCH] checkpatch: Fix unescaped left brace

2020-11-15 Thread Dwaipayan Ray
suses") Signed-off-by: Dwaipayan Ray --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 2749f32dffe9..0da6422cd0fd 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -4505,7 +4505,7 @@ s

[PATCH V3] checkpatch: Fix spelling errors and remove repeated word

2020-11-13 Thread Dwaipayan Ray
Delete repeated word in scripts/checkpatch.pl: "are are" -> "are" Fix typos: "commments" -> "comments" "falsly" -> "falsely" Signed-off-by: Dwaipayan Ray --- Changes in V3: - Change subject line Changes in V2: - Add correc

Re: [PATCH] checkpatch: fix typo and remove duplicate word

2020-11-13 Thread Dwaipayan Ray
On Fri, Nov 13, 2020 at 8:30 PM Joe Perches wrote: > > On Fri, 2020-11-13 at 19:27 +0530, Dwaipayan Ray wrote: > > Delete repeated word in scripts/checkpatch.pl: > > "are are" -> "are" > > > > Fix typos: > > "commments" -> &

Re: [PATCH RFC] checkpatch: add new cases to commit handling

2020-11-13 Thread Dwaipayan Ray
On Fri, Nov 13, 2020 at 7:31 PM Lukas Bulwahn wrote: > > On Fri, Nov 13, 2020 at 2:37 PM Lukas Bulwahn wrote: > > > > On Fri, Nov 13, 2020 at 1:31 PM Dwaipayan Ray > > wrote: > > > > > > Commit extraction in checkpatch fails in some cases. &g

  1   2   >