Re: [PATCH 1/3] staging: rtl8192u: clean up blank line style issues

2020-09-19 Thread Joe Perches
On Sat, 2020-09-19 at 17:08 +0200, Michael Straube wrote: > Add missing and remove unnecessary blank lines to clear checkpatch > issues. unrelated trivia: > diff --git a/drivers/staging/rtl8192u/r8192U_dm.c > b/drivers/staging/rtl8192u/r8192U_dm.c [] > @@ -26,6 +26,7 @@ Major Change History: >

[PATCH] rtlwifi: Use ffs in _phy_calculate_bit_shift

2020-09-19 Thread Joe Perches
Remove the loop and use the generic ffs instead. Signed-off-by: Joe Perches --- Just saw one by happenstance, might as well fix them all. drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c | 18 ++ .../net/wireless/realtek/rtlwifi/rtl8192c/phy_common.c | 8

Re: [PATCH] MAINTAINERS: fix KERNEL_BUILD entry

2020-09-18 Thread Joe Perches
On Fri, 2020-09-18 at 17:04 -0500, Pierre-Louis Bossart wrote: > the get_maintainer.pl script throws the following errors: > > Unmatched () '(open list:KERNEL BUILD + files below scripts/ (unless > mai...)' '' at /usr/lib/git-core/git-send-email line 546. > > error: unable to extract a valid

Re: [PATCH] scsi: arcmsr: Remove the superfluous break

2020-09-18 Thread Joe Perches
On Fri, 2020-09-18 at 11:17 -0600, Jens Axboe wrote: > On 9/18/20 11:13 AM, Joe Perches wrote: > > On Fri, 2020-09-18 at 09:56 -0500, Gustavo A. R. Silva wrote: > > > On Fri, Sep 18, 2020 at 05:32:30PM +0800, Jing Xiangfeng wrote: > > > > Remove the superfluous break,

Re: [PATCH] scsi: arcmsr: Remove the superfluous break

2020-09-18 Thread Joe Perches
On Fri, 2020-09-18 at 09:56 -0500, Gustavo A. R. Silva wrote: > On Fri, Sep 18, 2020 at 05:32:30PM +0800, Jing Xiangfeng wrote: > > Remove the superfluous break, as there is a 'return' before it. > > > > Apparently, the change is correct. Please, just add a proper Fixes tag by > yourself this

Re: [PATCH v2] EDAC/mc_sysfs: Add missing newlines when printing {max,dimm}_location

2020-09-18 Thread Joe Perches
On Fri, 2020-09-18 at 09:12 +0200, Borislav Petkov wrote: > On Fri, Sep 18, 2020 at 10:37:28AM +0800, Xiongfeng Wang wrote: > > Thansk a lot. I will send another version. Also I will change the > > 'snprintf' in 'dimmdev_location_show()' to 'scnprintf' > > No need to send another one - I have

Re: [PATCH v2] nfs: remove incorrect fallthrough label

2020-09-17 Thread Joe Perches
On Thu, 2020-09-17 at 14:41 -0700, Nick Desaulniers wrote: > On Wed, Sep 16, 2020 at 1:19 PM Joe Perches wrote: > > On Wed, 2020-09-16 at 13:02 -0700, Nick Desaulniers wrote: > > > * (call of function with __attribute__(__noreturn__)) > > > > I guess pani

Re: [PATCH v2] EDAC/mc_sysfs: Add missing newlines when printing {max,dimm}_location

