[PATCH] staging: exfat: use bdev_sync function directly where needed

2019-10-02 Thread Saiyam Doshi
fs_sync() is wrapper to bdev_sync(). When fs_sync is called with non-zero argument, bdev_sync gets called. Most instances of fs_sync is called with false and very few with true. Refactor this and makes direct call to bdev_sync() where needed and removes fs_sync definition. Signed-off-by: Saiyam

Re: [v2 0/3] Fix issues reported by Coccinelle

2019-09-22 Thread Saiyam Doshi
On Tue, Sep 17, 2019 at 08:14:23PM +0200, Wolfram Sang wrote: > On Tue, Sep 17, 2019 at 08:10:45PM +0200, Markus Elfring wrote: > > > Using cocciecheck to ensure there are no semantic issues in > > > i2c-qup driver. > > > > * This wording contains a typo. > > Doesn't matter to me for a cover

Re: [PATCH] mmc: host: atmel-mci: assign false/true to bool variable

2019-09-22 Thread Saiyam Doshi
On Wed, Sep 18, 2019 at 08:01:12PM +0200, Alexandre Belloni wrote: > More useful than information than info on semantic patching, it would be > good to have info on why you feel this is necessary. Sure, will update the changelog and resend.

[PATCH] mmc: host: bcm2835: use devm_platform_ioremap_resource wrapper

2019-09-18 Thread Saiyam Doshi
-by: Saiyam Doshi --- drivers/mmc/host/bcm2835.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c index 148414d7f0c9..99f61fd2a658 100644 --- a/drivers/mmc/host/bcm2835.c +++ b/drivers/mmc/host/bcm2835.c @@ -1357,7 +1357,6

[PATCH] mmc: host: atmel-mci: assign false/true to bool variable

2019-09-18 Thread Saiyam Doshi
Signed-off-by: Saiyam Doshi --- drivers/mmc/host/atmel-mci.c | 50 ++-- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index c26fbe5f..91088b1712ae 100644 --- a/drivers/mmc/host/atmel-m

[PATCH v2 0/3] Fix issues reported by Coccinelle

2019-09-17 Thread Saiyam Doshi
/1163043/ Saiyam Doshi (3): i2c: qup: remove explicit conversion to boolean i2c: qup: Remove dev_err() log after platform_get_irq*() failure i2c: qup: Use devm_platform_ioremap_resource helper drivers/i2c/busses/i2c-qup.c | 22 -- 1 file changed, 8 insertions(+), 14 deletions

[PATCH v2 3/3] i2c: qup: Use devm_platform_ioremap_resource helper

2019-09-17 Thread Saiyam Doshi
Simplify the implementation by using a known wrapper function. Generated by: scripts/coccinelle/api/devm_platform_ioremap_resource.cocci Signed-off-by: Saiyam Doshi --- Changes in v2: * Updated changelog. drivers/i2c/busses/i2c-qup.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions

[PATCH v2 2/3] i2c: qup: Remove dev_err() log after platform_get_irq*() failure

2019-09-17 Thread Saiyam Doshi
The debug message after platform_get_irq() failure is redundant because platform_get_irq() already prints an error. Thus remove it. Generated by: scripts/coccinelle/api/platform_get_irq.cocci Signed-off-by: Saiyam Doshi --- Changes in v2: Updated changelog and removed unnecessary braces after

[PATCH v2 1/3] i2c: qup: remove explicit conversion to boolean

2019-09-17 Thread Saiyam Doshi
Relational and logical operators evaluate to bool, explicit conversion is overly verbose and unneeded. Generated by: scripts/coccinelle/misc/boolconv.cocci Signed-off-by: Saiyam Doshi --- Changes in v2: * Updated changelog drivers/i2c/busses/i2c-qup.c | 14 ++ 1 file changed, 6

[PATCH v2] Fix issues reported by Coccinelle

2019-09-17 Thread Saiyam Doshi
/1163043/ Saiyam Doshi (3): i2c: qup: remove explicit conversion to boolean i2c: qup: Remove dev_err() log after platform_get_irq*() failure i2c: qup: Use devm_platform_ioremap_resource helper drivers/i2c/busses/i2c-qup.c | 22 -- 1 file changed, 8 insertions(+), 14 deletions

Re: [3/3] i2c: qup: Use devm_platform_ioremap_resource helper

2019-09-17 Thread Saiyam Doshi
On Tue, Sep 17, 2019 at 05:40:14PM +0200, Markus Elfring wrote: > > Use devm_platform_ioremap_resource helper which wraps > > platform_get_resource() and devm_ioremap_resource() together. > > Can a wording like “Simplify this function implementation by using > a known wrapper function.” be nicer

Re: [PATCH 2/3] i2c: qup: Remove dev_err() log after platform_get_irq*() failure

