Re: [PATCH v2 1/3] sysfs: constify bin_attribute argument of sysfs_bin_attr_simple_read()

2025-01-01 Thread Aditya Gupta
Hi, Please use this Tested-by instead of the previous one i sent: Tested-by: Aditya Gupta Thanks, - Aditya G On 02/01/25 11:07, Aditya Gupta wrote: Looks good to me. Did boot test and reading the /sys files works. Linux-ci tests [0] are also good (the failing tests are broken from some

Re: [PATCH v2 1/3] sysfs: constify bin_attribute argument of sysfs_bin_attr_simple_read()

2025-01-01 Thread Aditya Gupta
-test-branch-23431++ Tested-by: Aditya Gupta Thanks, - Aditya G On 24/12/28 09:43AM, Thomas Weißschuh wrote: > Most users use this function through the BIN_ATTR_SIMPLE* macros, > they can handle the switch transparently. > Also adapt the two non-macro users in the same change. > >

Re: Current status and possible improvements in CONFIG_MODULE_FORCE_UNLOAD

2024-06-14 Thread Aditya Garg
Thanks for the reply Lucas. It makes sense now! > On 15 Jun 2024, at 12:18 AM, Lucas De Marchi wrote: > > On Thu, Jun 06, 2024 at 06:49:59AM GMT, Aditya Garg wrote: >> Hi >> >> I am Aditya Garg. I often require using out of tree drivers to support >> various

Current status and possible improvements in CONFIG_MODULE_FORCE_UNLOAD

2024-06-05 Thread Aditya Garg
Hi I am Aditya Garg. I often require using out of tree drivers to support various hardwares on Linux. Sometimes the provider doesn't write good drivers, and often they have to be force unloaded. It's a common thing in proprietary drivers. I know the author of the driver should take n

Re: [RFC] scripts: kernel-doc: improve parsing for kernel-doc comments syntax

2021-04-15 Thread Aditya Srivastava
On 15/4/21 12:55 am, Aditya Srivastava wrote: > Currently kernel-doc does not identify some cases of probable kernel > doc comments, for e.g. pointer used as declaration type for identifier, > space separated identifier, etc. > > Some example of these cases in files can be: >

[RFC] scripts: kernel-doc: improve parsing for kernel-doc comments syntax

2021-04-14 Thread Aditya Srivastava
write kernel-doc comment. Suggested-by: Jonathan Corbet Link: https://lore.kernel.org/lkml/87mtujktl2@meer.lwn.net Signed-off-by: Aditya Srivastava --- scripts/kernel-doc | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/scripts/kernel-doc b/scripts/ker

[PATCH] PCI: endpoint: fix incorrect kernel-doc comment syntax

2021-04-11 Thread Aditya Srivastava
Endpoint ConfigFS header file(). Prototype was for __LINUX_PCI_EP_CFS_H() instead" Similarly for other files too. Provide a simple fix by replacing such occurrences with general comment format, i.e. '/*', to prevent kernel-doc from parsing it. Signed-off-by: Aditya Srivast

[tip: x86/cleanups] x86/platform/intel/quark: Fix incorrect kernel-doc comment syntax in files

2021-04-10 Thread tip-bot2 for Aditya Srivastava
The following commit has been merged into the x86/cleanups branch of tip: Commit-ID: 0d6c8e1e246586b81cb4e6ab1a93a6d4a08a0cf9 Gitweb: https://git.kernel.org/tip/0d6c8e1e246586b81cb4e6ab1a93a6d4a08a0cf9 Author:Aditya Srivastava AuthorDate:Wed, 31 Mar 2021 03:00:22 +05:30

[PATCH] scsi: be2iscsi: Reset the address passed in beiscsi_iface_create_default

2021-04-06 Thread Aditya Pakki
if_info is a local variable that is passed to beiscsi_if_get_info. In case of failure, the variable is free'd but not reset to NULL. The patch avoids security issue by passing NULL to if_info. Signed-off-by: Aditya Pakki --- drivers/scsi/be2iscsi/be_iscsi.c | 2 ++ 1 file changed, 2 inser

[PATCH] SUNRPC: Add a check for gss_release_msg

2021-04-06 Thread Aditya Pakki
In gss_pipe_destroy_msg(), in case of error in msg, gss_release_msg deletes gss_msg. The patch adds a check to avoid a potential double free. Signed-off-by: Aditya Pakki --- net/sunrpc/auth_gss/auth_gss.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/sunrpc/auth_gss

[PATCH] net/rds: Avoid potential use after free in rds_send_remove_from_sock

2021-04-06 Thread Aditya Pakki
In case of rs failure in rds_send_remove_from_sock(), the 'rm' resource is freed and later under spinlock, causing potential use-after-free. Set the free pointer to NULL to avoid undefined behavior. Signed-off-by: Aditya Pakki --- net/rds/message.c | 1 + net/rds/send.c| 2 +

[PATCH] fuse: Avoid potential use after free

2021-04-06 Thread Aditya Pakki
In virtio_fs_get_tree, after fm is freed, it is again freed in case s_root is NULL and virtio_fs_fill_super() returns an error. To avoid a double free, set fm to NULL. Signed-off-by: Aditya Pakki --- fs/fuse/virtio_fs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/fuse/virtio_fs.c b

[PATCH] video: fbdev: sm501fb: Fix deallocation of buffers order

2021-04-06 Thread Aditya Pakki
The resource release in sm501fb_remove() is not in the inverse order of sm501fb_probe(), for the buffers. Release the info object after deallocating the buffers. Signed-off-by: Aditya Pakki --- drivers/video/fbdev/sm501fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

Re: [PATCH] scripts: kernel-doc: add warning for comment not following kernel-doc syntax

2021-04-03 Thread Aditya Srivastava
On 1/4/21 1:02 am, Jonathan Corbet wrote: > Aditya Srivastava writes: > >> On 29/3/21 7:26 pm, Jonathan Corbet wrote: >>> Aditya Srivastava writes: >>> >>>> Currently, kernel-doc start parsing the comment as a kernel-doc comment if >>>> it st

[PATCH] x86/platform/intel/quark: fix incorrect kernel-doc comment syntax in files

2021-03-30 Thread Aditya Srivastava
ent format, i.e. '/*', to prevent kernel-doc from parsing it. Signed-off-by: Aditya Srivastava --- * Applies perfectly on next-20210326 arch/x86/platform/intel-quark/imr.c | 2 +- arch/x86/platform/intel-quark/imr_selftest.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)