2020-09-17 Thread Joe Perches
On Thu, 2020-09-17 at 19:38 +0800, Xiongfeng Wang wrote: > On 2020/9/17 1:00, Borislav Petkov wrote: > > On Mon, Sep 14, 2020 at 10:48:54AM +0800, Xiongfeng Wang wrote: > > > @@ -813,15 +817,21 @@ static ssize_t mci_max_location_show(struct device > > > *dev, > > >

Re: [RFC PATCH] Add bridge driver to connect sensors to CIO2 device via software nodes on ACPI platforms

2020-09-17 Thread Joe Perches
On Thu, 2020-09-17 at 12:34 +0300, Dan Carpenter wrote: > On Wed, Sep 16, 2020 at 10:36:18PM +0100, Daniel Scally wrote: > > diff --git a/drivers/staging/media/ipu3/cio2-bridge.c > > b/drivers/staging/media/ipu3/cio2-bridge.c [] > > + if (!dev->driver_data) { > > +

Re: [PATCH 1/2] staging: rtl8188eu: use __func__ in hal directory

2020-09-17 Thread Joe Perches
On Thu, 2020-09-17 at 09:13 +0200, Michael Straube wrote: > Use __func__ instead of hardcoded function names to clear > checkpatch warnings. [] > diff --git a/drivers/staging/rtl8188eu/hal/odm.c > b/drivers/staging/rtl8188eu/hal/odm.c [] > @@ -249,7 +249,7 @@ void odm_CommonInfoSelfUpdate(struct

[PATCH V3 8/8] drivers core: node: Use a more typical macro definition style for ACCESS_ATTR

2020-09-16 Thread Joe Perches
Remove the trailing semicolon from the macro and add it to its uses. Signed-off-by: Joe Perches --- drivers/base/node.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/base/node.c b/drivers/base/node.c index dafe03e82e7c..25dbe36c0cf2 100644 --- a/drivers

[PATCH V3 7/8] drivers core: Use sysfs_emit for shared_cpu_map_show and shared_cpu_list_show

2020-09-16 Thread Joe Perches
) by bitmap_print_to_pagebuf. Signed-off-by: Joe Perches --- drivers/base/cacheinfo.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/base/cacheinfo.c b/drivers/base/cacheinfo.c index 4946647bd985..bfc095956dd1 100644 --- a/drivers/base/cacheinfo.c +++ b/drivers/base

[PATCH V3 5/8] drivers core: Miscellaneous changes for sysfs_emit

2020-09-16 Thread Joe Perches
use DEVICE_ATTR_ADMIN_RO where appropriate o consistently use const char *output for strings o checkpatch/style neatening Signed-off-by: Joe Perches --- drivers/base/bus.c | 2 +- drivers/base/cacheinfo.c| 2 +- drivers/base/class.c

[PATCH V3 4/8] drivers core: Reindent a couple uses around sysfs_emit

2020-09-16 Thread Joe Perches
Just a couple of whitespace realignment to open parenthesis for multi-line statements. Signed-off-by: Joe Perches --- drivers/base/node.c| 4 ++-- drivers/base/power/sysfs.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/base/node.c b/drivers/base/node.c

[PATCH V3 3/8] drivers core: Remove strcat uses around sysfs_emit and neaten

2020-09-16 Thread Joe Perches
strcat is no longer necessary for sysfs_emit and sysfs_emit_at uses. Convert the strcat uses to sysfs_emit calls and neaten other block uses of direct returns to use an intermediate const char *. Signed-off-by: Joe Perches --- drivers/base/cacheinfo.c | 25 +--- drivers/base

[PATCH V3 6/8] mm: and drivers core: Convert hugetlb_report_node_meminfo to sysfs_emit

2020-09-16 Thread Joe Perches
Convert the unbound sprintf in hugetlb_report_node_meminfo to use sysfs_emit_at so that no possible overrun of a PAGE_SIZE buf can occur. Signed-off-by: Joe Perches --- drivers/base/node.c | 2 +- include/linux/hugetlb.h | 4 ++-- mm/hugetlb.c| 18 ++ 3 files

[PATCH V3 0/8] sysfs: drivers core: Add and use sysfs_emit and sysfs_emit_at

2020-09-16 Thread Joe Perches
hugetlb_report_node_meminfo conversion Joe Perches (8): sysfs: Add sysfs_emit and sysfs_emit_at to format sysfs output drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions drivers core: Remove strcat uses around sysfs_emit and neaten drivers core: Reindent a couple uses around

[PATCH V3 1/8] sysfs: Add sysfs_emit and sysfs_emit_at to format sysfs output

2020-09-16 Thread Joe Perches
. Signed-off-by: Joe Perches --- Documentation/filesystems/sysfs.rst | 8 ++--- fs/sysfs/file.c | 55 + include/linux/sysfs.h | 15 3 files changed, 73 insertions(+), 5 deletions(-) diff --git a/Documentation/filesystems

[PATCH V3 2/8] drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions

2020-09-16 Thread Joe Perches
> return len; } @@ identifier d_show; identifier dev, attr, buf; expression chr; @@ ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf) { ... - strcpy(buf, chr); - return strlen(buf); + return sysfs_emit(buf, chr); } Signed-off-by

Re: [PATCH v2] nfs: remove incorrect fallthrough label

2020-09-16 Thread Joe Perches
On Wed, 2020-09-16 at 13:02 -0700, Nick Desaulniers wrote: > There is no case after the default from which to fallthrough to. Clang > will error in this case (unhelpfully without context, see link below) > and GCC will with -Wswitch-unreachable. > > The previous commit should have just replaced

Re: [PATCH] nfs: remove incorrect fallthrough label

2020-09-15 Thread Joe Perches
On Tue, 2020-09-15 at 19:01 -0500, Gustavo A. R. Silva wrote: > > On 9/15/20 18:51, Gustavo A. R. Silva wrote: > > > > On 9/15/20 18:29, Joe Perches wrote: > > > On Tue, 2020-09-15 at 15:57 -0700, Nick Desaulniers wrote: > > > > There is no case afte

Re: [PATCH] nfs: remove incorrect fallthrough label

2020-09-15 Thread Joe Perches
On Tue, 2020-09-15 at 15:57 -0700, Nick Desaulniers wrote: > There is no case after the default from which to fallthrough to. Clang > will error in this case (unhelpfully without context, see link below) > and GCC will with -Wswitch-unreachable. > > The previous commit should have just removed

Re: [RESEND PATCH] staging: rtl8188eu: Fix else after return WARNING (checkpatch)

2020-09-15 Thread Joe Perches
On Tue, 2020-09-15 at 14:20 +0300, Dan Carpenter wrote: > On Mon, Sep 14, 2020 at 09:42:49AM -0700, Joe Perches wrote: > > On Mon, 2020-09-14 at 17:57 +0300, Dan Carpenter wrote: > > > On Sun, Sep 13, 2020 at 12:19:50PM +0530, Sohom Datta wro

Re: [PATCH v5] lib/string.c: implement stpcpy

2020-09-14 Thread Joe Perches
On Mon, 2020-09-14 at 21:22 -0700, Nathan Chancellor wrote: > It would be nice to get this into mainline sooner rather than later so > that it can start filtering into the stable trees. ToT LLVM builds have > been broken for a month now. People that build stable trees with new compilers

Re: [PATCH 3/3] staging: rtl8723bs: os_dep: fixed spacing around operators issue

2020-09-14 Thread Joe Perches
On Mon, 2020-09-14 at 19:17 -0500, Ross Schmidt wrote: > Fixed a coding style issue by adding spaces around operators in > sdio_ops_linux.c to fix checkpatch checks. Hello Ross. If you want to do more than fix whitespace, please look at the #define for DBG_871X. All the uses with a KERN_ are

