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. >>

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: [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

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.,

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

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

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. >&

Re: [PATCH v2] checkpatch: add fix option for MISSING_SIGN_OFF

2020-11-17 Thread Aditya
On 11/11/20 9:20 pm, Joe Perches wrote: > On Wed, 2020-11-11 at 16:39 +0530, Aditya wrote: >> On 11/11/20 4:00 pm, Lukas Bulwahn wrote: >>> On Wed, Nov 11, 2020 at 10:01 AM Aditya Srivastava >>> wrote: >>>> >>>> Currently checkpatch warns us if

Re: [PATCH v3] checkpatch: add fix option for ASSIGNMENT_CONTINUATIONS

2020-11-20 Thread Aditya
On 17/11/20 10:48 pm, Aditya Srivastava wrote: > Currently, checkpatch warns us if an assignment operator is placed > at the start of a line and not at the end of previous line. > > E.g., running checkpatch on commit 8195b1396ec8 ("hv_netvsc: fix > deadlock on hotplug&q

Re: [PATCH v3] checkpatch: add fix option for MISSING_SIGN_OFF

2020-11-30 Thread Aditya
On 30/11/20 2:45 pm, Aditya Srivastava wrote: > Currently checkpatch warns us if there is no 'Signed-off-by' line for > the patch. > > E.g., running checkpatch on commit 9ac060a708e0 ("leaking_addresses: > Completely remove --version flag") reports this error

Re: [PATCH v4] checkpatch: add fix and improve warning msg for Non-standard signature

2020-11-23 Thread Aditya
On 23/11/20 11:03 pm, Joe Perches wrote: > On Mon, 2020-11-23 at 22:54 +0530, Aditya Srivastava wrote: >> Currently, checkpatch.pl warns for BAD_SIGN_OFF on non-standard signature >> styles. > > I think this proposed change is unnecessary. > >> This warning occu

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 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

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] 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

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

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: [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: [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

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 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

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: [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

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 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

Re: [PATCH v7] checkpatch: add fix option for LOGICAL_CONTINUATIONS

2020-11-29 Thread Aditya
On 23/11/20 3:58 pm, Aditya Srivastava wrote: > Currently, checkpatch warns if logical continuations are placed at the > start of a line and not at the end of previous line. > > E.g., running checkpatch on commit 3485507fc272 ("staging: > bcm2835-camera: Reduce length of

Re: [PATCH v3] checkpatch: add fix option for ASSIGNMENT_CONTINUATIONS

2020-11-20 Thread Aditya
On 20/11/20 10:56 pm, Joe Perches wrote: > On Fri, 2020-11-20 at 16:11 +0530, Aditya wrote: >> On 17/11/20 10:48 pm, Aditya Srivastava wrote: >>> Currently, checkpatch warns us if an assignment operator is placed >>> at the start of a line and not at the end of previous

Re: [PATCH v3] checkpatch: add fix option for ASSIGNMENT_CONTINUATIONS

2020-11-21 Thread Aditya
On 20/11/20 11:32 pm, Aditya wrote: > On 20/11/20 10:56 pm, Joe Perches wrote: >> On Fri, 2020-11-20 at 16:11 +0530, Aditya wrote: >>> On 17/11/20 10:48 pm, Aditya Srivastava wrote: >>>> Currently, checkpatch warns us if an assignment operator is placed >>>

Re: [PATCH] checkpatch: fix false positive for REPEATED_WORD warning

2020-10-21 Thread Aditya
raw fields are to be be extracted WARNING:REPEATED_WORD: Possible repeated word: 'add' #21: Let's also add add a note about using only the l3 access without l4 Apart from these, it works as expected. It also takes into account the cases for multiple occurrences of hex, as you mentioned. For eg. WARNING:REPEATED_WORD: Possible repeated word: '' #15: 0x0040: These cases were getting missed with my approach. Also, it is able to detect warnings for hex sequences which are occurring less than 4 times(frequency 2), for eg, WARNING:REPEATED_WORD: Possible repeated word: 'ff' #38: Code: ff ff 48 (...) I'll try to combine both methods and come up with a better approach. Aditya

Re: [PATCH] checkpatch: fix false positive for REPEATED_WORD warning

2020-10-21 Thread Aditya
On 21/10/20 11:35 pm, Joe Perches wrote: > On Wed, 2020-10-21 at 23:25 +0530, Aditya wrote: >> Thanks for your feedback. I ran a manual check using this approach >> over v5.6..v5.8. >> The negatives occurring with this approach are for the word 'be' >> (Freque

Re: [PATCH] checkpatch: fix false positive for REPEATED_WORD warning

2020-10-21 Thread Aditya
On 21/10/20 8:48 pm, Joe Perches wrote: > On Wed, 2020-10-21 at 20:31 +0530, Aditya Srivastava wrote: >> Presence of hexadecimal address or symbol results in false warning >> message by checkpatch.pl. >> >> For example, running checkpatch on commit b8ad540dd4e4 (&q

Re: [PATCH] checkpatch: fix false positive for REPEATED_WORD warning

2020-10-22 Thread Aditya
On 22/10/20 12:42 am, Lukas Bulwahn wrote: > On Wed, Oct 21, 2020 at 8:25 PM Aditya wrote: >> >> On 21/10/20 11:35 pm, Joe Perches wrote: >>> On Wed, 2020-10-21 at 23:25 +0530, Aditya wrote: >>>> Thanks for your feedback. I ran a manual check using this app

Re: [PATCH v2] checkpatch: fix false positives in REPEATED_WORD warning

2020-10-22 Thread Aditya
On 22/10/20 8:20 pm, Aditya Srivastava wrote: > Presence of hexadecimal address or symbol results in false warning > message by checkpatch.pl. > > For example, running checkpatch on commit b8ad540dd4e4 ("mptcp: fix > memory leak in mptcp_subflow_create_socket()&

Re: [PATCH v2] checkpatch: fix false positives in REPEATED_WORD warning

2020-10-22 Thread Aditya
On 22/10/20 9:40 pm, Joe Perches wrote: > On Thu, 2020-10-22 at 20:20 +0530, Aditya Srivastava wrote: >> Presence of hexadecimal address or symbol results in false warning >> message by checkpatch.pl. > [] >> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl >

Re: [PATCH v2] checkpatch: fix false positives in REPEATED_WORD warning

2020-10-22 Thread Aditya
On 23/10/20 1:03 am, Joe Perches wrote: > On Fri, 2020-10-23 at 00:44 +0530, Aditya wrote: >> On 22/10/20 9:40 pm, Joe Perches wrote: >>> On Thu, 2020-10-22 at 20:20 +0530, Aditya Srivastava wrote: >>>> Presence of hexadecimal address or symbol results in

Re: [PATCH v2] checkpatch: fix false positives in REPEATED_WORD warning

2020-10-22 Thread Aditya
On 23/10/20 4:16 am, Joe Perches wrote: > On Fri, 2020-10-23 at 02:35 +0530, Aditya wrote: >> On 23/10/20 1:03 am, Joe Perches wrote: >>> On Fri, 2020-10-23 at 00:44 +0530, Aditya wrote: >>>> On 22/10/20 9:40 pm, Joe Perches wrote: >>>>> On Thu, 2020-

Re: [PATCH v2] checkpatch: fix false positives in REPEATED_WORD warning

2020-10-22 Thread Aditya
On 23/10/20 12:03 pm, Aditya wrote: > However, though such cases haven't occurred over v6..v8. > > Actually, we could simplify it more on the basis of occurrences in > v6..v8, for eg. if we check for /[0-9c-f][0-9a-f]+/ (instead of > /[0-9a-f]{2,}/), it gives us desired res

Re: [PATCH v4] checkpatch: fix false positives in REPEATED_WORD warning

2020-10-23 Thread Aditya
On 24/10/20 5:38 am, Aditya Srivastava wrote: > Presence of hexadecimal address or symbol results in false warning > message by checkpatch.pl. > > For example, running checkpatch on commit b8ad540dd4e4 ("mptcp: fix > memory leak in mptcp_subflow_create_socket()&

Re: [PATCH v4] checkpatch: fix false positives in REPEATED_WORD warning

2020-10-24 Thread Aditya
On 24/10/20 7:07 am, Joe Perches wrote: > On Sat, 2020-10-24 at 05:38 +0530, Aditya Srivastava wrote: >> A quick evaluation on v5.6..v5.8 showed that this fix reduces >> REPEATED_WORD warnings from 2797 to 907. > > How many of these 907 remaining are still false positive?

Re: [PATCH v3] checkpatch: fix false positives in REPEATED_WORD warning

2020-10-24 Thread Aditya
On 24/10/20 12:36 am, Lukas Bulwahn wrote: > > > On Fri, 23 Oct 2020, Aditya Srivastava wrote: > >> Presence of hexadecimal address or symbol results in false warning >> message by checkpatch.pl. >> > > I think this strategy now makes sense and has the right

Re: [PATCH v3] checkpatch: fix false positives in REPEATED_WORD warning

2020-10-24 Thread Aditya
On 24/10/20 9:03 pm, Joe Perches wrote: > On Sat, 2020-10-24 at 18:54 +0530, Aditya wrote: >>> Would you like to work on >>> further rules that can be improved with your evaluation approach? >> >> Yes, I would like work on further rules. > > Some generic

Re: [PATCH v3] checkpatch: fix false positives in REPEATED_WORD warning

2020-10-25 Thread Aditya
information from the patches to see > the complaints, false positives to address or suggestions which rules > should be disabled for some subcommunities. > > Aditya, your task is now to make those ideas more specific and write down > a one to two page project proposal for the mentor

Re: [PATCH v2] checkpatch: add fix option for MISSING_SIGN_OFF

2020-11-11 Thread Aditya
On 11/11/20 4:00 pm, Lukas Bulwahn wrote: > On Wed, Nov 11, 2020 at 10:01 AM Aditya Srivastava > wrote: >> >> Currently checkpatch warns us if there is no 'Signed-off-by' line >> for the patch. >> >> E.g., running checkpatch on commit 9ac060a7

Re: [PATCH v3] checkpatch: add fix option for MAINTAINERS_STYLE

2020-11-17 Thread Aditya
On 17/11/20 3:51 pm, Lukas Bulwahn wrote: > On Tue, Nov 17, 2020 at 5:29 AM Joe Perches wrote: >> >> On Mon, 2020-11-16 at 20:26 -0800, Joe Perches wrote: >>> On Tue, 2020-11-17 at 09:35 +0530, Aditya Srivastava wrote: >>>> Checkpatch expects entries in MAIN

Re: [PATCH] checkpatch: add fix for BAD_SIGN_OFF

2020-11-08 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

[RFC] vfs: avoid sb->s_umount lock while changing bind-mount flags

2013-09-16 Thread Aditya Kali
so that changing of flags can happen outside the down_write(&sb->s_umount). I wanted to get comments if I am violating any assumption around this code. Another thing that I was curious about was if we need the {lock|unlock}_mount(path) around this code. Please advise. Signed-off-by: Aditya

Re: [RFC] vfs: avoid sb->s_umount lock while changing bind-mount flags

2013-09-19 Thread Aditya Kali
On 09/16/2013 07:40 PM, Al Viro wrote: On Mon, Sep 16, 2013 at 10:42:30AM -0700, Aditya Kali wrote: During remount of a bind mount (mount -o remount,bind,ro,... /mnt/mntpt), we currently take down_write(&sb->s_umount). This causes the remount operation to get blocked behind writes occu

Re: [RFC] vfs: avoid sb->s_umount lock while changing bind-mount flags

2013-09-30 Thread Aditya Kali
Hi Al and other fs-developers, Please let me know what you think about this patch. Thanks, -- Aditya On Thu, Sep 19, 2013 at 1:13 PM, Aditya Kali wrote: > > > On 09/16/2013 07:40 PM, Al Viro wrote: >> >> On Mon, Sep 16, 2013 at 10:42:30AM -0700, Aditya Kali wrote: >&g

Re: [RFC] vfs: avoid sb->s_umount lock while changing bind-mount flags

2013-09-30 Thread Aditya Kali
+Ted Ts'o, Tejun Heo, Jens Axboe On 09/30/2013 10:54 AM, Aditya Kali wrote: Hi Al and other fs-developers, Please let me know what you think about this patch. Thanks, > On Thu, Sep 19, 2013 at 1:13 PM, Aditya Kali wrote: >> >> >> On 09/16/2013 07:40 PM, Al Viro

Re: [RFC] vfs: avoid sb->s_umount lock while changing bind-mount flags

2013-09-30 Thread Aditya Kali
On Mon, Sep 30, 2013 at 1:03 PM, Al Viro wrote: > On Mon, Sep 30, 2013 at 11:13:23AM -0700, Aditya Kali wrote: >> +Ted Ts'o, Tejun Heo, Jens Axboe >> >> >> On 09/30/2013 10:54 AM, Aditya Kali wrote: >> >Hi Al and other fs-developers, >> > >

[PATCH 1/1] [PATCH v3.10-rc2 1/1] linux: kernel.h: Fixed coding style error

2013-05-25 Thread Aditya Srivastava
Fixed coding style errors found in /include/linux/kernel.h Signed-off-by: Aditya Srivastava --- include/linux/kernel.h | 44 ++-- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/include/linux/kernel.h b/include/linux/kernel.h index

Re: linux-next: build failure after merge of the ext4 tree

2012-07-09 Thread Aditya Kali
Sorry for the trouble. The following patch should fix the build. From: Aditya Kali Date: Mon, 9 Jul 2012 18:42:28 -0700 Subject: [PATCH] ext4: Fix compilation error for ext4_enable_quotas ext4_enable_quotas should only be called under CONFIG_QUOTA block. Signed-off-by: Aditya Kali --- fs

[PATCH RESEND 2/2] gpio: mvebu: Allow to use non-default PWM counter

2018-08-05 Thread Aditya Prayoga
one would use default counter (counter B), second one would try to use counter A, and the third one would use counter B. Signed-off-by: Aditya Prayoga --- drivers/gpio/gpio-mvebu.c | 58 +-- 1 file changed, 56 insertions(+), 2 deletions(-) diff --git a

[PATCH RESEND 1/2] gpio: mvebu: Add support for multiple PWM lines per GPIO chip

2018-08-05 Thread Aditya Prayoga
Allow more than 1 PWM request (eg. PWM fan) on the same GPIO chip. based on initial work on LK4.4 by Alban Browaeys. URL: https://github.com/helios-4/linux-marvell/commit/743ae97 [Aditya Prayoga: forward port, cleanup] Signed-off-by: Aditya Prayoga --- drivers/gpio/gpio-mvebu.c | 63

[PATCH RESEND 0/2] gpio: mvebu: Add support for multiple PWM lines

2018-08-05 Thread Aditya Prayoga
Hi everyone, Helios4, an Armada 388 based NAS SBC, provides 2 (4-pins) fan connectors. The PWM pins on both connector are connected to GPIO on bank 1. Current gpio- mvebu does not allow more than one PWM on the same bank. Resend the patch to add more reviewer. Aditya --- Aditya Prayoga (2

Re: [PATCH RESEND 1/2] gpio: mvebu: Add support for multiple PWM lines per GPIO chip

2018-08-08 Thread Aditya Prayoga
On Mon, Aug 6, 2018 at 10:38 AM Andrew Lunn wrote: > > On Mon, Aug 06, 2018 at 10:29:15AM +0800, Aditya Prayoga wrote: > > Hi Aditya > > > + item = kzalloc(sizeof(*item), GFP_KERNEL); > > + if (!item) > > + return -ENODEV; > > ENOME

Re: [PATCH RESEND 2/2] gpio: mvebu: Allow to use non-default PWM counter

2018-08-08 Thread Aditya Prayoga
On Mon, Aug 6, 2018 at 8:53 PM Andrew Lunn wrote: > > On Mon, Aug 06, 2018 at 10:29:16AM +0800, Aditya Prayoga wrote: > > On multiple PWM lines, if the other PWM counter is unused, allocate it > > to next PWM request. The priority would be: > > 1. Default counter as

[PATCH 0/2] gpio: mvebu: Add support for multiple PWM lines

2018-07-20 Thread Aditya Prayoga
Hi everyone, Helios4, an Armada 388 based NAS SBC, provides 2 (4-pins) fan connectors. The PWM pins on both connector are connected to GPIO on bank 1. Current gpio- mvebu does not allow more than one PWM on the same bank. Aditya --- Aditya Prayoga (2): gpio: mvebu: Add support for multiple

[PATCH 2/2] gpio: mvebu: Allow to use non-default PWM counter

2018-07-20 Thread Aditya Prayoga
one would use default counter (counter B), second one would try to use counter A, and the third one would use counter B. Signed-off-by: Aditya Prayoga --- drivers/gpio/gpio-mvebu.c | 58 +-- 1 file changed, 56 insertions(+), 2 deletions(-) diff --git a

[PATCH 1/2] gpio: mvebu: Add support for multiple PWM lines per GPIO chip

2018-07-20 Thread Aditya Prayoga
Allow more than 1 PWM request (eg. PWM fan) on the same GPIO chip. based on initial work on LK4.4 by Alban Browaeys. URL: https://github.com/helios-4/linux-marvell/commit/743ae97 [Aditya Prayoga: forward port, cleanup] Signed-off-by: Aditya Prayoga --- drivers/gpio/gpio-mvebu.c | 63

[PATCH] ASoC: rt5663: Fix error handling of device_property_read_u32_array

2019-01-05 Thread Aditya Pakki
In rt5663_parse_dp, the function device_property_read_u32_array() can return an error. This fix adds a check to the latter as well as to the callsite of rt5663_parse_dp in rt5663_i2c_probe. Signed-off-by: Aditya Pakki --- sound/soc/codecs/rt5663.c | 9 ++--- 1 file changed, 6 insertions

[PATCH] Staging: rts5208: Fix error handling on rtsx_send_cmd

2019-01-05 Thread Aditya Pakki
In sd_execute_write_data, the rtsx_send_cmd could fail with ETIMEDOUT or EIO. The fix adds a check to handle these failures. Signed-off-by: Aditya Pakki --- drivers/staging/rts5208/sd.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rts5208/sd.c b

[PATCH] [v2] netfilter: ipset: fix a missing check of nla_parse

2019-01-05 Thread Aditya Pakki
When nla_parse fails, we should not use the results (the first argument). The fix checks if it fails, and if so, returns its error code upstream. Signed-off-by: Aditya Pakki --- net/netfilter/ipset/ip_set_core.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/net

[PATCH] [V2] usb: chipidea: add a check for the availability of next child

2019-01-05 Thread Aditya Pakki
of_get_next_available_child returns NULL when no child nodes are found. The fix checks its return value instead of assuming a child is found. Signed-off-by: Aditya Pakki --- drivers/usb/chipidea/ci_hdrc_msm.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/usb/chipidea

[PATCH] [V2] infiniband: fix a missing check of nla_put

2019-01-05 Thread Aditya Pakki
nla_put() may fail. The fix adds a check for its return value, and returns -EMSGSIZE if it fails, post canceling netlink msg. Signed-off-by: Aditya Pakki --- drivers/infiniband/core/addr.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/infiniband/core/addr.c b

[PATCH] [v2]RDMA: add checks for the status of nla_put in ib_nl_send_msg

2019-01-05 Thread Aditya Pakki
The fix inserts multiple checks for nla_put, and changes the return type of ib_nl_set_path_rec_attrs() from void to int Signed-off-by: Aditya Pakki --- drivers/infiniband/core/sa_query.c | 56 -- 1 file changed, 38 insertions(+), 18 deletions(-) diff --git a/drivers

[PATCH] v2 bakclight: fix missing checks in ambient_light_zone_store

2019-01-05 Thread Aditya Pakki
In adp8870_bl_ambient_light_zone_store, set, clear, and write can return an error but are not checked. The fix adds a check for these cases and returns -1 to match the return type (ssize_t). Signed-off-by: Aditya Pakki --- drivers/video/backlight/adp8870_bl.c | 16 +--- 1 file

[PATCH] v2 pm: clk: fix a missing check of clk_prepare

2019-01-05 Thread Aditya Pakki
clk_prepare() could fail, so let's check its status, and if it fails, issue an error message and change the clock_entry_status to PCE_STATUS_ERROR Signed-off-by: Aditya Pakki --- drivers/base/power/clock_ops.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --

[PATCH] v2 staging: rtl8723bs: Clean up dead code

2019-01-06 Thread Aditya Pakki
rtw_wps_start() is part of dead code due to CONFIG_INTEL_WIDI. The fix removes the deadcode and replaces the function with NULL in rtw_private_handler. Identified as part of copy_from_user bug. Signed-off-by: Aditya Pakki --- .../staging/rtl8723bs/os_dep/ioctl_linux.c| 34

[PATCH] [v2] ALSA: ice1712: fix a missing check of snd_i2c_sendbytes

2019-01-06 Thread Aditya Pakki
snd_i2c_sendbytes could fail. The fix checks its return value: if it fails, issues an error message and returns with its error code. Signed-off-by: Aditya Pakki --- sound/pci/ice1712/ews.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sound/pci/ice1712/ews.c b/sound

[PATCH] [v2] ALSA: line6: fix check on snd_card_register

2019-01-06 Thread Aditya Pakki
The fix checks if snd_card_register() fails, and if so logs the error via dev_err() consistent with other patches. Signed-off-by: Aditya Pakki --- sound/usb/line6/pod.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/usb/line6/pod.c b/sound/usb/line6/pod.c index

[PATCH] [v2] ALSA: isa: fix a missing check of snd_ctl_add

2019-01-06 Thread Aditya Pakki
snd_ctl_add() could fail, so let's check its return value and return its error code upstream upon failure. Signed-off-by: Aditya Pakki --- sound/isa/sb/sb16_main.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sound/isa/sb/sb16_main.c b/sound/isa/sb/sb16_m

[PATCH] [v2] hwrng: core: Fix missing check during driver release

2019-01-06 Thread Aditya Pakki
devres_release can return -ENOENT if the device is not freed. The fix throws a warning consistent with other invocations. Signed-off-by: Aditya Pakki --- drivers/char/hw_random/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/char/hw_random/core.c b/drivers

[PATCH] [v2] Input: touchscreen: Fix a missing check on regmap_bulk_read

2019-01-06 Thread Aditya Pakki
regmap_bulk_read() can return a non zero value on failure. The fix checks if the function call succeeded before calling mod_timer. The issue was identified by a static analysis tool. Signed-off-by: Aditya Pakki --- drivers/input/touchscreen/ad7879.c | 11 +++ 1 file changed, 7

[PATCH] [v3] staging: rtl8723bs: Clean up dead code

2019-01-07 Thread Aditya Pakki
ever, maintainers identified the patch fixing the issue is not required as function rts_wps_start() is dead code and can be removed. Signed-off-by: Aditya Pakki --- .../staging/rtl8723bs/os_dep/ioctl_linux.c| 34 +-- 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/dri

[PATCH] rtl8723bs/ioctl_linux: Add a security check to copy_from_user()

2018-12-23 Thread Aditya Pakki
Currently, the return value of copy_from_user is not checked. extra is assigned to u32wps_start irrespective of these failures. Signed-off-by: Aditya Pakki --- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH] net/netlink_compat: Fix a missing check of nla_parse_nested

2018-12-23 Thread Aditya Pakki
In tipc_nl_compat_sk_dump(), if nla_parse_nested() fails, it could return an error. To be consistent with other invocations of the function call, on error, the fix passes the return value upstream. Signed-off-by: Aditya Pakki --- net/tipc/netlink_compat.c | 7 +-- 1 file changed, 5

[PATCH] net/net_namespace: Check the return value of register_pernet_subsys()

2018-12-23 Thread Aditya Pakki
In net_ns_init(), register_pernet_subsys() could fail while registering network namespace subsystems. The fix checks the return value and sends a panic() on failure. Signed-off-by: Aditya Pakki --- net/core/net_namespace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a

[PATCH] media/lgdt3306a: Add a missing return value check.

2018-12-24 Thread Aditya Pakki
In lgdt3306a.c, lgdt3306a_read_signal_strength() can fail while reading the registers via lgdt3306a_read_reg(). The function can return an error from i2c_transfer(). The fix checks the return value for this failure. Signed-off-by: Aditya Pakki --- drivers/media/dvb-frontends/lgdt3306a.c | 5

[PATCH] rts5208: Add a check on the status of ms_send_cmd

2018-12-24 Thread Aditya Pakki
In mspro_stop_seq_mode(), ms_send_cmd() may fail. The patch attempts to detect a failure before flushing the registers via rtsx_write_register. Signed-off-by: Aditya Pakki --- drivers/staging/rts5208/ms.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging

[PATCH] ipv6/route: Add a missing check on proc_dointvec

2018-12-24 Thread Aditya Pakki
While flushing the cache via ipv6_sysctl_rtcache_flush(), the call to proc_dointvec() may fail. The fix adds a check that returns the error, on failure. Signed-off-by: Aditya Pakki --- net/ipv6/route.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/net/ipv6/route.c b

[PATCH] x86/intel-mid: Add pr_warn when platform_device_add() fails

2018-12-24 Thread Aditya Pakki
platform_device_add() may fail in intel_scu_devices_create and sfi_handle_ipc_dev. The fix checks for the return value in these cases and displays the failed device. Signed-off-by: Aditya Pakki --- arch/x86/platform/intel-mid/sfi.c | 16 1 file changed, 12 insertions(+), 4

[PATCH] slimbus: Add a check on the return value of platform_device_add

2018-12-24 Thread Aditya Pakki
In of_qcom_slim_ngd_register, the function platform_device_add() may fail. The fix returns the error value upstream in case of failure. Signed-off-by: Aditya Pakki --- drivers/slimbus/qcom-ngd-ctrl.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/slimbus/qcom

[PATCH] misc/ics932s401: Add a missing check to i2c_smbus_read_word_data

2018-12-24 Thread Aditya Pakki
ics932s401_update_device may fail reading in i2c_smbus_read_word_data due to error in i2c_smbus_xfer. The fix checks the status and defaults the register to 0. Signed-off-by: Aditya Pakki --- drivers/misc/ics932s401.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/misc/ics932s401

[PATCH] dma/mv_xor: Fix a missing check in mv_xor_channel_add

2018-12-24 Thread Aditya Pakki
dma_async_device_register() may fail and return an error. The capabilities checked in mv_xor_channel_add() are not complete. The fix handles the error by freeing the resources. Signed-off-by: Aditya Pakki --- drivers/dma/mv_xor.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff

[PATCH] batman-adv/main: Fix check on return value of rtnl_link_register

2018-12-24 Thread Aditya Pakki
rtnl_link_register() may fail and can impact registering the device. The fix checks the return value and pushes the error upstream. Signed-off-by: Aditya Pakki --- net/batman-adv/main.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/batman-adv/main.c b/net/batman

[PATCH] infiniband/qedr: Potential null ptr dereference of qp

2018-12-24 Thread Aditya Pakki
idr_find() may fail and return a NULL pointer. The fix checks the return value of the function and returns an error in case of NULL. Signed-off-by: Aditya Pakki --- drivers/infiniband/hw/qedr/qedr_iw_cm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/infiniband/hw/qedr

[PATCH] input/touchscreen: Fix a missing check on regmap_bulk_read

2018-12-24 Thread Aditya Pakki
regmap_bulk_read() can return a non zero value on failure. The fix checks if the function call succeeded before calling mod_timer. Signed-off-by: Aditya Pakki --- drivers/input/touchscreen/ad7879.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/input

[PATCH] clk: Fix a missing check on regmap_bulk_read

2018-12-24 Thread Aditya Pakki
Currently, vc5_pll_recalc_rate() may produce incorrect output when regmap_bulk_read() fails. The fix checks the return value of the latter function and returns 0 in case of failure. Signed-off-by: Aditya Pakki --- drivers/clk/clk-versaclock5.c | 3 ++- 1 file changed, 2 insertions(+), 1

[PATCH] net: chelsio: Add a missing check on cudg_get_buffer

2018-12-24 Thread Aditya Pakki
cudbg_collect_hw_sched() could fail when the function cudg_get_buffer() returns an error. The fix adds a check to the latter function returning error on failure Signed-off-by: Aditya Pakki --- drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c | 4 1 file changed, 4 insertions(+) diff --git a

[PATCH] hid: Add checks to fix of_led_classdev_register

2018-12-24 Thread Aditya Pakki
In lenovo_probe_tpkbd(), the function of_led_classdev_register() could return an error value that is unchecked. The fix adds these checks. Signed-off-by: Aditya Pakki --- drivers/hid/hid-lenovo.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/hid/hid

[PATCH] platform: x86: Add check for led_classdev_register

2018-12-24 Thread Aditya Pakki
In function alienware_zone_init, the function led_classdev_register can return an error on failure. The fix checks the error and frees the allocated resources. Signed-off-by: Aditya Pakki --- drivers/platform/x86/alienware-wmi.c | 13 - 1 file changed, 12 insertions(+), 1 deletion

[PATCH] char: hw_random: Fix missing check during driver release

2018-12-26 Thread Aditya Pakki
devres_release can return -ENOENT if the device is not freed. The fix throws a warning consistent with other invocations. Signed-off-by: Aditya Pakki --- drivers/char/hw_random/core.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/char/hw_random/core.c b

[PATCH] net:phy: Add a return value check on bus write

2018-12-26 Thread Aditya Pakki
xgmiitorgmii_read_status() could fail when writing to the bus via mdiobus_write(). The fix adds a check and returns an error in case of failure. Signed-off-by: Aditya Pakki --- drivers/net/phy/xilinx_gmii2rgmii.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net

[PATCH] net: phy: phy: check return value of bus write

2018-12-26 Thread Aditya Pakki
phy_mii_ioctl() could fail when writing to the bus via mdiobus_write(). The fix adds a check and returns an error in case of failure. Signed-off-by: Aditya Pakki --- drivers/net/phy/phy.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/phy.c b/drivers

[PATCH] hmm: Warn on devres_release failure

2018-12-26 Thread Aditya Pakki
devres_release can return -ENOENT if the device is not freed. The fix throws a warning consistent with other invocations. Signed-off-by: Aditya Pakki --- mm/hmm.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mm/hmm.c b/mm/hmm.c index 90c34f3d1243..b06e3f092fbf

[PATCH] infiniband: bnxt_re: qplib: Check the return value of send_message

2018-12-26 Thread Aditya Pakki
In bnxt_qplib_map_tc2cos(), bnxt_qplib_rcfw_send_message() can return an error value. The fix returns the error from the latter function upstream. Signed-off-by: Aditya Pakki --- drivers/infiniband/hw/bnxt_re/qplib_sp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a

[PATCH] mm: compaction.c: Propagate return value upstream

2018-12-26 Thread Aditya Pakki
In sysctl_extfrag_handler(), proc_dointvec_minmax() can return an error. The fix propagates the error upstream in case of failure. Signed-off-by: Aditya Pakki --- mm/compaction.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/compaction.c b/mm/compaction.c index

[PATCH] mm: compaction.c: Propagate return value upstream

2018-12-26 Thread Aditya Pakki
In sysctl_extfrag_handler(), proc_dointvec_minmax() can return an error. The fix propagates the error upstream in case of failure. Signed-off-by: Aditya Pakki --- mm/compaction.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mm/compaction.c b/mm/compaction.c index

[PATCH] media: dvb: add return value check on Write16

2018-12-27 Thread Aditya Pakki
Write16 can return an error code -1 when the i2c_write fails. The fix checks for these failures and returns the error upstream Signed-off-by: Aditya Pakki --- drivers/media/dvb-frontends/drxd_hard.c | 30 - 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a

  1   2   3   4   5   >