[PATCH] x86/sgx: fix incorrect kernel-doc comment syntax in files

2021-03-30 Thread Aditya Srivastava
2016(). Prototype was for _X86_ENCL_H() instead" Similarly for arch/x86/kernel/cpu/sgx/arch.h too. Provide a simple fix by replacing these occurrences with general comment format, i.e. '/*', to prevent kernel-doc from parsing it. Signed-off-by: Aditya Srivastava --- * Applies perf

[PATCH] ARM: OMAP2+: fix incorrect kernel-doc comment syntax in file

2021-03-30 Thread Aditya Srivastava
comment format, i.e. '/*', to prevent kernel-doc from parsing it. Signed-off-by: Aditya Srivastava --- * Applies perfectly on next-20210326 arch/arm/mach-omap2/omap_twl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/omap_twl.c b/arch/arm/

[PATCH] ARM: OMAP1: fix incorrect kernel-doc comment syntax in file

2021-03-30 Thread Aditya Srivastava
comment format, i.e. '/*', to prevent kernel-doc from parsing it. Signed-off-by: Aditya Srivastava --- * Applies perfectly on next-20210326 arch/arm/mach-omap1/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-omap1/timer.c b/arch/arm/mach-omap1/

[PATCH] ARM: mach-sa1100: fix incorrect kernel-doc comment syntax in file

2021-03-30 Thread Aditya Srivastava
Prototype was for DEFINE_SPINLOCK() instead" Provide a simple fix by replacing this occurrence with general comment format, i.e. '/*', to prevent kernel-doc from parsing it. Signed-off-by: Aditya Srivastava --- * Applies perfectly on next-20210326 arch/arm/mach-sa1100/jornad

Re: [PATCH] scripts: kernel-doc: add warning for comment not following kernel-doc syntax

2021-03-29 Thread Aditya Srivastava
On 29/3/21 7:26 pm, Jonathan Corbet wrote: > Aditya Srivastava writes: > >> Currently, kernel-doc start parsing the comment as a kernel-doc comment if >> it starts with '/**', but does not take into account if the content inside >> the comment too, adheres

[PATCH] usb: dwc3: imx8mp: fix incorrect kernel-doc comment syntax

2021-03-29 Thread Aditya Srivastava
format, i.e. '/*', to prevent kernel-doc from parsing it. Signed-off-by: Aditya Srivastava --- * Applies perfectly on next-20210326 drivers/usb/dwc3/dwc3-imx8mp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/dwc3-imx8mp.c b/drivers/usb/dwc3/dwc3-i

[PATCH] usb: dwc3: exynos: fix incorrect kernel-doc comment syntax

2021-03-29 Thread Aditya Srivastava
comment format, i.e. '/*', to prevent kernel-doc from parsing it. Signed-off-by: Aditya Srivastava --- * Applies perfectly on next-20210326 drivers/usb/dwc3/dwc3-exynos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/dwc3-exynos.c b/drivers/u

[PATCH] usb: dwc3: fix incorrect kernel-doc comment syntax in files

2021-03-29 Thread Aditya Srivastava
or h(). Prototype was for __DRIVERS_USB_DWC3_IO_H() instead" Similarly for other files too. Provide a simple fix by replacing such occurrences with general comment format, i.e. '/*', to prevent kernel-doc from parsing it. Signed-off-by: Aditya Srivastava --- * Applies perfectly on next-2021032

[PATCH] usb: dwc3: st: fix incorrect kernel-doc comment syntax in file