Re: [RESEND PATCH] staging: rtl8188eu: Fix else after return WARNING (checkpatch)

2020-09-14 Thread Joe Perches
On Mon, 2020-09-14 at 17:57 +0300, Dan Carpenter wrote: > On Sun, Sep 13, 2020 at 12:19:50PM +0530, Sohom Datta wrote: > > > From 4c8c8f3ff7f4d711daea4ac3bb987fcecc7ef1ed Mon Sep 17 00:00:00 2001 > > From: Sohom > > Date: Sat, 12 Sep 2020 18:04:56 +0530 > > Subject: [RESEND PATCH] staging:

Re: [PATCH net-next] octeontx2-af: Constify npc_kpu_profile_{action,cam}

2020-09-13 Thread Joe Perches
On Sat, 2020-09-12 at 00:00 +0200, Rikard Falkeborn wrote: > These are never modified, so constify them to allow the compiler to > place them in read-only memory. This moves about 25kB to read-only > memory as seen by the output of the size command. Nice. Did you find this by tool or inspection?

Re: [PATCH v5 03/10] fs/ntfs3: Add bitmap

2020-09-13 Thread Joe Perches
On Fri, 2020-09-11 at 17:10 +0300, Konstantin Komarov wrote: > This adds bitmap $ make fs/ntfs3/ SYNCinclude/config/auto.conf.cmd CALLscripts/checksyscalls.sh CALLscripts/atomic/check-atomics.sh DESCEND objtool CC fs/ntfs3/bitfunc.o CC fs/ntfs3/bitmap.o

Re: [PATCH] checkpatch: Allow not using -f with files that are in git

2020-09-12 Thread Joe Perches
On Mon, 2020-08-24 at 17:09 -0700, Joe Perches wrote: > If a file exists in git and checkpatch is used without the -f > flag for scanning a file, then checkpatch will scan the file > assuming it's a patch and emit: > > ERROR: Does not appear to be a unified-diff format pa

Re: [PATCH] media: vidtv: fix 32-bit warnings

2020-09-12 Thread Joe Perches
On Sat, 2020-09-12 at 11:22 +0200, Mauro Carvalho Chehab wrote: > There are several warnings produced when the driver is built > for 32-bit archs. Solve them. [] > diff --git a/drivers/media/test-drivers/vidtv/vidtv_common.c > b/drivers/media/test-drivers/vidtv/vidtv_common.c [] > diff --git

Re: [PATCH 1/5] staging: rtl8723bs: refactor cckrates{only}_included

2020-09-12 Thread Joe Perches
On Sat, 2020-09-12 at 11:22 -0700, Joe Perches wrote: > On Sat, 2020-09-12 at 10:45 +0200, Michael Straube wrote: > > Refactor cckrates_included() and cckratesonly_included() to simplify > > the code and improve readability. [] > diff --git a/drivers/staging/rtl8723bs/core/rt

Re: [PATCH 1/5] staging: rtl8723bs: refactor cckrates{only}_included

2020-09-12 Thread Joe Perches
On Sat, 2020-09-12 at 10:45 +0200, Michael Straube wrote: > Refactor cckrates_included() and cckratesonly_included() to simplify > the code and improve readability. > > Signed-off-by: Michael Straube > --- > drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 14 -- > 1 file changed, 8

Re: [PATCH] MAINTAINERS: make linux-usb list remarks consistent

2020-09-12 Thread Joe Perches
On Sat, 2020-09-12 at 14:40 +0200, Greg Kroah-Hartman wrote: > On Sat, Sep 12, 2020 at 02:19:02PM +0200, Lukas Bulwahn wrote: > > > > On Sat, 12 Sep 2020, Lukas Bulwahn wrote: > > > > > This patch submission will also show me if linux-usb is moderated or not. > > > I have not subscribed to

Re: [PATCH v5 01/10] fs/ntfs3: Add headers and misc files

2020-09-11 Thread Joe Perches
On Fri, 2020-09-11 at 17:10 +0300, Konstantin Komarov wrote: > This adds headers and misc files The code may be ok, but its cosmetics are poor. > diff --git a/fs/ntfs3/debug.h b/fs/ntfs3/debug.h [] > +#define QuadAlign(n) (((n) + 7u) & (~7u)) > +#define IsQuadAligned(n) (!((size_t)(n)&7u)) >

Re: MAINTAINERS: Marking internal distribution lists

2020-09-11 Thread Joe Perches
On Fri, 2020-09-11 at 08:37 +0200, Lukas Bulwahn wrote: > Hi Joe, > > in my continued effort to clean up MAINTAINERS, I came across various > email "lists" that are actually just some kind of internal distribution > lists, but we cannot subscribe to them (no archives available) and they > are

Re: [trivial PATCH] treewide: Convert switch/case fallthrough; to break;

2020-09-10 Thread Joe Perches
On Thu, 2020-09-10 at 15:21 +0100, Robin Murphy wrote: > On 2020-09-09 21:06, Joe Perches wrote: > > fallthrough to a separate case/default label break; isn't very readable. > > > > Convert pseudo-keyword fallthrough; statements to a simple break; when > > the ne

Re: [PATCH] checkpatch: Warn on self-assignments

2020-09-10 Thread Joe Perches
On Thu, 2020-09-10 at 12:51 -0700, Kees Cook wrote: > On Sat, Sep 05, 2020 at 10:58:29AM -0700, Joe Perches wrote: > > The uninitialized_var() macro was removed recently via > > commit 63a0895d960a ("compiler: Remove uninitialized_var() macro") > > as it's not a part

