Re: [PATCH v5] checkpatch: add new exception to repeated word check

2020-10-18 Thread Joe Perches
On Sun, 2020-10-18 at 12:10 +0530, Dwaipayan Ray wrote: > print index(" \t.,;?!", ''); > > It output 0 in my case. So last words on a line seems to work. > I don't know if this changes with the perl version though. > > So given this, will it be necessary to change end_char to ' ' ? > or perhaps

Re: [PATCH v5] checkpatch: add new exception to repeated word check

2020-10-18 Thread Joe Perches
On Sat, 2020-10-17 at 22:19 +0530, Dwaipayan Ray wrote: > On Sat, Oct 17, 2020 at 10:03 PM Joe Perches wrote: > > On Sat, 2020-10-17 at 21:57 +0530, Dwaipayan Ray wrote: > > > Recently, commit 4f6ad8aa1eac ("checkpatch: move repeated word test") > > >

Re: [Cocci] [RFC] treewide: cleanup unreachable breaks

2020-10-17 Thread Joe Perches
On Sat, 2020-10-17 at 20:21 +0200, Julia Lawall wrote: > On Sat, 17 Oct 2020, Joe Perches wrote: > > On Sat, 2020-10-17 at 09:09 -0700, t...@redhat.com wrote: > > > From: Tom Rix > > > > > > This is a upcoming change to clean up a new warning treewide. >

Re: [PATCH v5] checkpatch: add new exception to repeated word check

2020-10-17 Thread Joe Perches
On Sat, 2020-10-17 at 21:57 +0530, Dwaipayan Ray wrote: > Recently, commit 4f6ad8aa1eac ("checkpatch: move repeated word test") > moved the repeated word test to check for more file types. But after > this, if checkpatch.pl is run on MAINTAINERS, it generates several > new warnings of the type:

Re: [RFC] treewide: cleanup unreachable breaks

2020-10-17 Thread Joe Perches
On Sat, 2020-10-17 at 09:09 -0700, t...@redhat.com wrote: > From: Tom Rix > > This is a upcoming change to clean up a new warning treewide. > I am wondering if the change could be one mega patch (see below) or > normal patch per file about 100 patches or somewhere half way by collecting > early

Re: [PATCH v4] checkpatch: add new exception to repeated word check

2020-10-17 Thread Joe Perches
On Sat, 2020-10-17 at 13:21 +0530, Dwaipayan Ray wrote: > Recently, commit 4f6ad8aa1eac ("checkpatch: move repeated word test") > moved the repeated word test to check for more file types. But after > this, if checkpatch.pl is run on MAINTAINERS, it generates several > new warnings of the type: >

Re: [PATCH v2] checkpatch: add a fixer for missing newline at eof

2020-10-17 Thread Joe Perches
On Sat, 2020-10-17 at 07:25 -0700, t...@redhat.com wrote: > From: Tom Rix > > Remove the trailing error message from the fixed lines > > Signed-off-by: Tom Rix > --- > v2: fix whitespace Thanks Tom. Andrew can you pick this up please? > --- > scripts/checkpatch.pl | 7 +-- > 1 file

Re: [PATCH v3] checkpatch: add new exception to repeated word check

2020-10-17 Thread Joe Perches
On Sat, 2020-10-17 at 11:32 +0530, Dwaipayan Ray wrote: > > Why include a + character here? > > > Hi, > I tried it without + first, but then lines like > "The the repeated word." > didn't register a warning. > > I think checkpatch adds a + to the line when used on > files. Am not sure but my

Re: [PATCH v2] checkpatch: add new exception to repeated word check

2020-10-17 Thread Joe Perches
On Wed, 2020-10-14 at 11:35 -0700, Joe Perches wrote: > On Wed, 2020-10-14 at 23:42 +0530, Dwaipayan Ray wrote: > > On Wed, Oct 14, 2020 at 11:33 PM Joe Perches wrote: > > > On Wed, 2020-10-14 at 22:07 +0530, Dwaipayan Ray wrote: > > > > Recently, commit 4f6ad8aa1e

Re: [PATCH] staging: wfx: make a const array static, makes object smaller

2020-10-17 Thread Joe Perches
On Fri, 2020-10-16 at 23:33 +0100, Colin King wrote: > From: Colin Ian King > > Don't populate const array filter_ies on the stack but instead > make it static. Makes the object code smaller by 261 bytes. > > Before: >text data bss dec hex filename > 21674

Re: [PATCH v2] checkpatch: add new exception to repeated word check

2020-10-17 Thread Joe Perches
On Sat, 2020-10-17 at 10:02 +0530, Dwaipayan Ray wrote: > On Sat, Oct 17, 2020 at 8:26 AM Joe Perches wrote: > > On Wed, 2020-10-14 at 11:35 -0700, Joe Perches wrote: > > > On Wed, 2020-10-14 at 23:42 +0530, Dwaipayan Ray wrote: > > > > On Wed, Oct 14, 2020

Re: [PATCH v3] checkpatch: add new exception to repeated word check

2020-10-16 Thread Joe Perches
ceeding character > belongs to the exception list, the warning is avoided. > > Link: > https://lore.kernel.org/linux-kernel-mentees/81b6a0bb2c7b9256361573f7a13201ebcd4876f1.ca...@perches.com/ > Suggested-by: Joe Perches > Suggested-by: Lukas Bulwahn > Signed-off-by: Dwaipayan Ray > -

Re: [PATCH] [v4] wireless: Initial driver submission for pureLiFi STA devices