2021-03-29 Thread Aditya Srivastava
e. '/*', to prevent kernel-doc from parsing it. Signed-off-by: Aditya Srivastava --- * Applies perfectly on next-20210326 drivers/usb/dwc3/dwc3-st.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/dwc3-st.c b/drivers/usb/dwc3/dwc3-st.c index b06b709

[PATCH] lib: fix incorrect kernel-doc comment syntax in file

2021-03-29 Thread Aditya Srivastava
ion prototype: 'const U32 g_searchStrength = 8; '" Similarly for other files too. Provide a simple fix by replacing such occurrences with general comment format, i.e. '/*', to prevent kernel-doc from parsing it. Signed-off-by: Aditya Srivastava --- * Applies perfectly on next-20

[PATCH] crypto: chelsio: fix incorrect kernel-doc comment syntax in file

2021-03-29 Thread Aditya Srivastava
g this occurrence with general comment format, i.e. '/*', to prevent kernel-doc from parsing it. Signed-off-by: Aditya Srivastava --- drivers/crypto/chelsio/chcr_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/chelsio/chcr_core.c b/drivers/crypt

[PATCH] scripts: kernel-doc: add warning for comment not following kernel-doc syntax

2021-03-29 Thread Aditya Srivastava
e next lines, and as a result causing this warning. Provide a clearer warning message to the users regarding the same, if the content inside the comment does not follow the kernel-doc expected format. Signed-off-by: Aditya Srivastava --- scripts/kernel-doc | 17 + 1 file changed,

[PATCH v2] ntfs: fix incorrect kernel-doc comment syntax in files

2021-03-22 Thread Aditya Srivastava
le fix by replacing such occurrences with general comment format, i.e. '/*', to prevent kernel-doc from parsing it. Also fix enum documentation format at "ntfs_compression_constants", in fs/ntfs/compress.c, by prefixing 'enum' keyword to the comment description. Signed-off-b

[PATCH] crypto: nx: fix incorrect kernel-doc comment syntax in files

2021-03-21 Thread Aditya Srivastava
ent format, i.e. '/*', to prevent kernel-doc from parsing it. Signed-off-by: Aditya Srivastava --- * Applies perfectly on next-20210319 drivers/crypto/nx/nx-aes-cbc.c | 2 +- drivers/crypto/nx/nx-aes-ccm.c | 2 +- drivers/crypto/nx/nx-aes-ctr.c | 2 +- drivers/crypto/nx/nx-aes-ecb.c |

[PATCH] crypto: ux500: fix incorrect kernel-doc comment syntax

2021-03-21 Thread Aditya Srivastava
otype for ST(). Prototype was for _CRYP_H_() instead" Similarly for other files too. Provide a simple fix by replacing such occurrences with general comment format, i.e. '/*', to prevent kernel-doc from parsing it. Signed-off-by: Aditya Srivastava --- drivers/crypto/ux500/cryp/c

[PATCH] crypto: amcc: fix incorrect kernel-doc comment syntax in files

2021-03-21 Thread Aditya Srivastava
es with general comment format, i.e. '/*', to prevent kernel-doc from parsing it. Signed-off-by: Aditya Srivastava --- drivers/crypto/amcc/crypto4xx_alg.c | 12 ++-- drivers/crypto/amcc/crypto4xx_core.c| 18 +- drivers/crypto/amcc/crypto4xx_core.h|

[PATCH] crypto: vmx: fix incorrect kernel-doc comment syntax in files

2021-03-20 Thread Aditya Srivastava
r Routines supporting VMX instructions on the Power 8(). Prototype was for p8_init() instead" Similarly for other files too. Provide a simple fix by replacing such occurrences with general comment format, i.e. '/*', to prevent kernel-doc from parsing it. Signed-off-by: Aditya Sri

[PATCH] ntfs: fix incorrect kernel-doc comment syntax in files

2021-03-20 Thread Aditya Srivastava
p_runlist_nolock'" "warning: Function parameter or member 'ctx' not described in 'ntfs_map_runlist_nolock'" "warning: expecting prototype for c(). Prototype was for ntfs_map_runlist_nolock() instead" Similarly for other files too. Provide a simple fix b

Re: [RFC] scripts: kernel-doc: avoid warnings due to initial commented lines in file

2021-03-20 Thread Aditya Srivastava
On 20/3/21 6:51 pm, Lukas Bulwahn wrote: > On Sat, Mar 20, 2021 at 1:45 PM Aditya Srivastava > wrote: >> >> On 20/3/21 12:23 pm, Aditya wrote: >>> On 18/3/21 11:48 pm, Jonathan Corbet wrote: >>>> Lukas Bulwahn writes: >>>> >>>&g

Re: [RFC] scripts: kernel-doc: avoid warnings due to initial commented lines in file

2021-03-20 Thread Aditya Srivastava
On 20/3/21 12:23 pm, Aditya wrote: > On 18/3/21 11:48 pm, Jonathan Corbet wrote: >> Lukas Bulwahn writes: >> >>> Yeah, and as this line-counting is really just a poor man's >>> heuristics, we might just be better to really turn this heuristics >>> i