Re: [PATCH] checkpatch: accept longer commit description lines

2020-09-10 Thread Joe Perches
On Thu, 2020-09-10 at 23:32 +0900, Tetsuo Handa wrote: > Given that commit bdc48fa11e46f867 ("checkpatch/coding-style: deprecate > 80-column warning") was introduced because nowadays most of us are using > screens that can print more than 100 columns, most of us will be also > using mail clients

Re: [trivial PATCH] treewide: Convert switch/case fallthrough; to break;

2020-09-09 Thread Joe Perches
On Wed, 2020-09-09 at 19:36 -0300, Jason Gunthorpe wrote: > On Wed, Sep 09, 2020 at 01:06:39PM -0700, Joe Perches wrote: > > fallthrough to a separate case/default label break; isn't very readable. > > > > Convert pseudo-keyword fallthrough; statements to a simple break; wh

Re: [trivial PATCH] treewide: Convert switch/case fallthrough; to break;

2020-09-09 Thread Joe Perches
On Thu, 2020-09-10 at 08:35 +1000, Herbert Xu wrote: > On Wed, Sep 09, 2020 at 02:09:32PM -0700, Joe Perches wrote: > > On Wed, 2020-09-09 at 13:55 -0700, Keith Busch wrote: > > > On Wed, Sep 09, 2020 at 01:06:39PM -0700, Joe Perches wrote: > > > > diff --git a/cry

Re: [PATCH v3] HID: add vivaldi HID driver

2020-09-09 Thread Joe Perches
On Wed, 2020-09-09 at 15:03 -0700, Sean O'Brien wrote: > Add vivaldi HID driver. This driver allows us to read and report the top > row layout of keyboards which provide a vendor-defined (Google) HID > usage. [] > diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c [] > @@ -814,6 +814,13

Re: [trivial PATCH] treewide: Convert switch/case fallthrough; to break;

2020-09-09 Thread Joe Perches
On Wed, 2020-09-09 at 13:55 -0700, Keith Busch wrote: > On Wed, Sep 09, 2020 at 01:06:39PM -0700, Joe Perches wrote: > > diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c > > index eea0f453cfb6..8aac5bc60f4c 100644 > > --- a/crypto/tcrypt.c > > +++ b/crypto/tcrypt.c >

[trivial PATCH] treewide: Convert switch/case fallthrough; to break;

2020-09-09 Thread Joe Perches
"fallthrough;(\s*(case\s+\w+|default)\s*:\s*){1,7}break;" * Miscellanea: o Move or coalesce a couple label blocks above a default: block. Signed-off-by: Joe Perches --- Compiled allyesconfig x86-64 only. A few files for other arches were not compiled. arch/arm/mach-mmp/p

Re: [PATCH] kernel: events: Use scnprintf() in show_pmu_*() instead of snprintf()

2020-09-09 Thread Joe Perches
On Wed, 2020-09-09 at 10:19 -0600, Shuah Khan wrote: > On 9/9/20 12:45 AM, Alexander Shishkin wrote: > > Shuah Khan writes: > > > > > Since snprintf() returns would-be-output size instead of the actual > > > output size, replace it with scnprintf(), so the nr_addr_filters_show(), > > >

Re: [Linux-kernel-mentees] [PATCH] checkpatch: GIT_COMMIT_ID: handle commit messages with multiple quotes

2020-09-09 Thread Joe Perches
On Wed, 2020-09-09 at 13:32 +0200, Lukas Bulwahn wrote: > dropped the maintainers. > > On Wed, 9 Sep 2020, Ayush wrote: > > > Sir, > > > > > As the mentor in the linux kernel community bridge program, I usually > > > inform the mentees when the review on the mentee mailing list has > > >

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

2020-09-09 Thread Joe Perches
On Tue, 2020-09-01 at 12:36 -0500, Gustavo A. R. Silva wrote: > Replace the existing /* fall through */ comments and its variants with > the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary > fall-through markings when it is the case. [] > diff --git

Re: [net-next] net: iavf: Use the ARRAY_SIZE macro for aq_to_posix

2020-09-09 Thread Joe Perches
On Wed, 2020-09-09 at 02:33 -0700, Joe Perches wrote: > On Wed, 2020-09-09 at 16:51 +0800, Wei Xu wrote: > > Use the ARRAY_SIZE macro to calculate the size of an array. > > This code was detected with the help of Coccinelle. > [] > > diff --git a/drivers/net/ethernet/

Re: [net-next] net: iavf: Use the ARRAY_SIZE macro for aq_to_posix

2020-09-09 Thread Joe Perches
On Wed, 2020-09-09 at 16:51 +0800, Wei Xu wrote: > Use the ARRAY_SIZE macro to calculate the size of an array. > This code was detected with the help of Coccinelle. [] > diff --git a/drivers/net/ethernet/intel/iavf/iavf_adminq.h > b/drivers/net/ethernet/intel/iavf/iavf_adminq.h [] > @@ -120,7

Re: [PATCH 0/2] scsi: lpfc: Reduce logging object code size

2020-09-08 Thread Joe Perches
On Mon, 2020-08-10 at 15:59 -0700, Joe Perches wrote: > The logging macros are pretty heavyweight and can be consolidated > to reduce overall object size. > > Joe Perches (2): > scsi: lpfc: Neaten logging macro #defines > scsi: lpfc: Add logging functions to reduce object