2020-10-16 Thread Joe Perches
On Fri, 2020-10-16 at 12:04 +0530, Srinivasan Raju wrote: > This introduces the pureLiFi LiFi driver for LiFi-X, LiFi-XC > and LiFi-XL USB devices. Suggested neatening patch on top of this: o Use include "usb.h" instead of direct extern o Prefix purelifi to speed and send_packet_from_data_queue

Re: [PATCH V2] scripts: spelling: Remove space in the entry memry to memory

2020-10-15 Thread Joe Perches
On Fri, 2020-10-16 at 04:38 +0530, Bhaskar Chowdhury wrote: > On 16:06 Thu 15 Oct 2020, Joe Perches wrote: > > On Fri, 2020-10-16 at 04:25 +0530, Bhaskar Chowdhury wrote: > > > You have all flawed understanding...please stay away .. > > > if you don't understand som

Re: [PATCH V2] scripts: spelling: Remove space in the entry memry to memory

2020-10-15 Thread Joe Perches
On Fri, 2020-10-16 at 04:25 +0530, Bhaskar Chowdhury wrote: > You have all flawed understanding...please stay away .. > if you don't understand something... You're funny. You're wrong, but you're still funny.

Re: [PATCH V2] scripts: spelling: Remove space in the entry memry to memory

2020-10-15 Thread Joe Perches
On Fri, 2020-10-16 at 04:19 +0530, Bhaskar Chowdhury wrote: > On 14:10 Thu 15 Oct 2020, Joe Perches wrote: > > On Thu, 2020-10-15 at 19:24 +0530, Bhaskar Chowdhury wrote: > > > On 06:38 Thu 15 Oct 2020, Joe Perches wrote: > > > > On Thu, 2020-10-15 at 18:53

Re: [PATCH] [PATCH] [v3] wireless: Initial driver submission for pureLiFi STA devices

2020-10-15 Thread Joe Perches
On Wed, 2020-10-14 at 11:49 +0530, Srinivasan Raju wrote: > This introduces the pureLiFi LiFi driver for LiFi-X, LiFi-XC > and LiFi-XL USB devices. trivia: netdev_ might be better than dev_. > diff --git a/drivers/net/wireless/purelifi/chip.c > b/drivers/net/wireless/purelifi/chip.c [] > +int

Re: [PATCH V2] scripts: spelling: Remove space in the entry memry to memory

2020-10-15 Thread Joe Perches
On Thu, 2020-10-15 at 19:24 +0530, Bhaskar Chowdhury wrote: > On 06:38 Thu 15 Oct 2020, Joe Perches wrote: > > On Thu, 2020-10-15 at 18:53 +0530, Bhaskar Chowdhury wrote: > > > Fix the space in the middle in below entry. > > > > > > memry||memory > > []

Re: [PATCH V2] scripts: spelling: Remove space in the entry memry to memory

2020-10-15 Thread Joe Perches
On Thu, 2020-10-15 at 18:53 +0530, Bhaskar Chowdhury wrote: > Fix the space in the middle in below entry. > > memry||memory [] > diff --git a/scripts/spelling.txt b/scripts/spelling.txt [] > @@ -885,7 +885,7 @@ meetign||meeting > memeory||memory > memmber||member > memoery||memory > -memry

Re: [PATCH] scripts: Spelling: Fix spelling memry to memory in /tools/nolibc/include/nolibc.h

2020-10-15 Thread Joe Perches
On Thu, 2020-10-15 at 18:35 +0530, Bhaskar Chowdhury wrote: > s/memry/memory/p [] > diff --git a/scripts/spelling.txt b/scripts/spelling.txt [] > @@ -885,6 +885,7 @@ meetign||meeting > memeory||memory > memmber||member > memoery||memory > +memry ||memory Spaces are not used in these entries.

Re: [PATCH-next 0/4] RDMA: sprintf to sysfs_emit conversions

2020-10-14 Thread Joe Perches
On Thu, 2020-10-08 at 08:41 +0300, Leon Romanovsky wrote: > On Wed, Oct 07, 2020 at 07:36:23PM -0700, Joe Perches wrote: > > A recent commit added a sysfs_emit and sysfs_emit_at to allow various > > sysfs show functions to ensure that the PAGE_SIZE buffer argument is > > nev

Re: [PATCH] checkpatch: add a fixer for missing newline at eof