[PATCH] ecryptfs: fix incorrect kernel-doc comment syntax in files

2021-03-20 Thread Aditya Srivastava
ptfs_d_revalidate() instead" Similarly for other files too. Provide a simple fix by replacing such occurrences with general comment format, i.e. '/*', to prevent kernel-doc from parsing it. Signed-off-by: Aditya Srivastava --- * Applies perfectly on next-20210312 fs/ecryptfs/crypto

Re: [RFC] scripts: kernel-doc: avoid warnings due to initial commented lines in file

2021-03-20 Thread Aditya
of > kerneldoc comments is fairly rigid; it shouldn't be too hard to pick out > the /** comments that don't fit that format, right? Am I missing > something there? > > Thanks, > > jon > Thanks for the inputs Lukas and Jonathan. I shall try to come up with something. Thanks Aditya

[PATCH] block: fix comment syntax in file headers

2021-03-17 Thread Aditya Srivastava
nning scripts/kernel-doc -none on block/partitions/ldm.h causes this warning: "warning: expecting prototype for ldm(). Prototype was for _FS_PT_LDM_H_() instead" Provide a simple fix by replacing such occurrences with general comment format, i.e., "/*", to prevent kernel-doc

[PATCH] ALSA: ctxfi: fix comment syntax in file headers

2021-03-17 Thread Aditya Srivastava
ent syntax with general format, i.e. "/*", to prevent kernel-doc from parsing it. Signed-off-by: Aditya Srivastava --- sound/pci/ctxfi/ct20k1reg.h | 2 +- sound/pci/ctxfi/ct20k2reg.h | 2 +- sound/pci/ctxfi/ctamixer.c | 2 +- sound/pci/ctxfi/ctamixer.h | 2 +- sound/pci/ctxfi/ctat

[PATCH] ALSA: asihpi: fix comment syntax in file headers

2021-03-17 Thread Aditya Srivastava
g scripts/kernel-doc -none on sound/pci/asihpi/hpidspcd.h causes this warning: "warning: Cannot understand on line 4 - I thought it was a doc line" Provide a simple fix by replacing the kernel-doc like comment syntax with general format, i.e. "/*", to prevent kernel-doc

[PATCH v2] rsi: fix comment syntax in file headers

2021-03-15 Thread Aditya Srivastava
comment format, i.e., "/*", to prevent kernel-doc from parsing it. Signed-off-by: Aditya Srivastava --- - Applies perfectly on next-20210312 Changes in v2: - Convert the patch series to a single patch as suggested by Lukas and Kalle drivers/net/wireless/rsi/rsi_boot_params.h | 2

Re: [PATCH 00/10] rsi: fix comment syntax in file headers

2021-03-15 Thread Aditya
On 15/3/21 2:11 pm, Kalle Valo wrote: > Lukas Bulwahn writes: > >> On Sun, Mar 14, 2021 at 9:18 PM Aditya Srivastava >> wrote: >>> >>> The opening comment mark '/**' is used for highlighting the beginning of >>> kernel-doc comments. >&

[PATCH 10/10] rsi: rsi_usb: fix file header comment syntax

2021-03-14 Thread Aditya Srivastava
specifications (i.e., function, struct, etc). This causes unwelcomed warning from kernel-doc: "warning: Cannot understand * @section LICENSE on line 2 - I thought it was a doc line" Replace this comment syntax with general comment format, i.e. '/*' to prevent kernel-doc

[PATCH 09/10] rsi: rsi_sdio: fix file header comment syntax

2021-03-14 Thread Aditya Srivastava
specifications (i.e., function, struct, etc). This causes unwelcomed warning from kernel-doc: "warning: Cannot understand * @section LICENSE on line 2 - I thought it was a doc line" Replace this comment syntax with general comment format, i.e. '/*' to prevent kernel-doc

[PATCH 08/10] rsi: rsi_debugfs: fix file header comment syntax

2021-03-14 Thread Aditya Srivastava
specifications (i.e., function, struct, etc). This causes unwelcomed warning from kernel-doc: "warning: wrong kernel-doc identifier on line: * Copyright (c) 2014 Redpine Signals Inc." Replace this comment syntax with general comment format, i.e. '/*' to prevent kernel-doc

[PATCH 06/10] rsi: rsi_main: fix file header comment syntax

2021-03-14 Thread Aditya Srivastava
specifications (i.e., function, struct, etc). This causes unwelcomed warning from kernel-doc: "warning: wrong kernel-doc identifier on line: * Copyright (c) 2014 Redpine Signals Inc." Replace this comment syntax with general comment format, i.e. '/*' to prevent kernel-doc

[PATCH 07/10] rsi: rsi_hal: fix file header comment syntax

2021-03-14 Thread Aditya Srivastava
specifications (i.e., function, struct, etc). This causes unwelcomed warning from kernel-doc: "warning: wrong kernel-doc identifier on line: * Copyright (c) 2017 Redpine Signals Inc." Replace this comment syntax with general comment format, i.e. '/*' to prevent kernel-doc