Re: [PATCH 2/4] drivers core: Remove strcat uses around sysfs_emit and neaten

2020-09-08 Thread Joe Perches
On Tue, 2020-09-08 at 10:32 +0200, Greg Kroah-Hartman wrote: > On Mon, Sep 07, 2020 at 10:58:06AM -0700, Joe Perches wrote: > > strcat is no longer necessary for sysfs_emit and sysfs_emit_at uses. > > > > Convert the strcat uses to sysfs_emit calls and neaten other blo

Re: [PATCH 1/4] drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions

2020-09-08 Thread Joe Perches
On Tue, 2020-09-08 at 10:27 +0200, Greg Kroah-Hartman wrote: > On Mon, Sep 07, 2020 at 10:58:05AM -0700, Joe Perches wrote: > > Convert the various sprintf fmaily calls in sysfs device show functions > > to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. > > But no

Re: [PATCH] fscrypt: Reduce object size of logging messages

2020-09-07 Thread Joe Perches
Hi again. On Mon, 2020-09-07 at 15:23 -0700, Eric Biggers wrote: > On Fri, Sep 04, 2020 at 09:38:23PM -0700, Joe Perches wrote: > > > > diff --git a/fs/crypto/crypto.c b/fs/crypto/crypto.c > > > > index 9212325763b0..c82cc3907e43 100644 > > > > --- a/fs/

Re: [PATCH 1/4] drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions

2020-09-07 Thread Joe Perches
On Tue, 2020-09-08 at 05:24 +0800, kernel test robot wrote: > Hi Joe, Hi robot. > I love your patch! Yet something to improve: Nothing really to improve as these are dependent on a previous patch that this robot did not apply.

Re: [Linux-kernel-mentees] [PATCH] checkpatch: GIT_COMMIT_ID: handle commit messages with multiple quotes

2020-09-07 Thread Joe Perches
On Mon, 2020-09-07 at 20:44 +0530, Ayush wrote: > Commits which mentioned/referenced "revert commits" in their description will > get error even if they follow the proper syntax. I think all your examples are broken. I think all should start with revert i.e.: Reverts commit ("description...")

[PATCH 5/4] drivers core: Convert class uses of sprintf to sysfs_emit

2020-09-07 Thread Joe Perches
Use the sysfs_emit API. Signed-off-by: Joe Perches --- drivers/base/devcoredump.c | 2 +- drivers/base/firmware_loader/fallback.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/base/devcoredump.c b/drivers/base/devcoredump.c index e42d0b514384

[PATCH 3/4] drivers core: Reindent a couple uses around sysfs_emit

2020-09-07 Thread Joe Perches
Just a couple of whitespace realignment to open parenthesis for multi-line statements. Signed-off-by: Joe Perches --- drivers/base/node.c| 4 ++-- drivers/base/power/sysfs.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/base/node.c b/drivers/base/node.c

[PATCH 2/4] drivers core: Remove strcat uses around sysfs_emit and neaten

2020-09-07 Thread Joe Perches
strcat is no longer necessary for sysfs_emit and sysfs_emit_at uses. Convert the strcat uses to sysfs_emit calls and neaten other block uses of direct returns to use an intermediate const char *. Signed-off-by: Joe Perches --- drivers/base/cacheinfo.c | 26 ++--- drivers/base

[PATCH 1/4] drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions

2020-09-07 Thread Joe Perches
> return len; } @@ identifier d_show; identifier dev, attr, buf; expression chr; @@ ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf) { ... - strcpy(buf, chr); - return strlen(buf); + return sysfs_emit(buf, chr); } Signed-off-by

[PATCH 4/4] drivers core: Miscellaneous changes for sysfs_emit

2020-09-07 Thread Joe Perches
Change a few additional instances that could use sysfs_emit that the coccinelle script could not convert. Signed-off-by: Joe Perches --- drivers/base/class.c| 2 +- drivers/base/cpu.c | 18 +- drivers/base/node.c | 15 +++ drivers/base/platform.c | 4

[PATCH 0/4] drivers core: Use sysfs_emit functions

2020-09-07 Thread Joe Perches
family functions to sysfs_emit and sysfs_emit_at Joe Perches (4): drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions drivers core: Remove strcat uses around sysfs_emit and neaten drivers core: Reindent a couple uses around sysfs_emit drivers core: Miscellaneous

Re: [PATCH V2] sysfs: Add sysfs_emit and sysfs_emit_at to format sysfs output

2020-09-06 Thread Joe Perches
On Sat, 2020-08-29 at 16:48 -0700, Joe Perches wrote: > Output defects can exist in sysfs content using sprintf and snprintf. > > sprintf does not know the PAGE_SIZE maximum of the temporary buffer > used for outputting sysfs content and it's possible to overrun the > PAGE_SIZ

Re: [linux-next PATCH v4] drivers/virt/fsl_hypervisor: Fix error handling path

2020-09-06 Thread Joe Perches
On Sun, 2020-09-06 at 07:47 +0530, Souptick Joarder wrote: > While running ./scripts/get_maintainer.pl, I observed one issue. Everytime I > run > the script, list is getting changed. Is it an expected behaviour ? Yes. https://lkml.org/lkml/2017/7/13/789

[PATCH] checkpatch: Warn on self-assignments

2020-09-05 Thread Joe Perches
id compiler warnings and as a back-door mechanism to reproduce the old uninitialized_var macro behavior. Signed-off-by: Joe Perches --- scripts/checkpatch.pl | 11 +++ 1 file changed, 11 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 149518d2a6a7..300b2659aab3

