[PATCH v7 2/2] scripts: checkpatch: check unused parameters for function-like macro

2024-05-06 Thread Barry Song
From: Xining Xu If function-like macros do not utilize a parameter, it might result in a build warning. In our coding style guidelines, we advocate for utilizing static inline functions to replace such macros. This patch verifies compliance with the new rule. For a macro such as the one below,

[PATCH v7 1/2] Documentation: coding-style: ask function-like macros to evaluate parameters

2024-05-06 Thread Barry Song
From: Barry Song Recent commit 77292bb8ca69c80 ("crypto: scomp - remove memcpy if sg_nents is 1 and pages are lowmem") leads to warnings on xtensa and loongarch, In file included from crypto/scompress.c:12: include/crypto/scatterwalk.h: In function 'scatterwalk_pagedone': include/crypto/

[PATCH v7 0/2] codingstyle: avoid unused parameters for a function-like macro

2024-05-06 Thread Barry Song
From: Barry Song -v7: * collect ack of Joe for checkpatch.pl, thanks! * fixed an indentation per Joe -v6: * collect ack of Joe, thanks! * refine docs according to Jonathan, thanks! * add checkpatch doc according to Joe, thanks! v6 link: https://lore.kernel.org/lkml/20240506014606.8638-1-2

Re: [PATCH v3 1/1] coding-style: recommend split headers instead of kernel.h

2024-05-06 Thread Yueh-Shun Li
On 2024-01-28 14:26, Randy Dunlap wrote: On 1/8/24 12:22, Yueh-Shun Li wrote: > In section "18) Don't re-invent the kernel macros" in "Linux kernel > coding style": > > Recommend reusing macros from headers inside include/linux, instead of > the obsolete include/linux/kernel.h > > Change wording

Re: [PATCH RESEND v6 2/2] scripts: checkpatch: check unused parameters for function-like macro

2024-05-06 Thread Joe Perches
On Mon, 2024-05-06 at 19:16 +1200, Barry Song wrote: > > > From: Xining Xu > > > > > > If function-like macros do not utilize a parameter, it might result in a > > > build warning. In our coding style guidelines, we advocate for utilizing > > > static inline functions to replace such macros. Th

Re: [PATCH RESEND v6 2/2] scripts: checkpatch: check unused parameters for function-like macro

2024-05-06 Thread Barry Song
>> From: Xining Xu >> >> If function-like macros do not utilize a parameter, it might result in a >> build warning. In our coding style guidelines, we advocate for utilizing >> static inline functions to replace such macros. This patch verifies >> compliance with the new rule. > [] >> diff --gi