[PATCH 05/10] rsi: rsi_mgmt: fix file header comment syntax

2021-03-14 Thread Aditya Srivastava
specifications (i.e., function, struct, etc). This causes unwelcomed warning from kernel-doc: "warning: wrong kernel-doc identifier on line: * Copyright (c) 2014 Redpine Signals Inc." Replace this comment syntax with general comment format, i.e. '/*' to prevent kernel-doc

[PATCH 04/10] rsi: rsi_common: fix file header comment syntax

2021-03-14 Thread Aditya Srivastava
specifications (i.e., function, struct, etc). This causes unwelcomed warning from kernel-doc: "warning: wrong kernel-doc identifier on line: * Copyright (c) 2014 Redpine Signals Inc." Replace this comment syntax with general comment format, i.e. '/*' to prevent kernel-doc

[PATCH 03/10] rsi: rsi_ps: fix file header comment syntax

2021-03-14 Thread Aditya Srivastava
specifications (i.e., function, struct, etc). This causes unwelcomed warning from kernel-doc: "warning: wrong kernel-doc identifier on line: * Copyright (c) 2017 Redpine Signals Inc." Replace this comment syntax with general comment format, i.e. '/*' to prevent kernel-doc

[PATCH 02/10] rsi: rsi_coex: fix file header comment syntax

2021-03-14 Thread Aditya Srivastava
specifications (i.e., function, struct, etc). This causes unwelcomed warning from kernel-doc: "warning: wrong kernel-doc identifier on line: * Copyright (c) 2018 Redpine Signals Inc." Replace this comment syntax with general comment format, i.e. '/*' to prevent kernel-doc

[PATCH 01/10] rsi: rsi_boot_params: fix file header comment syntax

2021-03-14 Thread Aditya Srivastava
el-doc from parsing these Signed-off-by: Aditya Srivastava --- drivers/net/wireless/rsi/rsi_boot_params.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/rsi/rsi_boot_params.h b/drivers/net/wireless/rsi/rsi_boot_params.h index c1cf19d1e376..30e03aa6a5

[PATCH 00/10] rsi: fix comment syntax in file headers

2021-03-14 Thread Aditya Srivastava
yntax with general format, i.e. "/*", to prevent kernel-doc from parsing it. * The patch series applies perfectly on next-20210312 Aditya Srivastava (10): rsi: rsi_boot_params: fix file header comment syntax rsi: rsi_coex: fix file header comment syntax rsi: rsi_ps: fix file header co

[PATCH] soc: fsl: guts: fix comment syntax in file

2021-03-13 Thread Aditya Srivastava
). Prototype was for __FSL_GUTS_H__() instead" Replace all such comment occurrences with general comment format, i.e. '/*' to pervent kernel-doc from parsing these. Signed-off-by: Aditya Srivastava --- * Applies perfectly on next-20210312 include/linux/fsl/guts.h | 4 ++-- 1 file chan

Re: [RFC] scripts: kernel-doc: avoid warnings due to initial commented lines in file

2021-03-11 Thread Aditya
On 10/3/21 11:49 am, Lukas Bulwahn wrote: > On Tue, Mar 9, 2021 at 10:24 PM Aditya wrote: >> >> On 9/3/21 7:00 pm, Markus Heiser wrote: >>> >>> Am 09.03.21 um 13:53 schrieb Aditya Srivastava: >>>> Starting commented lines in a file mostly contains c

Re: [RFC] scripts: kernel-doc: avoid warnings due to initial commented lines in file

2021-03-09 Thread Aditya
On 9/3/21 7:00 pm, Markus Heiser wrote: > > Am 09.03.21 um 13:53 schrieb Aditya Srivastava: >> Starting commented lines in a file mostly contains comments describing >> license, copyright or general information about the file. >> >> E.g., in sound/pci/ctxfi/ctres

[RFC] scripts: kernel-doc: avoid warnings due to initial commented lines in file

2021-03-09 Thread Aditya Srivastava
results in ineffective warnings by kernel-doc, related to these. Provide a simple fix by skipping first three lines in a file for checking kernel-doc comments. Suggested-by: Lukas Bulwahn Signed-off-by: Aditya Srivastava --- scripts/kernel-doc | 6 +- 1 file changed, 5 insertions(+), 1 deletion

Re: [RFC v3] scripts: kernel-doc: fix typedef support for struct/union parsing

2021-03-06 Thread Aditya
On 6/3/21 8:50 pm, Matthew Wilcox wrote: > On Sat, Mar 06, 2021 at 01:18:38PM +0530, Aditya wrote: >> On 6/3/21 11:55 am, Lukas Bulwahn wrote: >>> I agree. That might be a suitable clean-up to keep the code for >>> functions and struct/union parsing similar in style/sp

[RFC v2] scripts: kernel-doc: fix attribute capture in function parsing