Re: [PATCH] fscrypt: Reduce object size of logging messages

2020-09-04 Thread Joe Perches
On Fri, 2020-09-04 at 16:03 -0700, Eric Biggers wrote: > On Fri, Sep 04, 2020 at 03:10:15PM -0700, Joe Perches wrote: > > Reduce the object size of logging messages by removing the > > separate KERN_LEVEL argument and adding it to the format. > > > > Miscellanea: &

[PATCH] fscrypt: Reduce object size of logging messages

2020-09-04 Thread Joe Perches
fs/crypto/built-in.a) 6306 90 0639618fc fs/crypto/policy.o (ex fs/crypto/built-in.a) 1369 40 01409 581 fs/crypto/bio.o (ex fs/crypto/built-in.a) 358061763 633 38202953a (TOTALS) Signed-off-by: Joe Perches --- fs/crypto/crypto.c

Re: [PATCH 08/29] dma-buf: Avoid comma separated statements

2020-09-04 Thread Joe Perches
On Fri, 2020-09-04 at 12:42 +0100, Kieran Bingham wrote: > I'm pleased to see this is treewide ;-) > Definitely prefer this. These are only the comma uses in if/do/while blocks that would also need braces as separate statements. There a multiple dozens more just with single statements terminated

Re: [PATCH v6 18/18] crypto: sun8i-ce: fix some style issue

2020-09-04 Thread Joe Perches
On Fri, 2020-09-04 at 11:10 +, Corentin Labbe wrote: > This patch fix a double empty line issue reported by checkpatch. > While at it, since now the maximum line length is now 100, reorder some > wrapped line. [] > diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c >

Re: printk: Add process name information to printk() output.

2020-09-04 Thread Joe Perches
On Fri, 2020-09-04 at 12:35 +0200, Greg KH wrote: > On Fri, Sep 04, 2020 at 11:53:42AM +0206, John Ogness wrote: > > On 2020-09-04, Changki Kim wrote: > > > Printk() meesages are the most basic and useful debug method. > > > However, additional information needs in multi-processor. > > > If we

Re: [PATCH net] net: phy: dp83867: Fix various styling and space issues

2020-09-03 Thread Joe Perches
On Thu, 2020-09-03 at 11:41 -0500, Dan Murphy wrote: > On 9/3/20 11:34 AM, Florian Fainelli wrote: > > On 9/3/2020 7:15 AM, Dan Murphy wrote: > > > Fix spacing issues reported for misaligned switch..case and extra new > > > lines. [] > > > diff --git a/drivers/net/phy/dp83867.c

Re: [PATCH 2/3] media: Add support for the AM/FM radio chip KT0913 from KT Micro.