2020-10-14 Thread Joe Perches
On Wed, 2020-10-14 at 14:15 -0700, t...@redhat.com wrote: > From: Tom Rix > > Remove the trailing error message from the fixed lines Hi Tom. > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl [] > @@ -3393,8 +3393,11 @@ sub process { > > # check for adding lines without a newline.

Re: [PATCH][next] ACPICA: Use fallthrough pseudo-keyword

2020-10-14 Thread Joe Perches
On Wed, 2020-10-14 at 20:48 +, Moore, Robert wrote: > I'm afraid that the macro does not compile under MSVC: > > warning C4067: unexpected tokens following preprocessor directive - expected > a newline (compiling source file ..\..\source\tools\acpiexec\aetests.c) > > It looks like

Re: [PATCH 0/2] module: some refactoring in module_sig_check()

2020-10-14 Thread Joe Perches
On Wed, 2020-10-14 at 22:44 +0300, Sergey Shtylyov wrote: > On 10/14/20 11:35 AM, Joe Perches wrote: > > [...] > > > > > Here are 2 patches against the 'modules-next' branch of Jessica Yu's > > > > > 'linux.git' repo. > > > > >

Re: [RFC PATCH v2] checkpatch: add shebang check to EXECUTE_PERMISSIONS

2020-10-14 Thread Joe Perches
On Wed, 2020-10-14 at 20:32 +0200, Miguel Ojeda wrote: > On Wed, Oct 14, 2020 at 8:05 PM Joe Perches wrote: > > Any 'formatting off/on' marker should be tool agnostic. > > Agreed, they should have used a compiler-agnostic name for the marker. It means to me that linux has to inv

Re: [PATCH v2] checkpatch: add new exception to repeated word check

2020-10-14 Thread Joe Perches
On Wed, 2020-10-14 at 23:42 +0530, Dwaipayan Ray wrote: > On Wed, Oct 14, 2020 at 11:33 PM Joe Perches wrote: > > On Wed, 2020-10-14 at 22:07 +0530, Dwaipayan Ray wrote: > > > Recently, commit 4f6ad8aa1eac ("checkpatch: move repeated word test") > > >

Re: [RFC PATCH v2] checkpatch: add shebang check to EXECUTE_PERMISSIONS

2020-10-14 Thread Joe Perches
On Wed, 2020-10-14 at 19:45 +0200, Miguel Ojeda wrote: > - Code that should be specially-formatted should be in a > clang-format-off section to begin with, so it doesn't count. clang-format is not the end-all tool. Any 'formatting off/on' marker should be tool agnostic.

Re: [PATCH v2] checkpatch: add new exception to repeated word check

2020-10-14 Thread Joe Perches
On Wed, 2020-10-14 at 22:07 +0530, Dwaipayan Ray wrote: > Recently, commit 4f6ad8aa1eac ("checkpatch: move repeated word test") > moved the repeated word test to check for more file types. But after > this, if checkpatch.pl is run on MAINTAINERS, it generates several > new warnings of the type:

Re: [PATCH] checkpatch: add new exception to repeated word check

2020-10-14 Thread Joe Perches
On Wed, 2020-10-14 at 19:26 +0530, Dwaipayan Ray wrote: > Recently, commit 4f6ad8aa1eac ("checkpatch: move repeated word test") > moved the repeated word test to check for more file types. But after > this, if checkpatch.pl is run on MAINTAINERS, it generates several > new warnings of the type: >

Re: [PATCH 0/2] module: some refactoring in module_sig_check()

2020-10-14 Thread Joe Perches
On Wed, 2020-10-14 at 11:18 +0300, Sergey Shtylyov wrote: > Hello! > > On 14.10.2020 1:44, Joe Perches wrote: > > > > Here are 2 patches against the 'modules-next' branch of Jessica Yu's > > > 'linux.git' repo. > > > I'm doing some little refactoring in

Re: [RFC PATCH v2] checkpatch: add shebang check to EXECUTE_PERMISSIONS

2020-10-14 Thread Joe Perches
On Wed, 2020-10-14 at 09:17 +0200, Lukas Bulwahn wrote: > $ clang-format-10 --version > Ubuntu clang-format version > 10.0.1-++20200928083909+ef32c611aa2-1~exp1~20200928185400.194 > > $ clang-format-10 --help | grep 'dry-run' > --dry-run - If set, do not actually make the

Re: [RFC PATCH v2] checkpatch: add shebang check to EXECUTE_PERMISSIONS

2020-10-14 Thread Joe Perches
On Wed, 2020-10-14 at 08:47 +0200, Lukas Bulwahn wrote: > > On Tue, 13 Oct 2020, Joe Perches wrote: > > > On Wed, 2020-10-14 at 08:36 +0200, Lukas Bulwahn wrote: > > > On Tue, 13 Oct 2020, Joe Perches wrote: > > > > > > > On Wed, 2020-10-14 at 08:

Re: [RFC PATCH v2] checkpatch: add shebang check to EXECUTE_PERMISSIONS

2020-10-14 Thread Joe Perches
On Wed, 2020-10-14 at 08:36 +0200, Lukas Bulwahn wrote: > > On Tue, 13 Oct 2020, Joe Perches wrote: > > > On Wed, 2020-10-14 at 08:21 +0200, Lukas Bulwahn wrote: > > > What does checkpatch.pl warn about and what does clang-format still warn > > > about, which is

Re: [RFC PATCH v2] checkpatch: add shebang check to EXECUTE_PERMISSIONS

2020-10-14 Thread Joe Perches
On Wed, 2020-10-14 at 08:21 +0200, Lukas Bulwahn wrote: > What does checkpatch.pl warn about and what does clang-format still warn > about, which is generally accepted okay as style in the kernel? clang-format doesn't warn at all, it just reformats. checkpatch using the --in-place can reformat

Re: [RFC PATCH v2] checkpatch: add shebang check to EXECUTE_PERMISSIONS

2020-10-14 Thread Joe Perches
On Wed, 2020-10-14 at 07:46 +0200, Lukas Bulwahn wrote: > Just one bigger project example: Comparing clang-format suggestions on > patches against checkpatch.pl suggestions are fine-tuning both of them to fit > to > the actual kernel style. Eek no. Mindless use of either tool isn't a great

iwlwifi: spaces in procfs filenames ?

2020-10-13 Thread Joe Perches
commit 64fa3aff89785b5a924ce3934f6595c35b4dffee Author: Sharon Dvir Date: Wed Aug 17 15:35:09 2016 +0300 iwlwifi: pcie: give a meaningful name to interrupt request perhaps unintentionally for file: drivers/net/wireless/intel/iwlwifi/pcie/internal.h in function static inline const char

Re: [PATCH 0/2] module: some refactoring in module_sig_check()

2020-10-13 Thread Joe Perches
On Tue, 2020-10-13 at 23:32 +0300, Sergey Shtylyov wrote: > Here are 2 patches against the 'modules-next' branch of Jessica Yu's > 'linux.git' repo. > I'm doing some little refactoring in module_sig_check()... > > [1/2] module: merge repetitive strings in module_sig_check() > [2/2] module:

Re: sysfs filenames with spaces

2020-10-13 Thread Joe Perches
On Tue, 2020-10-13 at 19:17 +0200, Pavel Machek wrote: > On Mon 2020-10-05 19:41:15, Joe Perches wrote: > > This doesn't seem like a great idea to me. > > > > For my system I've got: > > > > /sys/devices/platform/Fixed MDIO bus.0/ > > /sys/bus/platfor

Re: [PATCH] MAINTAINERS: jarkko.sakki...@linux.intel.com -> jar...@kernel.org

2020-10-13 Thread Joe Perches
On Tue, 2020-10-13 at 22:25 +0300, Jarkko Sakkinen wrote: > On Tue, Oct 13, 2020 at 08:30:38AM -0700, Joe Perches wrote: > > On Tue, 2020-10-13 at 13:46 +0300, Jarkko Sakkinen wrote: > > > Use korg address as the main communications end point. Update the > > &

Re: [PATCH] MAINTAINERS: jarkko.sakki...@linux.intel.com -> jar...@kernel.org

2020-10-13 Thread Joe Perches
On Tue, 2020-10-13 at 13:46 +0300, Jarkko Sakkinen wrote: > Use korg address as the main communications end point. Update the > corresponding M-entries. Maybe add an equivalent entry to .mailmap? > diff --git a/MAINTAINERS b/MAINTAINERS [] > -M: Jarkko Sakkinen > +M: Jarkko Sakkinen

Re: [RFC PATCH v2] checkpatch: add shebang check to EXECUTE_PERMISSIONS

2020-10-13 Thread Joe Perches
On Tue, 2020-10-13 at 17:43 +0530, Ujjwal Kumar wrote: > Consider the following case: > a python script file with '.py' filename extension but without > a shebang line. Would it be meaningful to allow execute permission > on such a file? More the question I think is for a patch to that file, how

Re: [PATCH v2] checkpatch: fix missing whitespace in formatted email

2020-10-13 Thread Joe Perches
On Tue, 2020-10-13 at 12:06 +0530, Dwaipayan Ray wrote: > Commit 0c01921e56f9 ("checkpatch: add new warnings to author signoff > checks.") introduced new checks for author sign off. The format_email > procedure was modified to add comment blocks to the formatted email. But > no space was added

[PATCH] atomics.tbl: Remove executable permission bits

2020-10-12 Thread Joe Perches
commit 4d8e5cd233db ("locking/atomics: Fix scripts/atomic/ script permissions") set all files in this directory executable. But this file is an input to those scripts and does not need to be executable. Signed-off-by: Joe Perches --- scripts/atomic/atomics.tbl | 0 1 file changed, 0

Re: [PATCH AUTOSEL 5.8 18/24] net: usb: rtl8150: set random MAC address when set_ethernet_addr() fails

2020-10-12 Thread Joe Perches
On Mon, 2020-10-12 at 15:02 -0400, Sasha Levin wrote: > From: Anant Thazhemadam > > [ Upstream commit f45a4248ea4cc13ed50618ff066849f9587226b2 ] > > When get_registers() fails in set_ethernet_addr(),the uninitialized > value of node_id gets copied over as the address. > So, check the return

Re: [PATCH] ima: Fix sizeof mismatches

2020-10-12 Thread Joe Perches
On Mon, 2020-10-12 at 13:51 -0400, Mimi Zohar wrote: > On Wed, 2020-10-07 at 11:27 -0700, Joe Perches wrote: > > On Wed, 2020-10-07 at 12:02 +0100, Colin King wrote: > > > An incorrect sizeof is being used, sizeof(*fields) is not correct, > > > it should be sizeof(**f

Re: [PATCH -v4] checkpatch: Check for .byte-spelled insn opcodes documentation on x86

2020-10-12 Thread Joe Perches
On Mon, 2020-10-12 at 19:55 +0200, Borislav Petkov wrote: > On Mon, Oct 12, 2020 at 10:40:07AM -0700, Joe Perches wrote: > > Why? I think it unnecessary. > > Joe, I'm sick'n'tired of debating with you what needs to happen. > > Please forget that patch altogether Fine

Re: [PATCH -v4] checkpatch: Check for .byte-spelled insn opcodes documentation on x86

2020-10-12 Thread Joe Perches
On Mon, 2020-10-12 at 19:31 +0200, Borislav Petkov wrote: > On Mon, Oct 12, 2020 at 10:17:56AM -0700, Joe Perches wrote: > > Workie here. This is against -next. > > Nevermind - I had an old version in that branch. > > What I mind to, however, is: > > "

Re: [PATCH -v4] checkpatch: Check for .byte-spelled insn opcodes documentation on x86

2020-10-12 Thread Joe Perches
On Mon, 2020-10-12 at 19:15 +0200, Borislav Petkov wrote: > On Mon, Oct 12, 2020 at 10:09:44AM -0700, Joe Perches wrote: > > From: Borislav Petkov > > > > Instruction opcode bytes spelled using the gas directive .byte should > > carry a comment above them stating which

[PATCH -v4] checkpatch: Check for .byte-spelled insn opcodes documentation on x86

2020-10-12 Thread Joe Perches
the minimum-supported version by the kernel. Add a check for that. Requested-by: Peter Zijlstra Signed-off-by: Borislav Petkov Signed-off-by: Joe Perches --- v4: trivial neatening of $Hex_byte and adding a mechanism to only emit the message once per patched file (Joe) scripts/checkpatch.pl

Re: [RFC PATCH] checkpatch: add shebang check to EXECUTE_PERMISSIONS

2020-10-12 Thread Joe Perches
On Mon, 2020-10-12 at 16:16 +0200, Lukas Bulwahn wrote: > On Mon, 12 Oct 2020, Ujjwal Kumar wrote: > > On 12/10/20 11:47 am, Joe Perches wrote: > > > On Mon, 2020-10-12 at 11:19 +0530, Ujjwal Kumar wrote: > > > > checkpatch.pl checks for invalid EXECUTE_PERMI

Re: [RFC PATCH] checkpatch: add shebang check to EXECUTE_PERMISSIONS

2020-10-12 Thread Joe Perches
On Mon, 2020-10-12 at 19:22 +0530, Ujjwal Kumar wrote: > On 12/10/20 11:47 am, Joe Perches wrote: > > On Mon, 2020-10-12 at 11:19 +0530, Ujjwal Kumar wrote: > > > checkpatch.pl checks for invalid EXECUTE_PERMISSIONS on source > > > files. The script leverages filen

Re: [PATCH -v3] checkpatch: Check for .byte-spelled insn opcodes documentation on x86

2020-10-12 Thread Joe Perches
On Mon, 2020-10-12 at 16:23 +0200, Borislav Petkov wrote: > From: Borislav Petkov [] > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl [] > @@ -408,6 +408,7 @@ our $Lval = qr{$Ident(?:$Member)*}; > our $Int_type= qr{(?i)llu|ull|ll|lu|ul|l|u}; > our $Binary =

Re: [PATCH] checkpatch: Check for .byte-spelled insn opcodes documentation on x86

2020-10-12 Thread Joe Perches
On Mon, 2020-10-12 at 16:21 +0200, Borislav Petkov wrote: > On Sat, Oct 10, 2020 at 09:47:59AM -0700, Joe Perches wrote: > > > '/\s*\.byte\s+(?:0x[0-9a-f]{1,2}[\s,]*){2,}/i' > > ^^^ ^ > > now useless without the " > &

Re: [RFC PATCH] checkpatch: add shebang check to EXECUTE_PERMISSIONS

2020-10-12 Thread Joe Perches
On Mon, 2020-10-12 at 11:19 +0530, Ujjwal Kumar wrote: > checkpatch.pl checks for invalid EXECUTE_PERMISSIONS on source > files. The script leverages filename extensions and its path in > the repository to decide whether to allow execute permissions on > the file or not. > > Based on current

Re: git grep/sed to standardize "/* SPDX-License-Identifier: "

2020-10-11 Thread Joe Perches
On Sun, 2020-10-11 at 11:47 -0700, Joe Perches wrote: > On Sun, 2020-10-11 at 11:42 -0700, Linus Torvalds wrote: > > On Tue, Oct 6, 2020 at 4:13 PM Joe Perches wrote: > > > Almost all source files in the kernel use a standardized SPDX header > > > at line 1

Re: [PATCH v2] net: usb: rtl8150: don't incorrectly assign random MAC addresses

2020-10-11 Thread Joe Perches
On Sun, 2020-10-11 at 22:31 +0300, Petko Manolov wrote: > On 20-10-11 11:33:00, Joe Perches wrote: > > On Sun, 2020-10-11 at 10:59 -0700, Jakub Kicinski wrote: > > > On Sun, 11 Oct 2020 23:00:30 +0530 Anant Thazhemadam wrote: > > > > In set_ethernet_addr(

Re: git grep/sed to standardize "/* SPDX-License-Identifier: "

2020-10-11 Thread Joe Perches
On Sun, 2020-10-11 at 11:42 -0700, Linus Torvalds wrote: > On Tue, Oct 6, 2020 at 4:13 PM Joe Perches wrote: > > Almost all source files in the kernel use a standardized SPDX header > > at line 1 with a comment /* initiator and terminator */: > > > >

Re: [PATCH v2] net: usb: rtl8150: don't incorrectly assign random MAC addresses

2020-10-11 Thread Joe Perches
On Sun, 2020-10-11 at 10:59 -0700, Jakub Kicinski wrote: > On Sun, 11 Oct 2020 23:00:30 +0530 Anant Thazhemadam wrote: > > In set_ethernet_addr(), if get_registers() succeeds, the ethernet address > > that was read must be copied over. Otherwise, a random ethernet address > > must be assigned. > >

Re: [PATCH] checkpatch: Check for .byte-spelled insn opcodes documentation on x86

2020-10-10 Thread Joe Perches
On Sat, 2020-10-10 at 18:11 +0200, Borislav Petkov wrote: > On Sat, Oct 10, 2020 at 08:27:20AM -0700, Joe Perches wrote: > > Then this could use: > > > > /"\s*\.byte\s+(?:0x[0-9a-fA-F]{1,2}\s*,\s*){2,4}/ > > Yes, this is getting close. > > I've tweaked it a

Re: [PATCH] checkpatch: Check for .byte-spelled insn opcodes documentation on x86

2020-10-10 Thread Joe Perches
On Sat, 2020-10-10 at 12:54 +0200, Borislav Petkov wrote: > > checkpatch uses only a single line output only before $herecurr > > Output line length doesn't matter. [] > WARNING: Please document which binutils version supports these .byte-spelled > insn opcodes by adding "binutils version

Re: [PATCH] checkpatch: Check for .byte-spelled insn opcodes documentation on x86

2020-10-10 Thread Joe Perches
On Sat, 2020-10-10 at 12:54 +0200, Borislav Petkov wrote: > On Fri, Oct 09, 2020 at 11:01:18AM -0700, Joe Perches wrote: > > Given the location, this only works on .c and .h files. > > It does not work on .S files. Should it? > > Probably not because there will be too many f

Re: [PATCH] Fixed coding style issues raised by checkpatch.

2020-10-09 Thread Joe Perches
On Fri, 2020-10-09 at 10:18 +0200, Greg Kroah-Hartman wrote: > On Fri, Oct 09, 2020 at 09:00:38AM +0100, Tabot Kevin wrote: > > This patch fixes the following: > > - Made sure alignment matched open parenthesis. > > > > Signed-off-by: Tabot Kevin > > --- > >

Re: [PATCH] checkpatch: Check for .byte-spelled insn opcodes documentation on x86

2020-10-09 Thread Joe Perches
On Fri, 2020-10-09 at 18:14 +0200, Borislav Petkov wrote: > From: Borislav Petkov > > Instruction opcode bytes spelled using the gas directive .byte should > carry a comment above them stating which binutils version has added > support for the instruction mnemonic so that they can be replaced

Re: checkpatch.pl: REPEATED_WORD: massive false positive in MAINTAINERS

2020-10-08 Thread Joe Perches
On Thu, 2020-10-08 at 13:50 +0200, Lukas Bulwahn wrote: > Dear Joe, dear Dwaipayan, > > while maintaining MAINTAINERS, I noticed that the REPEATED_WORD check, > which in general is a great addition to checkpatch.pl, generates a massive > number of warnings due to one specific pattern in the

Re: [PATCH-next 0/4] RDMA: sprintf to sysfs_emit conversions

2020-10-07 Thread Joe Perches
On Thu, 2020-10-08 at 08:41 +0300, Leon Romanovsky wrote: > On Wed, Oct 07, 2020 at 07:36:23PM -0700, Joe Perches wrote: > > A recent commit added a sysfs_emit and sysfs_emit_at to allow various > > sysfs show functions to ensure that the PAGE_SIZE buffer argument is > > nev

[likely PATCH] MAINTAINERS: CISCO VIC LOW LATENCY NIC DRIVER

2020-10-07 Thread Joe Perches
Parvi Kaustubhi's email bounces. Signed-off-by: Joe Perches --- MAINTAINERS | 1 - 1 file changed, 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 9ecb727f0a8f..3647500be78f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4275,7 +4275,6 @@ F:drivers/net/ethernet/cisco/enic

[PATCH-next 0/4] RDMA: sprintf to sysfs_emit conversions

2020-10-07 Thread Joe Perches
) old: 83658831681032 131520 10178435 9b4f83 (TOTALS) total size: defconfig x86-64 with all infiniband selected new; 1359153 1312281910 1492291 16c543 (TOTALS) old: 1359422 1312281910 1492560 16c650 (TOTALS) Joe Perches (4): RDMA: Convert sysfs device * show functions to use

Re: [PATCH] drm/fourcc: Add AXBXGXRX106106106106 format

2020-10-07 Thread Joe Perches
On Wed, 2020-10-07 at 10:27 +0100, Matteo Franchin wrote: > Add ABGR format with 10-bit components packed in 64-bit per pixel. > This format can be used to handle > VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16 on little-endian > architectures. trivial note: > diff --git

Re: [PATCH v6] checkpatch: add new warnings to author signoff checks.

2020-10-07 Thread Joe Perches
nsible and let's see how it goes... Acked-by: Joe Perches > For example, running checkpatch on commit be6577af0cef > ("parisc: Add atomic64_set_release() define to avoid CPU soft lockups"), > gives: > > WARNING: Missing Signed-off-by: line by nominal patch author > 'John Da

Re: [PATCH v5] checkpatch: add new warnings to author signoff checks.

2020-10-07 Thread Joe Perches
On Thu, 2020-10-08 at 00:08 +0530, Dwaipayan Ray wrote: > On Wed, Oct 7, 2020 at 11:48 PM Joe Perches wrote: > > On Wed, 2020-10-07 at 12:08 +0530, Dwaipayan Ray wrote: > > > On Wed, Oct 7, 2020 at 12:03 PM Dwaipayan Ray > > > wrote: > > > > The author

Re: [PATCH] ima: Fix sizeof mismatches

2020-10-07 Thread Joe Perches
On Wed, 2020-10-07 at 12:02 +0100, Colin King wrote: > An incorrect sizeof is being used, sizeof(*fields) is not correct, > it should be sizeof(**fields). This is not causing a problem since > the size of these is the same. Fix this in the kmalloc_array and > memcpy calls. [] > diff --git

Re: [PATCH v5] checkpatch: add new warnings to author signoff checks.

2020-10-07 Thread Joe Perches
On Wed, 2020-10-07 at 12:08 +0530, Dwaipayan Ray wrote: > On Wed, Oct 7, 2020 at 12:03 PM Dwaipayan Ray wrote: > > The author signed-off-by checks are currently very vague. > > Cases like same name or same address are not handled separately. Likely now, the type should be changed from

Re: [PATCH -next] mm: Use sysfs_emit functions not sprintf

2020-10-07 Thread Joe Perches
On Wed, 2020-10-07 at 09:53 -0300, Jason Gunthorpe wrote: > On Wed, Oct 07, 2020 at 12:16:01AM -0700, Kees Cook wrote: > > On Tue, Oct 06, 2020 at 09:28:17AM -0700, Joe Perches wrote: > > > Convert the various uses of sprintf/snprintf/scnprintf to > > > format

Re: [PATCH RFC] script: add a script for checking doc problems with external functions

2020-10-07 Thread Joe Perches
On Wed, 2020-10-07 at 11:23 +0300, Jani Nikula wrote: > On Tue, 06 Oct 2020, Mauro Carvalho Chehab wrote: > > While not all EXPORT_SYMBOL*() symbols should be documented, > > it seems useful to have a tool which would help to check what > > symbols aren't documented. > > > > This is a first step

git grep/sed to standardize "/* SPDX-License-Identifier: "

2020-10-06 Thread Joe Perches
Almost all source files in the kernel use a standardized SPDX header at line 1 with a comment /* initiator and terminator */: /* SPDX-License-Identifier: */ $ git grep -PHn '^/\* SPDX-License-Identifier:.*\*/\s*$' | \ wc -l 17847 $ git grep -PHn '^/\* SPDX-License-Identifier:.*\*/\s*$' | \

Re: [PATCH v4] checkpatch: add new warnings to author signoff checks.

2020-10-06 Thread Joe Perches
On Tue, 2020-10-06 at 13:09 -0700, Joe Perches wrote: > I suggest adding it to this patch. as a --strict CHK as it's not an actual defect in addressing just a trivial difference in formatting.

Re: [PATCH v4] checkpatch: add new warnings to author signoff checks.

2020-10-06 Thread Joe Perches
On Wed, 2020-10-07 at 00:31 +0530, Dwaipayan Ray wrote: > On Wed, Oct 7, 2020 at 12:25 AM Joe Perches wrote: > > On Wed, 2020-10-07 at 00:21 +0530, Dwaipayan Ray wrote: > > > The author signed-off-by checks are currently very vague. > > > Cases like same name or s

Re: [PATCH v4] checkpatch: add new warnings to author signoff checks.

2020-10-06 Thread Joe Perches
On Wed, 2020-10-07 at 00:21 +0530, Dwaipayan Ray wrote: > The author signed-off-by checks are currently very vague. > Cases like same name or same address are not handled separately. > > For example, running checkpatch on commit be6577af0cef > ("parisc: Add atomic64_set_release() define to avoid

Re: [PATCH v3] checkpatch: add new warnings to author signoff checks.

2020-10-06 Thread Joe Perches
On Tue, 2020-10-06 at 18:45 +0530, Dwaipayan Ray wrote: > To summarize it, two changes that could be made are > the CHK for subaddress extension could be converted to > a WARN, and the WARN in case of a missing author signoff > could be converted to an ERROR. Sure, why not...

Re: [PATCH 2/2] media: staging: atomisp: Removed else branch in function

2020-10-06 Thread Joe Perches
On Tue, 2020-10-06 at 21:04 +0300, Dan Carpenter wrote: > Code should generally do "error handling" instead of "success handling". Maybe something to add to coding-style (in '6} Functions' maybe?)... > That way the success path is always indented one tab and the error path > is indented two

Re: [PATCH v5 00/52] Fix html build with Sphinx 3.1 and above

2020-10-06 Thread Joe Perches
On Tue, 2020-10-06 at 16:02 +0200, Mauro Carvalho Chehab wrote: > This series add proper support for Sphinx 3.1 and above for building the html > docs. Thanks Mauro. I do like how the source docs are simplified for human reading instead of having to mentally skip useless markup notations.

Re: [PATCH] scripts: kernel-doc: allow passing desired Sphinx C domain dialect

2020-10-06 Thread Joe Perches
On Tue, 2020-10-06 at 08:01 -0600, Jonathan Corbet wrote: > On Tue, 6 Oct 2020 08:42:07 +0200 > Mauro Carvalho Chehab wrote: > > > As right now we don't support Sphinx version 3.0[1], we're actually using > > just > > $sphinx_major. So, I'm wonder if it would make sense to also make > >

[PATCH -next] mm: Use sysfs_emit functions not sprintf

2020-10-06 Thread Joe Perches
len += sprintf(buf, len, "%d", a); to len += sysfs_emit_at(buf, len, "%d", a); if (foo) len += sysfs_emit_at(buf, len, "/%d/%d", b, c); o whitespace neatening around these changes Signed-off-by: Joe Perches --- Depends on n

Re: [PATCH v2] checkpatch: Fix false positive on empty block comment lines

2020-10-06 Thread Joe Perches
On Tue, 2020-10-06 at 10:35 +0200, Ɓukasz Stelmach wrote: > To avoid false positives in presence of SPDX-License-Identifier in > networking files it is required to increase the leeway for empty block > comment lines by one line. > > For example, checking drivers/net/loopback.c which starts with >

Re: [PATCH] scripts: kernel-doc: allow passing desired Sphinx C domain dialect

2020-10-06 Thread Joe Perches
On Tue, 2020-10-06 at 08:42 +0200, Mauro Carvalho Chehab wrote: > Em Mon, 5 Oct 2020 10:17:36 -0600 > Jonathan Corbet escreveu: [] > Sure. It should be easy to make the third argument optional, although > the regex will be a little more harder to understand. > > Something like this should do the

Re: [RFC PATCH] DRM: amd: powerplay: don't undef pr_warn() {causes ARC build errors}

2020-10-05 Thread Joe Perches
On Mon, 2020-10-05 at 21:50 -0700, Randy Dunlap wrote: > From: Randy Dunlap > > arch/arc/ implements BUG_ON() with BUG(). ARC has its own BUG() > function and that function uses pr_warn() as part of its implementation. > > Several (8) files in amd/powerplay/ #undef various pr_xyz() functions so

Re: [PATCH] rtlwifi: rtl8192se: remove duplicated legacy_httxpowerdiff

2020-10-05 Thread Joe Perches
On Tue, 2020-10-06 at 11:59 +0800, Chris Chiu wrote: > From: Chris Chiu > > The legacy_httxpowerdiff in rtl8192se is pretty much the same as > the legacy_ht_txpowerdiff for other chips. Use the same name to > keep the consistency. > > Signed-off-by: Chris Chiu > --- >

Re: [RFC PATCH next-20200930] treewide: Convert macro and uses of __section(foo) to __section("foo")

2020-10-05 Thread Joe Perches
On Tue, 2020-10-06 at 00:34 +, Joel Stanley wrote: > arch/powerpc/boot is the powerpc wrapper, and it's not built with the > same includes or flags as the rest of the kernel. It doesn't include > any of the headers in the top level include/ directory for hysterical > raisins. > > The

sysfs filenames with spaces

2020-10-05 Thread Joe Perches
This doesn't seem like a great idea to me. For my system I've got: /sys/devices/platform/Fixed MDIO bus.0/ /sys/bus/platform/drivers/int3401 thermal/ /sys/bus/platform/drivers/int3403 thermal/ /sys/bus/platform/drivers/int3400 thermal/ /sys/bus/mdio_bus/drivers/Generic PHY/

Re: [PATCH v3] checkpatch: add new warnings to author signoff checks.

2020-10-05 Thread Joe Perches
On Tue, 2020-10-06 at 01:37 +0530, Dwaipayan Ray wrote: > On Tue, Oct 6, 2020 at 1:07 AM Joe Perches wrote: > > On Tue, 2020-10-06 at 00:54 +0530, Dwaipayan Ray wrote: > > > The author signed-off-by checks are currently very vague. > > > Cases like same name or s

Re: [PATCH v3] checkpatch: add new warnings to author signoff checks.

2020-10-05 Thread Joe Perches
On Tue, 2020-10-06 at 00:54 +0530, Dwaipayan Ray wrote: > The author signed-off-by checks are currently very vague. > Cases like same name or same address are not handled separately. When you run tests for this, how many mismatches are caused by name formatting changes like: From: "Developer, J.

Re: [PATCH] sound: sparc: dbri: fix repeated word 'the'

2020-10-05 Thread Joe Perches
On Mon, 2020-10-05 at 12:12 -0700, Randy Dunlap wrote: > Drop the duplicated word "the". [] > --- lnx-59-rc8.orig/sound/sparc/dbri.c > +++ lnx-59-rc8/sound/sparc/dbri.c > @@ -620,7 +620,7 @@ A circular command buffer is used here. > while another can be executed. The scheme works by adding two

Re: [PATCH v2] checkpatch: add new warnings to author signoff checks.

2020-10-05 Thread Joe Perches
On Tue, 2020-10-06 at 00:16 +0530, Dwaipayan Ray wrote: > Are there any more changes needed? Dunno. Let's see what's needed if you submit a v3.

Re: [RFC PATCH next-20200930] treewide: Convert macro and uses of __section(foo) to __section("foo")

2020-10-05 Thread Joe Perches
On Mon, 2020-10-05 at 11:36 -0700, Nick Desaulniers wrote: > I don't think there's anything wrong with manually including it and adding `-I > ` (capital i) if needed. All of this is secondary to the actual change to use quoted __section("foo") rather than __section(foo) I'd rather get that done

Re: [PATCH v2] checkpatch: add new warnings to author signoff checks.

2020-10-05 Thread Joe Perches
On Mon, 2020-10-05 at 23:09 +0530, Dwaipayan Ray wrote: > The author signed-off-by checks are currently very vague. > Cases like same name or same address are not handled separately. [] > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl [] > +

Re: [PATCH RFC] checkpatch: add new warnings to author signoff checks.

2020-10-05 Thread Joe Perches
On Mon, 2020-10-05 at 13:10 +0530, Dwaipayan Ray wrote: > On Mon, Oct 5, 2020 at 12:48 PM Joe Perches wrote: > > On Mon, 2020-10-05 at 12:18 +0530, Dwaipayan Ray wrote: > > > The author signed-off-by checks are currently very vague. > > > Cases like same name or s

Re: [PATCH RFC] checkpatch: add new warnings to author signoff checks.

2020-10-05 Thread Joe Perches
On Mon, 2020-10-05 at 12:18 +0530, Dwaipayan Ray wrote: > The author signed-off-by checks are currently very vague. > Cases like same name or same address are not handled separately. > > For example, running checkpatch on commit be6577af0cef > ("parisc: Add atomic64_set_release() define to avoid

Re: [PATCH] test_power: add missing newlines when printing parameters by sysfs

2020-10-04 Thread Joe Perches
On Mon, 2020-10-05 at 01:30 +, Harley A.W. Lorenzo wrote: > Here is the updated patch using sprintf, diffing from the original patch by > Xiongfeng Wang. > > [PATCH] test_power: revise parameter printing to use sprintf > > Signed-off-by: Harley A.W. Lorenzo > Suggeste

Re: Where is the declaration of buffer used in kernel_param_ops .get functions?

2020-10-03 Thread Joe Perches
On Sun, 2020-10-04 at 02:36 +0100, Matthew Wilcox wrote: > On Sat, Oct 03, 2020 at 06:19:18PM -0700, Joe Perches wrote: > > These patches came up because I was looking for > > the location of the declaration of the buffer used > > in kernel/params.c struct kernel_param_o

Where is the declaration of buffer used in kernel_param_ops .get functions?

2020-10-03 Thread Joe Perches
These patches came up because I was looking for the location of the declaration of the buffer used in kernel/params.c struct kernel_param_ops .get functions. I didn't find it. I want to see if it's appropriate to convert the sprintf family of functions used in these .get functions to sysfs_emit.

<    2   3   4   5   6   7   8   9   10   11   >