2021-03-06 Thread Aditya Srivastava
rt for "__attribute_const__" and "__flatten" attributes. A quick evaluation by running 'kernel-doc -none' on kernel-tree reveals that no additional warning or error has been added or removed by the fix. Suggested-by: Lukas Bulwahn Signed-off-by: Aditya Srivastava ---

Re: [RFC v3] scripts: kernel-doc: fix typedef support for struct/union parsing

2021-03-05 Thread Aditya
On 6/3/21 11:55 am, Lukas Bulwahn wrote: > On Sat, Mar 6, 2021 at 5:35 AM Matthew Wilcox wrote: >> >> On Thu, Feb 25, 2021 at 08:20:33PM +0530, Aditya Srivastava wrote: >>> +++ b/scripts/kernel-doc >>> @@ -1201,12 +1201,23 @@ sub dump_union($$) { >>> su

Re: [RFC] scripts: kernel-doc: fix attribute capture in function parsing

2021-03-05 Thread Aditya
On 6/3/21 12:13 am, Matthew Wilcox wrote: > On Fri, Mar 05, 2021 at 11:50:00PM +0530, Aditya Srivastava wrote: >> Provide a simple fix by adding "__attribute_const__" in the corresponding >> regex expression. >> >> A quick evaluation by running 'kernel-do

[RFC] scripts: kernel-doc: fix attribute capture in function parsing

2021-03-05 Thread Aditya Srivastava
unning 'kernel-doc -none' on kernel-tree reveals that no additional warning or error has been added or removed by the fix. Suggested-by: Lukas Bulwahn Signed-off-by: Aditya Srivastava --- scripts/kernel-doc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/

[RFC v3] scripts: kernel-doc: fix typedef support for struct/union parsing

2021-02-25 Thread Aditya Srivastava
ruct/union syntax and a preceding kernel-doc; all other occurrences have no preceding kernel-doc. Add support for parsing struct/union following this syntax. Signed-off-by: Aditya Srivastava --- Changes in v3: - Modify commit message Changes in v2: - Split recurring regex into multiple variable

[RFC v2] scripts: kernel-doc: fix typedef support for struct/union parsing

2021-02-24 Thread Aditya Srivastava
nux/zstd.h emits: "error: Cannot parse struct or union!" Add support for parsing struct/union following this syntax. Signed-off-by: Aditya Srivastava --- Changes in v2: - Split recurring regex into multiple variables - Modify commit message scripts/kernel-doc | 17 ++---

Re: [RFC] scripts: kernel-doc: fix typedef support for struct parsing

2021-02-23 Thread Aditya
On 23/2/21 3:10 am, Jonathan Corbet wrote: > Aditya Srivastava writes: > >> There are files in kernel, which use 'typedef struct' syntax for defining >> struct. For eg, include/linux/zstd.h, drivers/scsi/megaraid/mega_common.h, >> etc. >> However, kernel-

Re: [RFC] scripts: kernel-doc: fix array element capture in pointer-to-func parsing

2021-02-23 Thread Aditya
On 23/2/21 3:03 am, Jonathan Corbet wrote: > Aditya Srivastava writes: > >> Currently, kernel-doc causes an unexpected error when array element (i.e., >> "type (*foo[bar])(args)") is present as pointer parameter in >> pointer-to-function parsing. >>

[RFC] scripts: kernel-doc: fix typedef support for struct parsing

2021-02-22 Thread Aditya Srivastava
td.h emits: "error: Cannot parse struct or union!" Add support for parsing it. Signed-off-by: Aditya Srivastava --- scripts/kernel-doc | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 8b5bc7bf4bb8..46e90

[RFC] scripts: kernel-doc: fix array element capture in pointer-to-func parsing

2021-02-17 Thread Aditya Srivastava
y adding square brackets in the regex, responsible for capturing $param. A quick evaluation, by running 'kernel-doc -none' on entire kernel-tree, reveals that no additional warning or error has been added or removed by the fix. Suggested-by: Lukas Bulwahn Signed-off-by: Aditya Sriv

[PATCH v3] checkpatch: add warning for avoiding .L prefix symbols in assembly files

2021-01-23 Thread Aditya Srivastava
/20210112210154.gi4...@sirena.org.uk Signed-off-by: Aditya Srivastava --- * Applies perfectly on next-20210122 Changes in v3: - Modify regex for SYM_*_START/END pair - remove check for arch/x86/entry/* and arch/x86/lib/* - change 'Link:' in commit message to lkml - Modify commit description

Re: [PATCH v2] checkpatch: add warning for avoiding .L prefix symbols in assembly files

2021-01-23 Thread Aditya
On 23/1/21 10:51 pm, Joe Perches wrote: > On Sat, 2021-01-23 at 20:44 +0530, Aditya Srivastava wrote: >> objtool requires that all code must be contained in an ELF symbol. >> Symbol names that have a '.L' prefix do not emit symbol table entries, as >> they have sp

[PATCH v2] checkpatch: add warning for avoiding .L prefix symbols in assembly files

2021-01-23 Thread Aditya Srivastava
own Link: https://groups.google.com/g/clang-built-linux/c/-drkmLgu-cU/m/4staOlf-CgAJ Signed-off-by: Aditya Srivastava --- * Applies perfectly on next-20210122 Changes in v2: - Reduce the check to only SYM_*_START/END lines - Reduce the check for only .S files in arch/x86/entry/* and arch/x86/li

Re: [PATCH] checkpatch: add warning for avoiding .L prefix symbols in assembly files

2021-01-22 Thread Aditya
On 23/1/21 12:40 am, Joe Perches wrote: > On Fri, 2021-01-22 at 18:48 +0530, Aditya wrote: >> On 21/1/21 12:13 am, Joe Perches wrote: >>> I believe the test should be: >>> >>> if ($realfile =~ /\.S$/ && >>> $line =~ /^\+\s*SYM_[A-Z]

Re: [PATCH] checkpatch: add warning for avoiding .L prefix symbols in assembly files

2021-01-22 Thread Aditya
On 21/1/21 12:13 am, Joe Perches wrote: > On Wed, 2021-01-20 at 18:23 +0530, Aditya wrote: >> On 20/1/21 2:51 pm, Joe Perches wrote: >>> On Wed, 2021-01-20 at 12:55 +0530, Aditya Srivastava wrote: >>>> Local symbols prefixed with '.L' do not emit symbol

Re: [PATCH] checkpatch: add warning for avoiding .L prefix symbols in assembly files

2021-01-20 Thread Aditya
On 20/1/21 2:51 pm, Joe Perches wrote: > On Wed, 2021-01-20 at 12:55 +0530, Aditya Srivastava wrote: >> Local symbols prefixed with '.L' do not emit symbol table entries, as >> they have special meaning for the assembler. >> >> '.L' prefixed symbols

[PATCH] checkpatch: add warning for avoiding .L prefix symbols in assembly files

2021-01-19 Thread Aditya Srivastava
new check to emit a warning on finding the usage of '.L' symbols in '.S' files, if it lies within SYM_*_START/END annotation pair. Suggested-by: Mark Brown Link: https://lore.kernel.org/lkml/20210112210154.gi4...@sirena.org.uk/ Signed-off-by: Aditya Srivastava --- scripts

[PATCH v3 1/2] checkpatch: fix false positive for COMMIT_LOG_LONG_LINE with URLs

2021-01-13 Thread Aditya Srivastava
19-January/144761.html Avoid giving users warning for character limit for such cases, instead suggest them to prefix the URLs with "Link:" Signed-off-by: Aditya Srivastava --- scripts/checkpatch.pl | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/che

[PATCH v3 2/2] checkpatch: add fix option for COMMIT_LOG_LONG_LINE with URLs

2021-01-13 Thread Aditya Srivastava
19-January/144761.html Provide a simple fix option by prefixing the first non-whitespace character of the line with "Link:" Signed-off-by: Aditya Srivastava --- scripts/checkpatch.pl | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts

[PATCH v3 0/2] checkpatch: fix false positive for COMMIT_LOG_LONG_LINE and provide fix

2021-01-13 Thread Aditya Srivastava
regex with /^\s*[a-z][\w\.\+\-]*:\/\/\S+/i (earlier: /^\s*\b[a-z][\w\.\+\-]*:\/\/\S+/i) Aditya Srivastava (2): checkpatch: fix false positive for COMMIT_LOG_LONG_LINE with URLs checkpatch: add fix option for COMMIT_LOG_LONG_LINE with URLs scripts/checkpatch.pl | 14 +++--- 1 file ch

Re: [PATCH] drivers: net: wireless: rtlwifi: fix bool comparison in expressions

2021-01-13 Thread Aditya
On 9/1/21 1:11 am, Larry Finger wrote: > On 1/8/21 9:32 AM, Aditya Srivastava wrote: >> There are certain conditional expressions in rtlwifi, where a boolean >> variable is compared with true/false, in forms such as (foo == true) or >> (false != bar), which does not comp

[PATCH 1/5] rtlwifi: rtl_pci: fix bool comparison in expressions

2021-01-10 Thread Aditya Srivastava
condition, rather than comparing with true/false E.g., in drivers/net/wireless/realtek/rtlwifi/ps.c, "if (find_p2p_ie == true)" can be replaced with "if (find_p2p_ie)" Replace all such expressions with the bool variables appropriately Signed-off-by: Aditya Srivastava ---

[PATCH 5/5] rtlwifi: rtl8821ae: fix bool comparison in expressions

2021-01-10 Thread Aditya Srivastava
propriately Signed-off-by: Aditya Srivastava --- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c index 372d6f8

[PATCH 0/5] rtlwifi: fix bool comparison in expressions

2021-01-10 Thread Aditya Srivastava
(mac->act_scanning)" Fix all such expressions with the bool variables appropriately for all the drivers in rtlwifi * The changes made are compile tested. * The patches apply perfectly on next-20210108 Aditya Srivastava (5): rtlwifi: rtl_pci: fix bool comparison in expressions rtlwifi:

[PATCH 3/5] rtlwifi: rtl8188ee: fix bool comparison in expressions

2021-01-10 Thread Aditya Srivastava
condition, rather than comparing with true/false E.g., in drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.c, "if (mac->act_scanning == true)" can be replaced with "if (mac->act_scanning)" Replace all such expressions with the bool variables appropriately Signed

[PATCH 4/5] rtlwifi: rtl8192se: fix bool comparison in expressions

2021-01-10 Thread Aditya Srivastava
condition, rather than comparing with true/false Replace all such expressions with the bool variables appropriately Signed-off-by: Aditya Srivastava --- drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless

[PATCH 2/5] rtlwifi: rtl8192c-common: fix bool comparison in expressions

2021-01-10 Thread Aditya Srivastava
the condition, rather than comparing with true/false E.g., in drivers/net/wireless/realtek/rtlwifi/rtl8192c/dm_common.c, "else if (initialized == false) {" can be replaced with "else if (!initialized) {" Replace all such expressions with the bool variables appropriately S

[PATCH] drivers: net: wireless: rtlwifi: fix bool comparison in expressions

2021-01-08 Thread Aditya Srivastava
condition, rather than comparing with true/false E.g., in drivers/net/wireless/realtek/rtlwifi/ps.c, "if (find_p2p_ie == true)" can be replaced with "if (find_p2p_ie)" Replace all such expressions with the bool variables appropriately Signed-off-by: Aditya Srivastava --- -

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

2020-12-24 Thread Aditya
On 18/12/20 5:41 pm, 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 11729 warnings for > this class, around 299 are due to line starting with URL. > > E.g.,

[PATCH v2] staging: rtl8192e: fix bool comparison in expressions

2020-12-20 Thread Aditya Srivastava
condition, rather than comparing with true/false E.g. in drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c, "if (Type == true)" can be replaced with: "if (Type)" Replace all such expressions with the bool variables appropriately Signed-off-by: Aditya Srivastava --- - the chan

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

2020-12-18 Thread Aditya Srivastava
st them to prefix the URLs with "Link:" Signed-off-by: Aditya Srivastava --- changes in v2: - Fix coding style ('} else {') - Make the URL check follow RFC 3986 style - Give warning only if the URL is first non-whitespace of the line - Set $commit_log_long_line only for else cas

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

2020-12-17 Thread Aditya
On 17/12/20 10:33 pm, Joe Perches wrote: > 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 >&g

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

2020-12-17 Thread Aditya Srivastava
prefix the URLs with "Link:" Signed-off-by: Aditya Srivastava --- scripts/checkpatch.pl | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index abd5a3d2e913..23da1f50fe6a 100755 --- a/scripts/checkpatch.pl +++ b/s

[PATCH] staging: rtl8192e: fix bool comparison in expressions

2020-12-17 Thread Aditya Srivastava
condition, rather than comparing with true/false E.g. in drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c, "if (Type == true)" can be replaced with: "if (Type)" Replace all such expressions with the bool variables appropriately Signed-off-by: Aditya Srivastava --- - the chan

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

2020-12-05 Thread Aditya
On 5/12/20 5:33 pm, Joe Perches wrote: > 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 standar

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

2020-12-05 Thread Aditya
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. > > 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-autho

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

2020-12-04 Thread Aditya Srivastava
e standard signature equivalent for 'Co-authored-by' is 'Co-developed-by'. Provide a fix by suggesting users with this signature alternative and replacing. Signed-off-by: Aditya Srivastava --- applies perfectly on the latest next-20201204 branch changes in v2: replace comm

Re: [PATCH] checkpatch: add fix for BAD_SIGN_OFF

2020-12-04 Thread Aditya
On 9/11/20 1:27 am, Joe Perches wrote: > On Sun, 2020-11-08 at 19:13 +0530, Aditya Srivastava wrote: >> Currently, checkpatch warns us if the author of the commit signs-off >> as co-developed-by. > [] >> A quick manual check found out that all fixes were correct in thos

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

2020-12-03 Thread Aditya
On 3/12/20 4:29 pm, Lukas Bulwahn wrote: > On Thu, 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_SIGN_O

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

2020-12-03 Thread Aditya
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_SIGN_OFF on the usage of >> non-standard signatures. >> >> An evaluation on v4.13..v5.8 showed that out of 539 warn

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

2020-12-02 Thread Aditya Srivastava
e standard signature equivalent for 'Co-authored-by' is 'Co-developed-by'. Provide a fix by suggesting users with this signature alternative and replacing. Signed-off-by: Aditya Srivastava --- scripts/checkpatch.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/s

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

2020-12-02 Thread Aditya Srivastava
signature equivalent for 'Co-authored-by' is 'Co-developed-by'. Provide a fix by suggesting users with this signature alternative and replacing. Signed-off-by: Aditya Srivastava --- scripts/checkpatch.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/checkpa

  1   2   3   4   5   >