2020-09-03 Thread Joe Perches
On Mon, 2020-08-31 at 19:06 -0300, Santiago Hormazabal wrote: > This chip requires almost no support components and can used over I2C. > The driver uses the I2C bus and exposes the controls as a V4L2 radio. > Tested with a module that contains this chip (from SZZSJDZ.com, > part number ZJ-801B,

Re: [PATCH v2] use cpu_to_le{16,32} instead of __constant_cpu_to_*

2020-09-02 Thread Joe Perches
On Wed, 2020-09-02 at 23:29 +0200, Rene Rebe wrote: > As per recommendation, convert a few remaining __constant_cpu_to_le{16,32} > instances in the qla2xxx, qla4xxx and cifs to just cpu_to_le{16,32}. [] > diff --git a/drivers/scsi/qla2xxx/qla_target.c > b/drivers/scsi/qla2xxx/qla_target.c [] > @@

Re: [PATCH v2 1/2] MAINTAINERS: Consolidate Analog Devices IIO entries and remove Beniamin Bia

2020-09-02 Thread Joe Perches
On Wed, 2020-09-02 at 21:11 +0300, Andy Shevchenko wrote: > On Wed, Sep 2, 2020 at 6:04 PM Krzysztof Kozlowski wrote: > > Emails to Beniamin Bia bounce with no such address so remove him from > > maintainers. After this removal, many entries for Analog Devices Inc > > IIO drivers look exactly

Re: [PATCH] staging: gdm724x: gdm_tty: replaced macro with a function

2020-09-02 Thread Joe Perches
On Tue, 2020-09-01 at 22:16 +0200, Antoni Przybylik wrote: > This approach is more elegant and prevents some problems related to > macros such as operator precedence in expanded expression. [] > diff --git a/drivers/staging/gdm724x/gdm_tty.c > b/drivers/staging/gdm724x/gdm_tty.c [] > @@ -36,6

checkpatch? (was: Re: [PATCH v3] coccinelle: misc: add uninitialized_var.cocci script)

2020-09-01 Thread Joe Perches
On Tue, 2020-09-01 at 12:48 +0300, Denis Efremov wrote: > uninitialized_var() macro was removed from the sources [1] and > other warning-silencing tricks were deprecated [2]. The purpose of this > cocci script is to prevent new occurrences of uninitialized_var() > open-coded variants. > +( > +* T

Re: [PATCH V2] sysfs: Add sysfs_emit and sysfs_emit_at to format sysfs output

2020-08-30 Thread Joe Perches
On Sun, 2020-08-30 at 18:25 +0300, Denis Efremov wrote: > > On 8/30/20 3:43 AM, Joe Perches wrote: > > $ cat sysfs_emit.cocci > > @@ > > identifier d_show =~ "^.*show.*$"; > > I think this additional pattern will allow to take more functions into the >

Re: [PATCH v6 2/3] MAINTAINERS: Add Purism Librem 5 section to the list

2020-08-30 Thread Joe Perches
On Sun, 2020-08-30 at 21:15 +0800, Shawn Guo wrote: > On Fri, Aug 21, 2020 at 02:17:54PM +0200, Martin Kepplinger wrote: > > Add development information for the devicetree files for hardware > > by Purism SPC. > > > > Signed-off-by: Martin Kepplinger > > I decided to drop this patch from my

Re: [PATCH RFC 0/2] simple sysfs wrappers for single values

2020-08-29 Thread Joe Perches
On Sat, 2020-08-29 at 17:28 -0700, Joe Perches wrote: > On Sun, 2020-08-30 at 00:37 +0100, Alex Dewar wrote: > > Hi all, > > > > I've noticed there seems to have been a fair amount of discussion around > > the subject of possible helper methods for use in the contex

Re: [PATCH V2] sysfs: Add sysfs_emit and sysfs_emit_at to format sysfs output

2020-08-29 Thread Joe Perches
On Sat, 2020-08-29 at 16:48 -0700, Joe Perches wrote: > Output defects can exist in sysfs content using sprintf and snprintf. > > sprintf does not know the PAGE_SIZE maximum of the temporary buffer > used for outputting sysfs content and it's possible to overrun the > PAGE_SIZ

Re: [PATCH RFC 0/2] simple sysfs wrappers for single values

2020-08-29 Thread Joe Perches
On Sun, 2020-08-30 at 00:37 +0100, Alex Dewar wrote: > Hi all, > > I've noticed there seems to have been a fair amount of discussion around > the subject of possible helper methods for use in the context of sysfs > show methods (which I haven't had a chance to go through in detail yet > --

Re: [PATCH] sysfs: Add sysfs_emit to replace sprintf to PAGE_SIZE buffers.

2020-08-29 Thread Joe Perches
On Sun, 2020-08-30 at 00:53 +0300, Denis Efremov wrote: > > Anyway, this will need updating, likely with better examples. [] > I think it's good to reflect in docs that sysfs_emit_at/sysfs_emit_pos is > only for "legacy" code and should not be used in new code (checkpatch.pl > warning?) > because

[PATCH V2] sysfs: Add sysfs_emit and sysfs_emit_at to format sysfs output

2020-08-29 Thread Joe Perches
of the temporary buffer and ensures that no overrun is done. Add a generic sysfs_emit_at function that can be used in multiple call situations that also ensures that no overrun is done. Signed-off-by: Joe Perches --- V2: Simplify sysfs_emit and add sysfs_emit_at Include Documentation change

Re: sysfs output without newlines

2020-08-29 Thread Joe Perches
On Sat, 2020-08-29 at 23:23 +0300, Denis Efremov wrote: > Hi, > > On 8/29/20 9:23 PM, Joe Perches wrote: > > While doing an investigation for a possible treewide conversion of > > sysfs output using sprintf/snprintf/scnprintf, I discovered > > several instances of sysfs

Re: [RFC PATCH] coccinelle: misc: add uninitialized_var.cocci script

2020-08-29 Thread Joe Perches
On Sat, 2020-08-29 at 21:36 +0200, Julia Lawall wrote: > > On Wed, 12 Aug 2020, Denis Efremov wrote: > > > Commit 63a0895d960a ("compiler: Remove uninitialized_var() macro") and > > commit 4b19bec97c88 ("docs: deprecated.rst: Add uninitialized_var()") > > removed uninitialized_var() and

sysfs output without newlines

2020-08-29 Thread Joe Perches
While doing an investigation for a possible treewide conversion of sysfs output using sprintf/snprintf/scnprintf, I discovered several instances of sysfs output without terminating newlines. It seems likely all of these should have newline terminations or have the \n\r termination changed to a

Re: [PATCH] sysfs: Add sysfs_emit to replace sprintf to PAGE_SIZE buffers.

2020-08-29 Thread Joe Perches
On Sat, 2020-08-29 at 09:59 +0300, Denis Efremov wrote: > Hi, > > On 8/29/20 1:52 AM, Joe Perches wrote: > > sprintf does not know the PAGE_SIZE maximum of the temporary buffer > > used for outputting sysfs content requests and it's possible to > > overrun the

Re: [PATCH] sysfs: Add sysfs_emit to replace sprintf to PAGE_SIZE buffers.

2020-08-29 Thread Joe Perches
On Sat, 2020-08-29 at 08:22 +0200, Greg Kroah-Hartman wrote: > On Fri, Aug 28, 2020 at 03:52:13PM -0700, Joe Perches wrote: > > sprintf does not know the PAGE_SIZE maximum of the temporary buffer > > used for outputting sysfs content requests and it's possible to > > over

[PATCH] sysfs: Add sysfs_emit to replace sprintf to PAGE_SIZE buffers.

2020-08-28 Thread Joe Perches
-by: Joe Perches --- fs/sysfs/file.c | 30 ++ include/linux/sysfs.h | 8 2 files changed, 38 insertions(+) diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index eb6897ab78e7..06a13bbd7080 100644 --- a/fs/sysfs/file.c +++ b/fs/sysfs/file.c @@ -707,3 +707,33

Re: [PATCH] checkpatch: Allow not using -f with files that are in git

2020-08-28 Thread Joe Perches
On Tue, 2020-08-25 at 14:23 +0200, Rasmus Villemoes wrote: > On 25/08/2020 02.09, Joe Perches wrote: > > If a file exists in git and checkpatch is used without the -f > > flag for scanning a file, then checkpatch will scan the file > > assuming it's a patch [] > &

Re: [PATCH v2 09/18] iio: afe: iio-rescale: Simplify with dev_err_probe()

2020-08-28 Thread Joe Perches
On Fri, 2020-08-28 at 11:39 +0200, Peter Rosin wrote: > On 2020-08-28 09:03, Krzysztof Kozlowski wrote: > > > > If there is no consensus among discussing people, I find this 100 line > > > > more readable, already got review, checkpatch accepts it so if subsystem > > > > maintainer likes it, I

Re: [trivial treewide PATCH] treewide: Fix misuses of 0x%x format specifiers

2020-08-28 Thread Joe Perches
On Fri, 2020-07-24 at 12:35 -0700, Joe Perches wrote: > These are almost all typos where the decimal length value > should be after the % not before it. Hey Jiri: Is the trivial tree still alive? Do you even look at this stuff anymore? If not, you should probably just kill the tree an

[PATCH 3/3] ntfs3: Rename NTFS_FLAGS_LOG_REPLAING to NTFS_FLAGS_LOG_REPLAYING

2020-08-28 Thread Joe Perches
Use the correct spelling of REPLAY Signed-off-by: Joe Perches --- fs/ntfs3/frecord.c | 2 +- fs/ntfs3/fsntfs.c | 4 ++-- fs/ntfs3/inode.c | 2 +- fs/ntfs3/ntfs_fs.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/ntfs3/frecord.c b/fs/ntfs3/frecord.c index

[PATCH 2/3] ntfs3: Use more common brace style

2020-08-28 Thread Joe Perches
Add open and close braces when if/else arms have multiple statements. Signed-off-by: Joe Perches --- fs/ntfs3/attrib.c | 7 --- fs/ntfs3/attrlist.c | 4 ++-- fs/ntfs3/bitmap.c | 43 ++- fs/ntfs3/file.c | 15 --- fs/ntfs3

[PATCH 0/3] ntfs3: trivial style cleanups

2020-08-28 Thread Joe Perches
Joe Perches (3): ntfs3: Add and use logging macros ntfs3: Use more common brace style ntfs3: Rename NTFS_FLAGS_LOG_REPLAING to NTFS_FLAGS_LOG_REPLAYING fs/ntfs3/attrib.c | 7 +++-- fs/ntfs3/attrlist.c | 4 +-- fs/ntfs3/bitmap.c | 43 +++-- fs/ntfs3/debug.h

[PATCH 1/3] ntfs3: Add and use logging macros

2020-08-28 Thread Joe Perches
Use more common kernel style by removing direct uses of KERN_. Miscellanea: o Correct spelling of garbage in logging Signed-off-by: Joe Perches --- fs/ntfs3/debug.h | 12 + fs/ntfs3/dir.c | 24 -- fs/ntfs3/file.c| 47 +-- fs

Re: [Cocci] [PATCH] usb: atm: don't use snprintf() for sysfs attrs

2020-08-28 Thread Joe Perches
On Fri, 2020-08-28 at 01:10 -0700, Joe Perches wrote: > On Fri, 2020-08-28 at 00:58 -0700, Kees Cook wrote: > > On Thu, Aug 27, 2020 at 09:12:06PM -0700, Joe Perches wrote: > > > Perhaps something like the below with a sample conversion > > > that uses single a

Re: [Cocci] [PATCH] usb: atm: don't use snprintf() for sysfs attrs

2020-08-28 Thread Joe Perches
On Fri, 2020-08-28 at 00:58 -0700, Kees Cook wrote: > On Thu, Aug 27, 2020 at 09:12:06PM -0700, Joe Perches wrote: > > Perhaps something like the below with a sample conversion > > that uses single and multiple sysfs_emit uses. > > On quick review, I like it. :) > >

Re: [PATCH] checkpatch: Allow not using -f with files that are in git

2020-08-28 Thread Joe Perches
On Tue, 2020-08-25 at 14:23 +0200, Rasmus Villemoes wrote: > On 25/08/2020 02.09, Joe Perches wrote: > > If a file exists in git and checkpatch is used without the -f > > flag for scanning a file, then checkpatch will scan the file > > assuming it's a patch and emit:

Re: Printing bitfields in the kernel (Re: [PATCH] drm: Parse Colorimetry data block from EDID)

2020-08-27 Thread Joe Perches
On Thu, 2020-08-27 at 10:34 +0300, Pekka Paalanen wrote: > On Wed, 26 Aug 2020 22:23:28 +0800 > Algea Cao wrote: > > > CEA 861.3 spec adds colorimetry data block for HDMI. > > Parsing the block to get the colorimetry data from > > panel. If flags are int, I could imagine another %p extension

Re: [Cocci] [PATCH] usb: atm: don't use snprintf() for sysfs attrs

2020-08-27 Thread Joe Perches
On Thu, 2020-08-27 at 15:45 -0700, Joe Perches wrote: > On Thu, 2020-08-27 at 15:20 -0700, Kees Cook wrote: > > On Fri, Aug 28, 2020 at 12:01:34AM +0300, Denis Efremov wrote: > > > Just FYI, I've send an addition to the device_attr_show.cocci script[1] > > > to turn >

Re: [PATCH 17/19] z2ram: reindent

2020-08-27 Thread Joe Perches
On Fri, 2020-08-28 at 10:57 +1000, Finn Thain wrote: > On Thu, 27 Aug 2020, Joe Perches wrote: > > > checkpatch already does this. > > > > Did you use checkpatch to generate this patch? Nope.

<    4   5   6   7   8   9   10   11   12   13   >