2019-09-17 Thread Saiyam Doshi
On Tue, Sep 17, 2019 at 05:28:47PM +0200, Markus Elfring wrote: > > The semantic patch that makes this report is available > > in scripts/coccinelle/api/platform_get_irq.cocci. > > > > Found using - http://coccinelle.lip6.fr/ > > Can a tag like “Generated by:

Re: [1/3] i2c: qup: remove explicit conversion to boolean

2019-09-17 Thread Saiyam Doshi
On Tue, Sep 17, 2019 at 05:07:29PM +0200, Markus Elfring wrote: > > Found using - Coccinelle (http://coccinelle.lip6.fr) > > Can a tag like “Generated by: scripts/coccinelle/misc/boolconv.cocci” > be more helpful for this change description? Yes, will do. -Saiyam

[PATCH 3/3] i2c: qup: Use devm_platform_ioremap_resource helper

2019-09-16 Thread Saiyam Doshi
-by: Saiyam Doshi --- drivers/i2c/busses/i2c-qup.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c index 23c4893512b2..2d21168f81a0 100644 --- a/drivers/i2c/busses/i2c-qup.c +++ b/drivers/i2c/busses/i2c-qup.c @@ -1663,7

[PATCH 2/3] i2c: qup: Remove dev_err() log after platform_get_irq*() failure

2019-09-16 Thread Saiyam Doshi
-by: Saiyam Doshi --- drivers/i2c/busses/i2c-qup.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c index 5519c19bfd9c..23c4893512b2 100644 --- a/drivers/i2c/busses/i2c-qup.c +++ b/drivers/i2c/busses/i2c-qup.c @@ -1767,7 +1767,6 @@ static int

[PATCH 1/3] i2c: qup: remove explicit conversion to boolean

2019-09-16 Thread Saiyam Doshi
Relational and logical operators evaluate to bool, explicit conversion is overly verbose and unneeded. Found using - Coccinelle (http://coccinelle.lip6.fr) Signed-off-by: Saiyam Doshi --- drivers/i2c/busses/i2c-qup.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff

[PATCH 0/3] Fix issues reported by Coccinelle

2019-09-16 Thread Saiyam Doshi
Using cocciecheck to ensure there are no semantic issues in i2c-qup driver. Refer below links for more information. http://coccinelle.lip6.fr https://bottest.wiki.kernel.org/coccicheck Saiyam Doshi (3): i2c: qup: remove explicit conversion to boolean i2c: qup: Remove dev_err() log after

Re: omfs: make use of kmemdup

2019-09-16 Thread Saiyam Doshi
On Sat, Sep 14, 2019 at 08:24:37AM +0200, Markus Elfring wrote: > I suggest to take another look at a similar patch. > > fs/omfs: make use of kmemdup > https://lore.kernel.org/r/20190721112326.GA5927@hari-Inspiron-1545/ > https://lore.kernel.org/patchwork/patch/1102482/ >

[PATCH] ASoC: sdm845: remove unneeded semicolon

2019-09-13 Thread Saiyam Doshi
Remove excess semicolon after closing parenthesis. Signed-off-by: Saiyam Doshi --- sound/soc/qcom/sdm845.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/qcom/sdm845.c b/sound/soc/qcom/sdm845.c index 882f52ed8231..28f3cef696e6 100644 --- a/sound/soc/qcom/sdm845.c

[PATCH] omfs: make use of kmemdup

2019-09-13 Thread Saiyam Doshi
Replace call to kmalloc followed by memcpy with a direct call to kmemdup to achieve same functionality. Signed-off-by: Saiyam Doshi --- fs/omfs/inode.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/omfs/inode.c b/fs/omfs/inode.c index b76ec6b88ded..788b41096962

[PATCH] security: ima: make use of kmemdup

2019-09-13 Thread Saiyam Doshi
Replace call to kmalloc followed by memcpy with a direct call to kmemdup to achieve same functionality. Signed-off-by: Saiyam Doshi --- security/integrity/ima/ima_policy.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/security/integrity/ima/ima_policy.c b

[PATCH] staging: rtl8723bs: remove unneeded conversion to bool

2019-09-12 Thread Saiyam Doshi
Relational and logical operators evaluate to bool, explicit conversion is overly verbose and unneeded. This issue found using - Coccinelle (http://coccinelle.lip6.fr) Signed-off-by: Saiyam Doshi --- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 9 + 1 file changed, 5 insertions(+), 4

[PATCH] ASoC: wcd9335: remove redundant use of ret variable

2019-09-09 Thread Saiyam Doshi
All these functions declares and initializes variable ret with '0' and without modifying 'ret' variable, it is returned. This patch removes this redundancy and returns '0' directly. Signed-off-by: Saiyam Doshi --- sound/soc/codecs/wcd9335.c | 24 1 file changed, 8

[PATCH 1/1] staging: emxx_udc: remove local TRUE/FALSE definition

2019-09-08 Thread Saiyam Doshi
As the function argument and variables are defined as type 'bool', remove local TRUE/FALSE define and change usage of those macros with boolean value. Signed-off-by: Saiyam Doshi --- drivers/staging/emxx_udc/emxx_udc.c | 76 ++--- drivers/staging/emxx_udc/emxx_udc.h | 5

[PATCH] gpio: remove explicit comparison with 0

2019-09-07 Thread Saiyam Doshi
No need to compare return value with 0. In case of non-zero return value, the if condition will be true. This makes intent a bit more clear to the reader. "if (x) then", compared to "if (x is not zero) then". Signed-off-by: Saiyam Doshi --- drivers/gpio/gpiolib.c | 2 +

[PATCH v2] i2c: muxes: pca9541: use BIT() macro

2019-09-05 Thread Saiyam Doshi
Use bit mask macro BIT() for definition where appropriate. Signed-off-by: Saiyam Doshi --- Changes in v2: * Include linux/bits.h which defines BIT() drivers/i2c/muxes/i2c-mux-pca9541.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/drivers

Re: [PATCH] i2c: muxes: pca9541: use BIT() macro

2019-09-05 Thread Saiyam Doshi
On Thu, Sep 05, 2019 at 06:21:06AM -0700, Guenter Roeck wrote: > linux/bitops.h should be included when using BIT(). It's included from linux/i2c-mux.h and it compiled successfully. But if it's needed I'll update the patch and resend. Just a question - What is the best practice in such case?

[PATCH] i2c: muxes: pca9541: use BIT() macro

2019-09-05 Thread Saiyam Doshi
Use bit mask macro BIT() for definition where appropriate. Signed-off-by: Saiyam Doshi --- drivers/i2c/muxes/i2c-mux-pca9541.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/i2c/muxes/i2c-mux-pca9541.c b/drivers/i2c/muxes/i2c-mux

Re: [PATCH] gsmi: replace printk with relevant dev_

2019-06-14 Thread Saiyam Doshi
On Fri, Jun 14, 2019 at 08:09:19AM +0200, Greg KH wrote: > On Fri, Jun 14, 2019 at 12:27:05AM +0530, Saiyam Doshi wrote: > > Replace printk() with dev_* macros for logging consistency. > > In process of replacing printk with dev_err, dev_info etc., > > removed unnecessary

[PATCH] gsmi: replace printk with relevant dev_

2019-06-13 Thread Saiyam Doshi
Replace printk() with dev_* macros for logging consistency. In process of replacing printk with dev_err, dev_info etc., removed unnecessary "out of memory" debug message. This also fixes checkpatch.pl warnings. Signed-off-by: Saiyam Doshi --- drivers/firmware/google/g

[PATCH] gsmi: Replace printk with relevant pr_

2019-06-12 Thread Saiyam Doshi
>From 3a9cec48147b24fd9d793e0fdf20058461445646 Mon Sep 17 00:00:00 2001 From: Saiyam Doshi Date: Tue, 11 Jun 2019 19:21:50 +0530 Subject: [PATCH] gsmi: Replace printk with relevant pr_ Replace printk() with pr_* macros for logging consistency. This also helps avoid checkpatch warnings. Sig

Re: [PATCH 1/1] staging: android: Fixed coding style issues reported by checkpatch

2016-03-08 Thread Saiyam Doshi
rnel version from which the patch is created. >From fd6a8ba1030fdcfc1efca9b377cd0957580708dd Mon Sep 17 00:00:00 2001 From: Saiyam Doshi <saiyamdoshi...@gmail.com> Date: Wed, 9 Mar 2016 00:15:04 +0530 Subject: [PATCH 1/2] staging: android: Fixed coding style issue reported by checkpatch A

Re: [PATCH 1/1] staging: android: Fixed coding style issues reported by checkpatch

2016-03-08 Thread Saiyam Doshi
rnel version from which the patch is created. >From fd6a8ba1030fdcfc1efca9b377cd0957580708dd Mon Sep 17 00:00:00 2001 From: Saiyam Doshi Date: Wed, 9 Mar 2016 00:15:04 +0530 Subject: [PATCH 1/2] staging: android: Fixed coding style issue reported by checkpatch Alignment should match open pare

[PATCH 1/1] staging: android: Fixed coding style issues reported by checkpatch

2016-03-06 Thread Saiyam Doshi
comment for spinlock_t definition Signed-off-by: Saiyam Doshi <saiyamdoshi...@gmail.com> --- drivers/staging/android/lowmemorykiller.c | 2 ++ drivers/staging/android/sync.h| 10 ++ drivers/staging/android/sync_debug.c | 3 +-- drivers/staging/android/timed_gpio.c

[PATCH 1/1] staging: android: Fixed coding style issues reported by checkpatch

2016-03-06 Thread Saiyam Doshi
comment for spinlock_t definition Signed-off-by: Saiyam Doshi --- drivers/staging/android/lowmemorykiller.c | 2 ++ drivers/staging/android/sync.h| 10 ++ drivers/staging/android/sync_debug.c | 3 +-- drivers/staging/android/timed_gpio.c | 1 + 4 files changed, 6