Re: [PATCH v2] checkpatch: ignore warning designated initializers using NR_CPUS

2020-12-30 Thread Joe Perches
On Wed, 2020-12-30 at 15:14 +0800, Peng Wang wrote: > Some max_length wants to hold as large room as possible to > ensure enough size to tackle with the biggest NR_CPUS. > An example below: > > kernel/cgroup/cpuset.c: > static struct cftype legacy_files[] = { > { > .name =

Re: [PATCH] liquidio: fix: warning: %u in format string (no. 3) requires 'unsigned int' but the argument type is 'signed int'.

2020-12-29 Thread Joe Perches
On Wed, 2020-12-30 at 14:41 +0800, YANG LI wrote: > For safety, modify '%u' to '%d' to keep the type consistent. There is no additional safety here. The for loop ensures that i is positive as num_ioq_vector is also int and so i can not be negative as it's incremented from 0. > diff --git

Re: [PATCH] liquidio: style: Identical condition and return expression 'retval', return value is always 0.

2020-12-29 Thread Joe Perches
On Wed, 2020-12-30 at 14:07 +0800, YANG LI wrote: > The warning was because of the following line in function > liquidio_set_fec(): > > retval = wait_for_sc_completion_timeout(oct, sc, 0); > if (retval) > return (-EIO); I presume abaci is a robot Perhaps also the robot could look for

Re: [PATCH] checkpatch: ignore warning designated initializers using NR_CPUS

2020-12-29 Thread Joe Perches
On Wed, 2020-12-30 at 12:13 +0800, Peng Wang wrote: > Some max_length wants to hold as large room as possible to > ensure enough size to tackle with the biggest NR_CPUS. As > an example below: > > kernel/cgroup/cpuset.c: > static struct cftype legacy_files[] = { > { >

Re: [RFC PATCH v2 00/19] dynamic debug diet plan

2020-12-29 Thread Joe Perches
On Fri, 2020-12-25 at 13:19 -0700, Jim Cromie wrote: > Well, we're mostly overeating, but we can all look forward to a diet > in January. And more exersize. > > dyndbg's compiled-in data-table currently uses 56 bytes per prdebug; > this includes 3 pointers to hierarchical "decorator" data, which

Re: [PATCH net-next] net/mlx5: Use kzalloc for allocating only one thing

2020-12-29 Thread Joe Perches
On Tue, 2020-12-29 at 21:53 +0800, Zheng Yongjun wrote: > Use kzalloc rather than kcalloc(1,...) [] > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c > b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c [] > @@ -1782,7 +1782,7 @@ static int

Re: [PATCH 8455/8455] staging: rtl8188eu: core: fixed a comment format issue.

2020-12-28 Thread Joe Perches
On Mon, 2020-12-28 at 15:09 +0100, Greg KH wrote: > On Sat, Dec 19, 2020 at 02:43:12PM -0800, Daniel West wrote: > > Fixed a checkpatch warning: > > > > WARNING: Block comments use * on subsequent lines > >  #4595: FILE: drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:4595: > >

Re: [PATCH 8455/8455] staging: rtl8188eu: core: fixed a comment format issue.

2020-12-28 Thread Joe Perches
On Mon, 2020-12-28 at 15:09 +0100, Greg KH wrote: > On Sat, Dec 19, 2020 at 02:43:12PM -0800, Daniel West wrote: > > Fixed a checkpatch warning: > > > > WARNING: Block comments use * on subsequent lines > >  #4595: FILE: drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:4595: > >

Re: [PATCH] cpuset: Remove stale URLs in the MAINTAINERS entry

2020-12-27 Thread Joe Perches
On Mon, 2020-12-28 at 11:17 +0800, Zefan Li wrote: > Those URLs are no longer accessable. > > Reported-by: Steve Wahl > Signed-off-by: Zefan Li > --- >  MAINTAINERS | 2 -- >  1 file changed, 2 deletions(-) > > diff --git a/MAINTAINERS b/MAINTAINERS > index ae9b1dd748c4..2fe8eb54639e 100644 >

Re: [PATCH] ethernet: Remove invalid trailers after %pI4

2020-12-26 Thread Joe Perches
On Sat, 2020-12-26 at 09:10 -0800, Joe Perches wrote: > Alphanumeric characters after vsprintf pointer extension %pI4 are > not valid and are not emitted. > > Remove the invalid characters from the %pI4 uses. self-nak. I believe I misunderstood the format specifier.

[PATCH] ethernet: Remove invalid trailers after %pI4

2020-12-26 Thread Joe Perches
Alphanumeric characters after vsprintf pointer extension %pI4 are not valid and are not emitted. Remove the invalid characters from the %pI4 uses. Signed-off-by: Joe Perches --- drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 6 +++--- drivers/net/ethernet/intel/i40e/i40e_main.c

Re: [PATCH v2 3/4] checkpatch: kconfig: enforce help text indentation

2020-12-26 Thread Joe Perches
On Sat, 2020-12-26 at 15:05 +0100, Nicolai Fischer wrote: > Adds a new warning in case the indentation level of the > first line of a Kconfig help message is not two spaces > higher than the keyword itself. > Blank lines between the message and the help keyword > are ignored. [] > diff --git

Re: [PATCH] mfd: ab8500-debugfs: Remove extraneous curly brace

2020-12-25 Thread Joe Perches
On Fri, 2020-12-25 at 18:35 -0700, Nathan Chancellor wrote: > Clang errors: > > ../drivers/mfd/ab8500-debugfs.c:1526:2: error: non-void function does > not return a value [-Werror,-Wreturn-type] > } > ^ > ../drivers/mfd/ab8500-debugfs.c:1528:2: error: expected identifier or '(' >

Re: [PATCH] nfp: remove h from printk format specifier

2020-12-25 Thread Joe Perches
On Fri, 2020-12-25 at 14:13 -0800, Tom Rix wrote: > On 12/25/20 9:06 AM, Joe Perches wrote: > > On Fri, 2020-12-25 at 06:56 -0800, Tom Rix wrote: > > > On 12/24/20 2:39 PM, Joe Perches wrote: > > [] > > > > Kernel code doesn't use a signed char or short

Re: [PATCH 2/2] checkpatch: kconfig: add missing types to regex

2020-12-25 Thread Joe Perches
On Fri, 2020-12-25 at 18:27 +0100, Nicolai Fischer wrote: > On 12/21/20 6:17 PM, Joe Perches wrote: [] > > The message you used: > > + WARN("CONFIG_DESCRIPTION", > > + "help text is not inden

Re: [PATCH] nfp: remove h from printk format specifier

2020-12-25 Thread Joe Perches
On Fri, 2020-12-25 at 06:56 -0800, Tom Rix wrote: > On 12/24/20 2:39 PM, Joe Perches wrote: [] > > Kernel code doesn't use a signed char or short with %hx or %hu very often > > but in case you didn't already know, any signed char/short emitted with > > anything like %hx or

Re: [PATCH] nfp: remove h from printk format specifier

2020-12-24 Thread Joe Perches
On Thu, 2020-12-24 at 14:14 -0800, Tom Rix wrote: > On 12/24/20 12:21 PM, Simon Horman wrote: > > On Wed, Dec 23, 2020 at 12:20:53PM -0800, t...@redhat.com wrote: > > > From: Tom Rix > > > > > > This change fixes the checkpatch warning described in this commit > > > commit cbacb5ab0aa0 ("docs:

Re: [PATCH] staging: ralink-gdma: Fixed blank line coding style issue

2020-12-24 Thread Joe Perches
On Wed, 2020-12-23 at 21:22 +0100, Ayoub Soussi wrote: > Fixed coding style issue. [] > diff --git a/drivers/staging/ralink-gdma/ralink-gdma.c > b/drivers/staging/ralink-gdma/ralink-gdma.c [] > @@ -122,6 +122,7 @@ struct gdma_dma_dev { >   struct gdma_data *data; >   void __iomem *base; >

Re: [PATCH] staging: ralink-gdma: Fixed blank line coding style issue

2020-12-24 Thread Joe Perches
On Wed, 2020-12-23 at 21:22 +0100, Ayoub Soussi wrote: > Fixed coding style issue. [] > diff --git a/drivers/staging/ralink-gdma/ralink-gdma.c > b/drivers/staging/ralink-gdma/ralink-gdma.c [] > @@ -122,6 +122,7 @@ struct gdma_dma_dev { >   struct gdma_data *data; >   void __iomem *base; >

Re: [PATCH] staging: rtl8723bs: clean up brace coding style issues

2020-12-24 Thread Joe Perches
On Tue, 2020-12-22 at 15:17 +0100, Michael Straube wrote: > Add missing braces around else arm of if else statement to clear > style issues reported by checkpatch. > > CHECK: braces {} should be used on all arms of this statement > CHECK: Unbalanced braces around else statement [] > diff --git

Re: [PATCH] staging: rtl8723bs: clean up brace coding style issues

2020-12-24 Thread Joe Perches
On Tue, 2020-12-22 at 15:17 +0100, Michael Straube wrote: > Add missing braces around else arm of if else statement to clear > style issues reported by checkpatch. > > CHECK: braces {} should be used on all arms of this statement > CHECK: Unbalanced braces around else statement [] > diff --git

Re: [PATCH] amd-xgbe: remove h from printk format specifier

2020-12-23 Thread Joe Perches
On Wed, 2020-12-23 at 12:33 -0800, Tom Rix wrote: > On 12/23/20 12:14 PM, Joe Perches wrote: > > On Wed, 2020-12-23 at 11:43 -0800, t...@redhat.com wrote: > > > From: Tom Rix > > > > > > This change fixes the checkpatch warning described in this commit >

Re: [PATCH] amd-xgbe: remove h from printk format specifier

2020-12-23 Thread Joe Perches
On Wed, 2020-12-23 at 11:43 -0800, t...@redhat.com wrote: > From: Tom Rix > > This change fixes the checkpatch warning described in this commit > commit cbacb5ab0aa0 ("docs: printk-formats: Stop encouraging use of > unnecessary %h[xudi] and %hh[xudi]") > > Standard integer promotion is already

Re: [PATCH net] MAINTAINERS: remove names from mailing list maintainers

2020-12-23 Thread Joe Perches
On Wed, 2020-12-23 at 02:50 +, patchwork-bot+netdev...@kernel.org wrote: > Hello: > > This patch was applied to netdev/net.git (refs/heads/master): > > On Sat, 19 Dec 2020 10:55:38 -0800 you wrote: > > When searching for inactive maintainers it's useful to filter > > out mailing list

Re: [PATCH v6 11/11] media: uvcvideo: use dev_printk() for uvc_trace()

2020-12-23 Thread Joe Perches
Perhaps this on top. trace isn't a good name as it's not a trace mechanism, it is a typical debug mechanism. Rename uvc_trace/uvc_trace_cont macros to uvc_dbg/uvc_dbg_cont. Rename uvc_trace_param to uvc_dbg_param Rename UVC_TRACE_ defines to UVC_DBG_ Use ## concatenation in uvc_dbg macros to

[PATCH] checkpatch: Prefer strscpy to strlcpy

2020-12-22 Thread Joe Perches
Prefer strscpy over the deprecated strlcpy function. Requested-by: Andrew Morton Signed-off-by: Joe Perches --- scripts/checkpatch.pl | 6 ++ 1 file changed, 6 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 00085308ed9d..27679cc0ec17 100755 --- a/scripts

Re: [PATCH] checkpatch: make the line length warnings match the coding style document

2020-12-22 Thread Joe Perches
On Tue, 2020-12-22 at 14:12 +0100, Christoph Hellwig wrote: > On Mon, Dec 21, 2020 at 08:08:20PM -0800, Joe Perches wrote: > > On Thu, 2020-12-10 at 13:27 -0800, Joe Perches wrote: > > > On Thu, 2020-12-10 at 20:09 +, Matthew Wilcox wrote: > > > > On Thu, Dec 10,

[PATCH] Bluetooth: btusb: Remove duplicate newlines from logging

2020-12-22 Thread Joe Perches
The bt_dev_ macros already append a newline. Signed-off-by: Joe Perches --- The "No memory" message could be removed as bt_skb_alloc already does a dump_stack() on allocation failure. drivers/bluetooth/btusb.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

Re: [PATCH] usb: musb: add printf attribute to log function

2020-12-22 Thread Joe Perches
On Tue, 2020-12-22 at 09:52 +0100, Greg KH wrote: > On Mon, Dec 21, 2020 at 08:25:47AM -0800, t...@redhat.com wrote: > > From: Tom Rix > > > > Attributing the function allows the compiler to more thoroughly > > check the use of the function with -Wformat and similar flags. > > > >

Re: [PATCH] checkpatch: make the line length warnings match the coding style document

2020-12-21 Thread Joe Perches
On Thu, 2020-12-10 at 13:27 -0800, Joe Perches wrote: > On Thu, 2020-12-10 at 20:09 +, Matthew Wilcox wrote: > > On Thu, Dec 10, 2020 at 12:05:04PM -0800, Joe Perches wrote: > > > Also, given the ever increasing average identifier length, strict > > > adherence to 8

Re: [PATCH] usb: musb: add printf attribute to log function

2020-12-21 Thread Joe Perches
On Mon, 2020-12-21 at 08:25 -0800, t...@redhat.com wrote: > From: Tom Rix > > Attributing the function allows the compiler to more thoroughly > check the use of the function with -Wformat and similar flags. > > Signed-off-by: Tom Rix > --- >  drivers/usb/musb/musb_debug.h | 1 + >  1 file

Re: [PATCH 2/2] checkpatch: kconfig: add missing types to regex

2020-12-21 Thread Joe Perches
On Mon, 2020-12-21 at 16:08 +0100, Nicolai Fischer wrote: > On Sun, 2020-12-20 at 20:16 +0100, Joe Perches wrote: > > On Mon, 2020-12-14 at 11:24 +0100, Nicolai Fischer wrote: > > > Kconfig parsing does not recognise all type attributes. > > > This adds the missing 'in

Re: [PATCH 2/2] checkpatch: kconfig: add missing types to regex

2020-12-20 Thread Joe Perches
On Mon, 2020-12-14 at 11:24 +0100, Nicolai Fischer wrote: > Kconfig parsing does not recognise all type attributes. > This adds the missing 'int', 'sting' and 'hex' types. [] > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl [] > @@ -3321,7 +3321,7 @@ sub process { >  

Re: [PATCH 2/2] checkpatch: kconfig: add missing types to regex

2020-12-20 Thread Joe Perches
On Mon, 2020-12-14 at 11:24 +0100, Nicolai Fischer wrote: > Kconfig parsing does not recognise all type attributes. > This adds the missing 'int', 'sting' and 'hex' types. > > Signed-off-by: Nicolai Fischer > Co-developed-by: Johannes Czekay > Signed-off-by: Johannes Czekay [] > diff --git

Re: [PATCH 1/2] checkpatch: kconfig: replace '---help---' with 'help'

2020-12-20 Thread Joe Perches
y: Johannes Czekay Acked-by: Joe Perches > --- >  scripts/checkpatch.pl | 2 +- >  1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index 52f467fd32f9..5cd98f2b75f6 100755 > --- a/scripts/checkpatch.pl > +++ b/

Re: [PATCH net] MAINTAINERS: remove names from mailing list maintainers

2020-12-19 Thread Joe Perches
On 2020-12-19 10:55, Jakub Kicinski wrote: When searching for inactive maintainers it's useful to filter out mailing list addresses. Such "maintainers" will obviously never feature in a "From:" line of an email or a review tag. Since "L:" entries only provide the address of a mailing list

Re: [PATCH] staging: most: video: fixed a parentheses coding style issue.

2020-12-18 Thread Joe Perches
On Fri, 2020-12-18 at 09:49 +, David Laight wrote: > From: Joe Perches > > Sent: 17 December 2020 23:58 > > > > On Thu, 2020-12-17 at 15:45 -0800, Daniel West wrote: > > > Fixed a coding style issue. > > > > It may pass checkpatch without warning,

Re: [PATCH] staging: most: video: fixed a parentheses coding style issue.

2020-12-18 Thread Joe Perches
On Fri, 2020-12-18 at 09:49 +, David Laight wrote: > From: Joe Perches > > Sent: 17 December 2020 23:58 > > > > On Thu, 2020-12-17 at 15:45 -0800, Daniel West wrote: > > > Fixed a coding style issue. > > > > It may pass checkpatch without warning,

Re: [PATCH] checkpatch: add warning for non-lore mailing list URLs

2020-12-17 Thread Joe Perches
On Thu, 2020-12-17 at 17:56 -0600, Bjorn Helgaas wrote: > From: Bjorn Helgaas > > The lkml.org, marc.info, spinics.net, etc archives are not quite as useful > as lore.kernel.org because they use different styles, add advertising, and > may disappear in the future. The lore archives are more

Re: [PATCH] staging: most: video: fixed a parentheses coding style issue.

2020-12-17 Thread Joe Perches
On Thu, 2020-12-17 at 15:45 -0800, Daniel West wrote: > Fixed a coding style issue. It may pass checkpatch without warning, but it's uncommon kernel coding style. > diff --git a/drivers/staging/most/video/video.c > b/drivers/staging/most/video/video.c [] > @@ -365,8 +365,8 @@ static const

Re: [PATCH] staging: most: video: fixed a parentheses coding style issue.

2020-12-17 Thread Joe Perches
On Thu, 2020-12-17 at 15:45 -0800, Daniel West wrote: > Fixed a coding style issue. It may pass checkpatch without warning, but it's uncommon kernel coding style. > diff --git a/drivers/staging/most/video/video.c > b/drivers/staging/most/video/video.c [] > @@ -365,8 +365,8 @@ static const

ntfs: extern vs inline?

2020-12-17 Thread Joe Perches
Hello Anton. I was looking around for bare inline uses and found this in fs/ntfs/inode.[ch]: $ git grep -w ntfs_new_extent_inode fs/ntfs/inode.c:inline ntfs_inode *ntfs_new_extent_inode(struct super_block *sb, fs/ntfs/inode.h:extern ntfs_inode *ntfs_new_extent_inode(struct super_block *sb,

Re: New objtool warning..

2020-12-17 Thread Joe Perches
On Thu, 2020-12-17 at 09:27 -0800, Linus Torvalds wrote: > On Thu, Dec 17, 2020 at 8:25 AM Josh Poimboeuf wrote: > > > > Oh yeah, I forgot about that. That would be another option if my patch > > doesn't work out. > > Well, one option is to just say "ok, we know gcc generates horrible > code

Re: [PATCH] checkpatch: add new warning when lookup_symbol_name() is used

2020-12-17 Thread Joe Perches
On Thu, 2020-12-17 at 18:42 +0100, Helge Deller wrote: > On 12/17/20 6:27 PM, Joe Perches wrote: > > On Thu, 2020-12-17 at 18:11 +0100, Helge Deller wrote: > > > In most cases people use lookup_symbol_name() to resolve a kernel symbol > > > a

Re: [PATCH] checkpatch: add new warning when lookup_symbol_name() is used

2020-12-17 Thread Joe Perches
On Thu, 2020-12-17 at 18:11 +0100, Helge Deller wrote: > In most cases people use lookup_symbol_name() to resolve a kernel symbol > and then print it via printk(). > > In such cases using the %ps, %pS, %pSR or %pB printk formats are easier > to use and thus should be preferred. [] > diff --git

Re: [PATCH -next] tools: perf: convert comma to semicolon

2020-12-17 Thread Joe Perches
On Wed, 2020-12-16 at 21:15 +0800, Zheng Yongjun wrote: > Replace a comma between expression statements by a semicolon. If you are going to submit patches for comma/semicolon conversions, please to not use checkpatch to produce them. checkpatch is a trivial tool that does not have very good

Re: [PATCH] checkpatch: fix false positive for COMMIT_LOG_LONG_LINE with URLs

2020-12-17 Thread Joe Perches
On Thu, 2020-12-17 at 19:12 +0530, Aditya Srivastava wrote: > Currently checkpatch warns for long line in commit messages even for > URL lines. > > An evaluation over v4.13..v5.8 showed that out of ~11000 warnings for > this class, around 790 are due to the line containing link. > > E.g. running

Re: [PATCH] [media] radio-si470x: remove h from printk format specifier

2020-12-15 Thread Joe Perches
On Tue, 2020-12-15 at 13:33 -0800, t...@redhat.com wrote: > From: Tom Rix > > See Documentation/core-api/printk-formats.rst. > > commit cbacb5ab0aa0 ("docs: printk-formats: Stop encouraging use of > unnecessary %h[xudi] and %hh[xudi]") > > Standard integer promotion is already done and %hx

Re: [PATCH] atm: horizon: remove h from printk format specifier

2020-12-15 Thread Joe Perches
On Tue, 2020-12-15 at 06:24 -0800, t...@redhat.com wrote: > From: Tom Rix > > See Documentation/core-api/printk-formats.rst. > h should no longer be used in the format specifier for printk. > > Signed-off-by: Tom Rix > --- >  drivers/atm/horizon.c | 6 +++--- Chas? Madge has been out of

Re: [PATCH v2] net/mlx4: Use true,false for bool variable

2020-12-14 Thread Joe Perches
On Tue, 2020-12-15 at 07:18 +0200, Leon Romanovsky wrote: > On Mon, Dec 14, 2020 at 11:15:01AM -0800, Joe Perches wrote: > > I prefer revisions to single patches (as opposed to large patch series) > > in the same thread. > > It depends which side you are in that game. Fr

Re: [PATCH v3 1/6] scsi: ufs: Remove stringize operator '#' restriction

2020-12-14 Thread Joe Perches
On Mon, 2020-12-14 at 21:20 +0100, Bean Huo wrote: > From: Bean Huo > > Current EM macro definition, we use stringize operator '#', which turns > the argument it precedes into a quoted string. Thus requires the symbol > of __print_symbolic() should be the string corresponding to the name of >

Re: [PATCH v2] net/mlx4: Use true,false for bool variable

2020-12-14 Thread Joe Perches
On Mon, 2020-12-14 at 11:03 -0800, Jakub Kicinski wrote: > On Mon, 14 Dec 2020 13:16:08 +0200 Leon Romanovsky wrote: > > On Mon, Dec 14, 2020 at 11:30:08AM +0100, Vasyl Gomonovych wrote: > > > It is fix for semantic patch warning available in > > > scripts/coccinelle/misc/boolinit.cocci > > > Fix

Re: [PATCH v2 1/6] scsi: ufs: Remove stringize operator '#' restriction

2020-12-14 Thread Joe Perches
On Mon, 2020-12-14 at 17:14 +0100, Bean Huo wrote: > From: Bean Huo > > Current EM macro definition, we use stringize operator '#', which turns > the argument it precedes into a quoted string. Thus requires the symbol > of __print_symbolic() should be the string corresponding to the name of >

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

2020-12-14 Thread Joe Perches
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. > diff --git a/scripts/spelling.txt b/scripts/spelling.txt [] > @@ -1253,6 +1260,7 @@

Re: [PATCH] netfilter: conntrack: fix -Wformat

2020-12-13 Thread Joe Perches
On Sun, 2020-12-13 at 11:21 -0800, Tom Rix wrote: > On 12/2/20 2:34 PM, Nick Desaulniers wrote: > > On Tue, Nov 10, 2020 at 2:04 PM Joe Perches wrote: > > > On Tue, 2020-11-10 at 14:00 -0800, Nick Desaulniers wrote: > > > > > > > Yeah, we could go through a

[tip: core/rcu] rcu/tree: Make struct kernel_param_ops definitions const

2020-12-13 Thread tip-bot2 for Joe Perches
The following commit has been merged into the core/rcu branch of tip: Commit-ID: 7c47ee5aa00817d8b10f415b4a92d5fb3ac35273 Gitweb: https://git.kernel.org/tip/7c47ee5aa00817d8b10f415b4a92d5fb3ac35273 Author:Joe Perches AuthorDate:Sat, 03 Oct 2020 17:18:08 -07:00 Committer

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

2020-12-13 Thread Joe Perches
On Sun, 2020-12-13 at 13:48 +0530, Dwaipayan Ray wrote: > On Sun, Dec 13, 2020 at 1:31 PM Lukas Bulwahn wrote: [] > > Will you also add a checkpatch rule to identify other DEVICE_ATTR(...) > > that can be adjusted to the refined macros, so that checkpatch informs > > other submitters as well? > >

Re: mmc: atmel-mci: Reduce scope for the variable “slot” in atmci_request_end()

2020-12-12 Thread Joe Perches
On Sat, 2020-12-12 at 14:17 +0100, Alexandre Belloni wrote: > On 12/12/2020 01:16:39-0800, Joe Perches wrote: > > In this case Alexandre it seems true, but in the generic case > > it may be false. It may depend on stack size and location. > > > > For instance, with la

Re: mmc: atmel-mci: Reduce scope for the variable “slot” in atmci_request_end()

2020-12-12 Thread Joe Perches
On Fri, 2020-12-11 at 09:03 +0100, Alexandre Belloni wrote: > On 11/12/2020 07:34:41+0100, Markus Elfring wrote: > > > > How do you think about a patch like “staging: speakup: remove redundant > > > > initialization > > > > of pointer p_key” for comparison? > > > >

Re: [PATCH] net/mlx4: Use true,false for bool variable

2020-12-11 Thread Joe Perches
On Fri, 2020-12-11 at 11:05 +0100, Vasyl Gomonovych wrote: > Fix en_rx.c:687:1-17: WARNING: Assignment of 0/1 to bool variable > Fix main.c:4465:5-13: WARNING: Comparison of 0/1 to bool variable [] > diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c >

Re: [PATCH] block: drop dead assignments in loop_init()

2020-12-11 Thread Joe Perches
On Fri, 2020-12-11 at 19:40 +0100, Lukas Bulwahn wrote: > On Fri, Dec 11, 2020 at 7:23 PM Julia Lawall wrote: > > On Fri, 11 Dec 2020, Lukas Bulwahn wrote: > > > Commit 8410d38c2552 ("loop: use __register_blkdev to allocate devices on > > > demand") simplified loop_init(); so computing the range

Re: [PATCH -next] fs/xfs: convert comma to semicolon

2020-12-11 Thread Joe Perches
On Fri, 2020-12-11 at 16:17 +, David Laight wrote: > From: Eric Sandeen > > Sent: 11 December 2020 15:51 > > > > On 12/11/20 2:41 AM, Zheng Yongjun wrote: > > > Replace a comma between expression statements by a semicolon. > > > > > > Signed-off-by: Zheng Yongjun > > > > hah, that's an old

Re: [PATCH -next] fs/afs: convert comma to semicolon

2020-12-11 Thread Joe Perches
On Fri, 2020-12-11 at 16:38 +0800, Zheng Yongjun wrote: > Replace a comma between expression statements by a semicolon. If you are using a tool to find and fix these, you should mention the tool. btw: using Julia Lawall's cocci script to update these is probably best.

Re: [RFC PATCH v2] checkpatch: rewrite Kconfig parsing

2020-12-10 Thread Joe Perches
On Wed, 2020-12-09 at 15:24 +0100, Nicolai Fischer wrote: > We understand that checkpatch may not be the ideal place for all of these > checks. So please work on an ideal thing. > However the current implementation has some problems we would like to fix. > Would you be interested in a patch

Re: [PATCH wireless -next] cw1200: txrx: convert comma to semicolon

2020-12-10 Thread Joe Perches
On Thu, 2020-12-10 at 18:50 +, Kalle Valo wrote: > Zheng Yongjun wrote: > > > Replace a comma between expression statements by a semicolon. > > > > Signed-off-by: Zheng Yongjun > > Patch applied to wireless-drivers-next.git, thanks. > > c42d492c672a cw1200: txrx: convert comma to

Re: [PATCH] checkpatch: make the line length warnings match the coding style document

2020-12-10 Thread Joe Perches
On Thu, 2020-12-10 at 20:09 +, Matthew Wilcox wrote: > On Thu, Dec 10, 2020 at 12:05:04PM -0800, Joe Perches wrote: > > Also, given the ever increasing average identifier length, strict > > adherence to 80 columns is sometimes just not possible without silly > > visual gy

Re: [PATCH] checkpatch: make the line length warnings match the coding style document

2020-12-10 Thread Joe Perches
On Thu, 2020-12-10 at 09:22 +0100, Christoph Hellwig wrote: > Add a new informational message that lines <= 80 chars are still > preffered. Without this people unfortunately auto format code way over > 80 lines without the required benefit for readability. In general, I agree with some of the

Re: [PATCH] checkpatch: Fix "Missing a blank line after declarations" test on patches

2020-12-10 Thread Joe Perches
On Thu, 2020-12-10 at 18:52 +0100, Christophe JAILLET wrote: > "Missing a blank line after declarations" is not triggered on patches. That's not true. It does work on any patch that does a new function addition. There are some patch context complications here when lines are added and removed such

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

2020-12-10 Thread Joe Perches
On Thu, 2020-12-10 at 19:49 +0530, Dwaipayan Ray wrote: > Documentation/process/coding-style.rst specifies the use of > IS_ENABLED macro: > > Within code, where possible, use the IS_ENABLED macro to convert a Kconfig > symbol into a C boolean expression, and use it in a normal C conditional: > >

Re: checkpatch

2020-12-10 Thread Joe Perches
On Thu, 2020-12-10 at 09:34 +, David Laight wrote: > From: Joe Perches > > Sent: 10 December 2020 05:26 > > > > On Wed, 2020-12-09 at 19:13 +0100, Thomas Gleixner wrote: > > > Joe, > > > > Hi Thomas. > > > > > the below made it thro

Re: checkpatch

2020-12-09 Thread Joe Perches
On Wed, 2020-12-09 at 19:13 +0100, Thomas Gleixner wrote: > Joe, Hi Thomas. > the below made it through my filters for some reason so I actually > looked and immediately wondered why checkpatch.pl did not identify this > as pure garbage. > >  Original mail is here: >

Re: [Ksummit-discuss] crediting bug reports and fixes folded into original patch

2020-12-09 Thread Joe Perches
On Wed, 2020-12-09 at 10:58 +0300, Dan Carpenter wrote: > On Tue, Dec 08, 2020 at 09:01:49PM -0800, Joe Perches wrote: > > On Tue, 2020-12-08 at 16:34 -0800, Kees Cook wrote: > > > > > If not "Adjusted-by", what about "Tweaked-by", "He

Re: [PATCH 22/22] xlink-core: factorize xlink_ioctl function by creating sub-functions for each ioctl command

2020-12-09 Thread Joe Perches
On Tue, 2020-12-01 at 14:35 -0800, mgr...@linux.intel.com wrote: > Refactor the too large IOCTL function to call helper functions. [] > diff --git a/drivers/misc/xlink-core/xlink-ioctl.c > b/drivers/misc/xlink-core/xlink-ioctl.c [] > +int ioctl_write_data(unsigned long arg) > +{ > + struct

[PATCH] checkpatch: Add printk_once and printk_ratelimit to prefer pr_ warning

2020-12-08 Thread Joe Perches
Add the _once and _ratelimited variants to the test for printk(KERN_ that should prefer pr_. Miscellanea: o Add comment description for the conversions Signed-off-by: Joe Perches --- scripts/checkpatch.pl | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts

Re: [Ksummit-discuss] crediting bug reports and fixes folded into original patch

2020-12-08 Thread Joe Perches
On Tue, 2020-12-08 at 16:34 -0800, Kees Cook wrote: > If not "Adjusted-by", what about "Tweaked-by", "Helped-by", > "Corrected-by"? Improved-by: / Enhanced-by: / Revisions-by: Or simply don't use anything but a link to the conversion thread like Konstantin suggested. I still want to know what

Re: [RFC PATCH v2] checkpatch: rewrite Kconfig parsing

2020-12-08 Thread Joe Perches
On Tue, 2020-12-08 at 18:18 +0100, Nicolai Fischer wrote: > Checkpatch currently only warns if the help text is too short. > To determine this the diff gets parsed for keywords starting > a new entry, but several kinds of false positives can occur with > the current implementation, especially when

Re: [PATCH] checkpatch: Add checking if from-author sign-off is last

2020-12-07 Thread Joe Perches
On Tue, 2020-12-08 at 00:42 +0100, Philipp Bruegmann wrote: > Print a check if the last Signed-off-by is by the From: author. > > submitting-patches.rst states 'the last Signed-off-by: must always be > that of the developer submitting the patch.'. > This patch tries to enforce this, under the

Re: [PATCH next v3 1/3] printk: inline log_output(),log_store() in vprintk_store()

2020-12-07 Thread Joe Perches
On Mon, 2020-12-07 at 23:26 +0106, John Ogness wrote: > In preparation for removing logbuf_lock, inline log_output() > and log_store() into vprintk_store(). This will simplify dealing > with the various code branches and fallbacks that are possible. One nicety would be to add various pr_

Re: [f2fs-dev] [PATCH v3] f2fs: compress: support chksum

2020-12-07 Thread Joe Perches
On Mon, 2020-12-07 at 12:37 -0800, Eric Biggers wrote: > On Thu, Nov 26, 2020 at 06:32:09PM +0800, Chao Yu wrote: > > + if (!ret && fi->i_compress_flag & 1 << COMPRESS_CHKSUM) { > > This really could use some parentheses. People shouldn't have to look up a > C operator precedence table to

Re: [f2fs-dev] [PATCH v3] f2fs: compress: support chksum

2020-12-07 Thread Joe Perches
On Mon, 2020-12-07 at 12:37 -0800, Eric Biggers wrote: > On Thu, Nov 26, 2020 at 06:32:09PM +0800, Chao Yu wrote: > > + if (!ret && fi->i_compress_flag & 1 << COMPRESS_CHKSUM) { > > This really could use some parentheses. People shouldn't have to look up a > C operator precedence table to

Re: [PATCH 22/22] xlink-core: factorize xlink_ioctl function by creating sub-functions for each ioctl command

2020-12-06 Thread Joe Perches
On Tue, 2020-12-01 at 14:35 -0800, mgr...@linux.intel.com wrote: > From: Seamus Kelly > > Refactor the too large IOCTL function to call helper functions. This should not be sent as a known poor patch as patch 21 of 22 and then updated in patch 22 of 22 with a better style. This should be sent

Re: [PATCH 21/22] xlink-core: add async channel and events

2020-12-06 Thread Joe Perches
On Tue, 2020-12-01 at 14:35 -0800, mgr...@linux.intel.com wrote: > Enable asynchronous channel and event communication. [] > diff --git a/drivers/misc/xlink-core/xlink-core.c > b/drivers/misc/xlink-core/xlink-core.c [] > + > +// sysfs attribute functions > + > +static ssize_t event0_show(struct

Re: [PATCH 16/22] xlink-ipc: Add xlink ipc driver

2020-12-06 Thread Joe Perches
On Tue, 2020-12-01 at 14:35 -0800, mgr...@linux.intel.com wrote: > From: Seamus Kelly > > Add xLink driver, which interfaces the xLink Core driver with the Keem > Bay VPU IPC driver, thus enabling xLink to control and communicate with > the VPU IP present on the Intel Keem Bay SoC. Trivial

Re: [PATCH 1/8] tty: serial: jsm: Fixed file by added more spacing

2020-12-06 Thread Joe Perches
On Sun, 2020-12-06 at 13:09 +0530, Clement Smith wrote: > Fixed a coding style issue Don't send 8 identically titled patches that each change a single line. Send one patch, with an updated title like: Subject: [PATCH] jsm_tty: Whitespace neatening that changes _all_ the whitespace that

Re: [PATCH v6] checkpatch: add fix for non-standard signature - co-authored-by

2020-12-05 Thread Joe Perches
On Sat, 2020-12-05 at 15:52 +0530, Aditya wrote: > On 4/12/20 8:10 pm, Aditya Srivastava wrote: > > Currently, checkpatch.pl warns us for BAD_SIGN_OFF on the usage of > > non-standard signatures. [] > > The standard signature equivalent for 'Co-authored-by' is > > 'Co-developed-by'. > > > >

Re: [PATCH 1/7] net: 8021q: remove unneeded MODULE_VERSION() usage

2020-12-05 Thread Joe Perches
On Fri, 2020-12-04 at 16:09 -0800, Jakub Kicinski wrote: > On Wed, 2 Dec 2020 13:49:53 +0100 Enrico Weigelt, metux IT consult > wrote: > > Remove MODULE_VERSION(), as it isn't needed at all: the only version > > making sense is the kernel version. > > > > Signed-off-by: Enrico Weigelt, metux IT

Re: [PATCH] staging:rkvdec: Fixed "replace comma with semicolon" Warning:

2020-12-04 Thread Joe Perches
On Fri, 2020-12-04 at 17:37 -0600, Travis Carter wrote: > drivers/staging/media/rkvdec/rkvdec.c You might consider using Julia Lawall's cocci script for all of drivers/staging or subsets of staging like drivers/staging/media/

Re: [PATCH] staging:rkvdec: Fixed "replace comma with semicolon" Warning:

2020-12-04 Thread Joe Perches
On Fri, 2020-12-04 at 17:37 -0600, Travis Carter wrote: > drivers/staging/media/rkvdec/rkvdec.c You might consider using Julia Lawall's cocci script for all of drivers/staging or subsets of staging like drivers/staging/media/

Re: [PATCH AUTOSEL 5.9 22/33] vhost scsi: add lun parser helper

2020-12-04 Thread Joe Perches
On Fri, 2020-12-04 at 10:49 -0500, Sasha Levin wrote: > On Fri, Dec 04, 2020 at 09:27:28AM +0100, Paolo Bonzini wrote: > > On 01/12/20 00:59, Sasha Levin wrote: > > > > > > It's quite easy to NAK a patch too, just reply saying "no" and it'll be > > > dropped (just like this patch was dropped

Re: [PATCH AUTOSEL 5.9 22/33] vhost scsi: add lun parser helper

2020-12-04 Thread Joe Perches
On Fri, 2020-12-04 at 10:49 -0500, Sasha Levin wrote: > On Fri, Dec 04, 2020 at 09:27:28AM +0100, Paolo Bonzini wrote: > > On 01/12/20 00:59, Sasha Levin wrote: > > > > > > It's quite easy to NAK a patch too, just reply saying "no" and it'll be > > > dropped (just like this patch was dropped

Re: [PATCH v6] checkpatch: add fix for non-standard signature - co-authored-by

2020-12-04 Thread Joe Perches
On Fri, 2020-12-04 at 20:10 +0530, Aditya Srivastava wrote: > Currently, checkpatch.pl warns us for BAD_SIGN_OFF on the usage of > non-standard signatures. > > An evaluation on v4.13..v5.8 showed that out of 539 warnings due to > non-standard signatures, 43 are due to the use of 'Co-authored-by'

Re: [PATCH] powerpc/xmon: Change printk() to pr_cont()

2020-12-04 Thread Joe Perches
On Fri, 2020-12-04 at 21:56 +1100, Michael Ellerman wrote: > Christophe Leroy writes: > > Since some time now, printk() adds carriage return, leading to > > unusable xmon output: > > > > [ 54.288722] sysrq: Entering xmon > > [ 54.292209] Vector: 0 at [cace3d2c] > > [ 54.292274] pc: >

Re: [PATCH] powerpc/xmon: Change printk() to pr_cont()

2020-12-04 Thread Joe Perches
On Fri, 2020-12-04 at 21:56 +1100, Michael Ellerman wrote: > Christophe Leroy writes: > > Since some time now, printk() adds carriage return, leading to > > unusable xmon output: > > > > [ 54.288722] sysrq: Entering xmon > > [ 54.292209] Vector: 0 at [cace3d2c] > > [ 54.292274] pc: >

Re: [Linux-kernel-mentees] [PATCH -mmots] checkpatch: add fix for non-standard signature - co-authored-by

2020-12-03 Thread Joe Perches
, Dec 3, 2020 at 10:59 AM Aditya wrote: > > > > > > > > > > On 3/12/20 12:26 am, Joe Perches wrote: > > > > > > On Thu, 2020-12-03 at 00:00 +0530, Aditya Srivastava wrote: > > > > > > > Currently, checkpatch.pl warns us for BAD

Re: [Ksummit-discuss] crediting bug reports and fixes folded into original patch

2020-12-03 Thread Joe Perches
On Thu, 2020-12-03 at 14:17 -0500, Konstantin Ryabitsev wrote: > On Thu, Dec 03, 2020 at 08:55:54AM -0800, Joe Perches wrote: > > Perhaps automate a mechanism to capture that information as > > git notes for the patches when applied. > > Git notes have

Re: [RFC PATCH] checkpatch: correctly detect lines of help text

2020-12-03 Thread Joe Perches
On Thu, 2020-12-03 at 10:31 -0800, Randy Dunlap wrote: > On 12/3/20 9:58 AM, Joe Perches wrote: > > On Wed, 2020-12-02 at 10:59 -0800, Randy Dunlap wrote: > > > > > There are also large hunks of block/Kconfig and drivers/hid/Kconfig > > > that don't

Re: [RFC PATCH] checkpatch: correctly detect lines of help text

2020-12-03 Thread Joe Perches
On Wed, 2020-12-02 at 10:59 -0800, Randy Dunlap wrote: > There are also large hunks of block/Kconfig and drivers/hid/Kconfig > that don't use any indentation for help text... > in case that matters here. Maybe something like this could help. Indent the unindented help blocks by 2 spaces and

Re: [PATCH] drivers: usb: storage: prefer pr_*() macros over bare printk()

2020-12-03 Thread Joe Perches
On Thu, 2020-12-03 at 15:11 +0100, Enrico Weigelt, metux IT consult wrote: > pr_*() printing helpers are preferred over using bare printk(). Please run your proposed patches through checkpatch --strict and see if any of its bleats are things that should be fixed at the same time. For this patch:

Re: [Ksummit-discuss] crediting bug reports and fixes folded into original patch

2020-12-03 Thread Joe Perches
On Thu, 2020-12-03 at 05:58 -0800, James Bottomley wrote: > So there are two embedded questions here: firstly, should we be as > wedded to clean history as we are, because showing the evolution would > simply solve this? Secondly, if we are agreed on clean history, how > can we make engagement

Re: [PATCH] netfilter: conntrack: fix -Wformat

2020-12-03 Thread Joe Perches
On Thu, 2020-12-03 at 06:39 -0800, Tom Rix wrote: > I agree if it can be done in checkpatch it should. > It is good to have multiple passes on cleaning. true > checkpatch is best at fixing new problems, > clang-tidy-fix is best at fixing old problems. checkpatch is a set of brainless regexes

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