Re: [PATCH v7 4/4] fs: unicode: Add utf8 module and a unicode layer

2021-04-14 Thread Shreeya Patel
On 09/04/21 12:40 am, Gabriel Krisman Bertazi wrote: Shreeya Patel writes: utf8data.h_shipped has a large database table which is an auto-generated decodification trie for the unicode normalization functions. It is not necessary to load this large table in the kernel if no filesystem is

[PATCH v7 4/4] fs: unicode: Add utf8 module and a unicode layer

2021-04-07 Thread Shreeya Patel
calls. Signed-off-by: Shreeya Patel --- Changes in v7 - Update the help text in Kconfig - Handle the unicode_load_static_call function failure by decrementing the reference. - Correct the code for handling built-in utf8 option as well. - Correct the synchronization for accessing ut

[PATCH v7 3/4] fs: unicode: Rename utf8-core file to unicode-core

2021-04-07 Thread Shreeya Patel
encoding module. Rename the file name from utf8-core to unicode-core for transformation of utf8-core file into the unicode subsystem layer file and also for better understanding. Implementation for unicode-core file to act as layer will be added in the future patches. Signed-off-by: Shreeya Patel

[PATCH v7 2/4] fs: unicode: Rename function names from utf8 to unicode

2021-04-07 Thread Shreeya Patel
the unicode subsystem layer file. Signed-off-by: Shreeya Patel --- fs/ext4/hash.c | 2 +- fs/ext4/namei.c| 12 fs/ext4/super.c| 6 ++-- fs/f2fs/dir.c | 12 fs/f2fs/super.c| 6 ++-- fs/libfs.c | 6

[PATCH v7 1/4] fs: unicode: Use strscpy() instead of strncpy()

2021-04-07 Thread Shreeya Patel
ike strncpy(), strscpy() always null-terminates the destination string, hence use strscpy() instead of strncpy(). Fixes: 9d53690f0d4e5 (unicode: implement higher level API for string handling) Acked-by: Gabriel Krisman Bertazi Signed-off-by: Shreeya Patel Reported-by: kernel test robot --- fs/unicode/utf

[PATCH v7 0/4] Make UTF-8 encoding loadable

2021-04-07 Thread Shreeya Patel
ons inline. - Remove msleep and use try_module_get() and module_put() for ensuring that module is loaded correctly and also doesn't get unloaded while in use. - Resolve the warning reported by kernel test robot. - Resolve all the checkpatch.pl warnings. Shreeya Patel (4): fs:

[PATCH v6 4/4] fs: unicode: Add utf8 module and a unicode layer

2021-03-31 Thread Shreeya Patel
calls. Signed-off-by: Shreeya Patel --- Changes in v6 - Add spinlock to protect utf8mod and avoid NULL pointer dereference. - Change the static call function names for being consistent with kernel coding style. - Merge the unicode_load_module function with unicode_load as it is

[PATCH v6 2/4] fs: unicode: Rename function names from utf8 to unicode

2021-03-31 Thread Shreeya Patel
the unicode subsystem layer file. Signed-off-by: Shreeya Patel --- Changes in v6 - Improve the commit message fs/ext4/hash.c | 2 +- fs/ext4/namei.c| 12 fs/ext4/super.c| 6 ++-- fs/f2fs/dir.c | 12 fs/f2fs/super.c

[PATCH v6 3/4] fs: unicode: Rename utf8-core file to unicode-core

2021-03-31 Thread Shreeya Patel
encoding module. Rename the file name from utf8-core to unicode-core for transformation of utf8-core file into the unicode subsystem layer file and also for better understanding. Implementation for unicode-core file to act as layer will be added in the future patches. Signed-off-by: Shreeya Patel

[PATCH v6 0/4] Make UTF-8 encoding loadable

2021-03-31 Thread Shreeya Patel
put() for ensuring that module is loaded correctly and also doesn't get unloaded while in use. - Resolve the warning reported by kernel test robot. - Resolve all the checkpatch.pl warnings. Shreeya Patel (4): fs: unicode: Use strscpy() instead of strncpy() fs: unicode: Rename

[PATCH v6 1/4] fs: unicode: Use strscpy() instead of strncpy()

2021-03-31 Thread Shreeya Patel
ike strncpy(), strscpy() always null-terminates the destination string, hence use strscpy() instead of strncpy(). Fixes: 9d53690f0d4e5 (unicode: implement higher level API for string handling) Acked-by: Gabriel Krisman Bertazi Signed-off-by: Shreeya Patel Reported-by: kernel test robot --- fs/unicode/utf

Re: [PATCH v5 2/4] fs: unicode: Rename function names from utf8 to unicode

2021-03-30 Thread Shreeya Patel
On 30/03/21 7:23 am, Eric Biggers wrote: On Tue, Mar 30, 2021 at 02:12:38AM +0530, Shreeya Patel wrote: utf8data.h_shipped has a large database table which is an auto-generated decodification trie for the unicode normalization functions and it is not necessary to carry this large table in the

Re: [PATCH v5 4/4] fs: unicode: Add utf8 module and a unicode layer

2021-03-29 Thread Shreeya Patel
On 30/03/21 2:50 am, Gabriel Krisman Bertazi wrote: Shreeya Patel writes: utf8data.h_shipped has a large database table which is an auto-generated decodification trie for the unicode normalization functions. It is not necessary to load this large table in the kernel if no filesystem is

[PATCH v5 4/4] fs: unicode: Add utf8 module and a unicode layer

2021-03-29 Thread Shreeya Patel
se of repeated indirect calls. Static calls improves the performance by directly calling the functions as opposed to indirect calls. Signed-off-by: Shreeya Patel --- Changes in v5 - Rename global variables and default static call functions for better understanding - Make only config UNICODE

[PATCH v5 2/4] fs: unicode: Rename function names from utf8 to unicode

2021-03-29 Thread Shreeya Patel
the unicode subsystem layer functions and this will also be the first step towards the transformation of utf8-core file into the unicode subsystem layer file. Signed-off-by: Shreeya Patel --- Changes in v5 - Improve the commit message. fs/ext4/hash.c | 2 +- fs/ext4/namei.c

[PATCH v5 3/4] fs: unicode: Rename utf8-core file to unicode-core

2021-03-29 Thread Shreeya Patel
. Implementation for unicode-core file to act as layer will be added in the future patches. Signed-off-by: Shreeya Patel --- Changes in v5 - Improve the commit message. fs/unicode/Makefile| 2 +- fs/unicode/{utf8-core.c => unicode-core.c} | 0 2 files changed

[PATCH v5 1/4] fs: unicode: Use strscpy() instead of strncpy()

2021-03-29 Thread Shreeya Patel
ike strncpy(), strscpy() always null-terminates the destination string, hence use strscpy() instead of strncpy(). Fixes: 9d53690f0d4e5 (unicode: implement higher level API for string handling) Acked-by: Gabriel Krisman Bertazi Signed-off-by: Shreeya Patel Reported-by: kernel test robot --- fs/unicode/utf

[PATCH v5 0/4] Make UTF-8 encoding loadable

2021-03-29 Thread Shreeya Patel
ule is loaded correctly and also doesn't get unloaded while in use. - Resolve the warning reported by kernel test robot. - Resolve all the checkpatch.pl warnings. Shreeya Patel (4): fs: unicode: Use strscpy() instead of strncpy() fs: unicode: Rename function names from utf8 to unic

Re: [PATCH v4 5/5] fs: unicode: Add utf8 module and a unicode layer

2021-03-25 Thread Shreeya Patel
On 26/03/21 1:56 am, Shreeya Patel wrote: On 26/03/21 1:10 am, Eric Biggers wrote: On Thu, Mar 25, 2021 at 05:38:11AM +0530, Shreeya Patel wrote: Also, indirect calls using function pointers are easily exploitable by speculative execution attacks, hence use static_call() in unicode.h and

Re: [PATCH v4 5/5] fs: unicode: Add utf8 module and a unicode layer

2021-03-25 Thread Shreeya Patel
On 26/03/21 1:10 am, Eric Biggers wrote: On Thu, Mar 25, 2021 at 05:38:11AM +0530, Shreeya Patel wrote: Also, indirect calls using function pointers are easily exploitable by speculative execution attacks, hence use static_call() in unicode.h and unicode-core.c files inorder to prevent these

[PATCH v4 5/5] fs: unicode: Add utf8 module and a unicode layer

2021-03-24 Thread Shreeya Patel
e use static_call() in unicode.h and unicode-core.c files inorder to prevent these attacks by making direct calls and also to improve the performance of function pointers. Signed-off-by: Shreeya Patel --- Changes in v4 - Return error from the static calls instead of doing nothing and succe

[PATCH v4 4/5] fs: unicode: Rename utf8-core file to unicode-core

2021-03-24 Thread Shreeya Patel
Rename the file name from utf8-core to unicode-core for transformation of utf8-core file into the unicode subsystem layer file and also for better understanding. Acked-by: Gabriel Krisman Bertazi Signed-off-by: Shreeya Patel --- fs/unicode/Makefile| 2 +- fs/unicode

[PATCH v4 3/5] fs: unicode: Rename function names from utf8 to unicode

2021-03-24 Thread Shreeya Patel
Rename the function names from utf8 to unicode for taking the first step towards the transformation of utf8-core file into the unicode subsystem layer file. Reviewed-by: Gabriel Krisman Bertazi Signed-off-by: Shreeya Patel --- fs/ext4/hash.c | 2 +- fs/ext4/namei.c| 12

[PATCH v4 2/5] fs: Check if utf8 encoding is loaded before calling utf8_unload()

2021-03-24 Thread Shreeya Patel
add a condition which will check if sb->encoding is NOT NULL before calling the utf8_unload(). Reviewed-by: Gabriel Krisman Bertazi Signed-off-by: Shreeya Patel --- fs/ext4/super.c | 6 -- fs/f2fs/super.c | 9 ++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/fs/ext4/supe

[PATCH v4 1/5] fs: unicode: Use strscpy() instead of strncpy()

2021-03-24 Thread Shreeya Patel
ike strncpy(), strscpy() always null-terminates the destination string, hence use strscpy() instead of strncpy(). Fixes: 9d53690f0d4e5 (unicode: implement higher level API for string handling) Acked-by: Gabriel Krisman Bertazi Signed-off-by: Shreeya Patel Reported-by: kernel test robot --- Changes in v

[PATCH v4 0/5] Make UTF-8 encoding loadable

2021-03-24 Thread Shreeya Patel
olve the warning reported by kernel test robot. - Resolve all the checkpatch.pl warnings. Shreeya Patel (5): fs: unicode: Use strscpy() instead of strncpy() fs: Check if utf8 encoding is loaded before calling utf8_unload() fs: unicode: Rename function names from utf8 to unicode fs: unicode

Re: [PATCH v3 5/5] fs: unicode: Add utf8 module and a unicode layer

2021-03-23 Thread Shreeya Patel
On 24/03/21 1:59 am, Eric Biggers wrote: On Tue, Mar 23, 2021 at 03:51:44PM -0400, Gabriel Krisman Bertazi wrote: -int unicode_validate(const struct unicode_map *um, const struct qstr *str) -{ - const struct utf8data *data = utf8nfdi(um->version); - - if (utf8nlen(data, str->name,

Re: [PATCH v3 5/5] fs: unicode: Add utf8 module and a unicode layer

2021-03-23 Thread Shreeya Patel
On 24/03/21 1:21 am, Gabriel Krisman Bertazi wrote: Shreeya Patel writes: utf8data.h_shipped has a large database table which is an auto-generated decodification trie for the unicode normalization functions. It is not necessary to load this large table in the kernel if no file system is

Re: [PATCH v2 4/4] fs: unicode: Add utf8 module and a unicode layer

2021-03-23 Thread Shreeya Patel
On 19/03/21 2:35 am, Eric Biggers wrote: On Thu, Mar 18, 2021 at 07:03:05PM +0530, Shreeya Patel wrote: +struct unicode_ops { + struct module *owner; + int (*validate)(const struct unicode_map *um, const struct qstr *str); + int (*strncmp)(const struct unicode_map *um, const

[PATCH v3 4/5] fs: unicode: Rename utf8-core file to unicode-core

2021-03-23 Thread Shreeya Patel
Rename the file name from utf8-core to unicode-core for transformation of utf8-core file into the unicode subsystem layer file and also for better understanding. Signed-off-by: Shreeya Patel --- fs/unicode/Makefile| 2 +- fs/unicode/{utf8-core.c => unicode-core.c} | 0

[PATCH v3 5/5] fs: unicode: Add utf8 module and a unicode layer

2021-03-23 Thread Shreeya Patel
e use static_call() in unicode.h and unicode-core.c files inorder to prevent these attacks by making direct calls and also to improve the performance of function pointers. Signed-off-by: Shreeya Patel --- Changes in v3 - Correct the conditions to prevent NULL pointer dereference while acce

[PATCH v3 3/5] fs: unicode: Rename function names from utf8 to unicode

2021-03-23 Thread Shreeya Patel
Rename the function names from utf8 to unicode for taking the first step towards the transformation of utf8-core file into the unicode subsystem layer file. Signed-off-by: Shreeya Patel --- fs/ext4/hash.c | 2 +- fs/ext4/namei.c| 12 fs/ext4/super.c

[PATCH v3 2/5] fs: Check if utf8 encoding is loaded before calling utf8_unload()

2021-03-23 Thread Shreeya Patel
add a condition which will check if sb->encoding is NOT NULL before calling the utf8_unload(). Signed-off-by: Shreeya Patel --- Changes in v3 - Add this patch to the series which checks if utf8 encoding was loaded before calling uft8_unload(). fs/ext4/super.c | 6 -- fs/f2fs/sup

[PATCH v3 0/4] Make UTF-8 encoding loadable

2021-03-23 Thread Shreeya Patel
ove msleep and use try_module_get() and module_put() for ensuring that module is loaded correctly and also doesn't get unloaded while in use. - Resolve the warning reported by kernel test robot. - Resolve all the checkpatch.pl warnings. Shreeya Patel (4): fs: unicode: Use strscpy() in

[PATCH v3 1/5] fs: unicode: Use strscpy() instead of strncpy()

2021-03-23 Thread Shreeya Patel
ike strncpy(), strscpy() always null-terminates the destination string, hence use strscpy() instead of strncpy(). Fixes: 9d53690f0d4e5 (unicode: implement higher level API for string handling) Signed-off-by: Shreeya Patel Reported-by: kernel test robot --- Changes in v3 - Return error if strscp

Re: [PATCH v2 3/4] fs: unicode: Use strscpy() instead of strncpy()

2021-03-19 Thread Shreeya Patel
On 19/03/21 2:33 am, Eric Biggers wrote: On Thu, Mar 18, 2021 at 07:03:04PM +0530, Shreeya Patel wrote: Following warning was reported by Kernel Test Robot. In function 'utf8_parse_version', inlined from 'utf8_load' at fs/unicode/utf8mod.c:195:7: fs/unicode/utf8

Re: [PATCH v2 4/4] fs: unicode: Add utf8 module and a unicode layer

2021-03-19 Thread Shreeya Patel
as a layer for unicode subsystem. It will load the UTF-8 module and access it's functions whenever any filesystem that needs unicode is mounted. Signed-off-by: Shreeya Patel --- Changes in v2 - Remove the duplicate file utf8-core.c - Make the wrapper functions inline. - Remove

Re: [PATCH v2 3/4] fs: unicode: Use strscpy() instead of strncpy()

2021-03-18 Thread Shreeya Patel
On 18/03/21 7:03 pm, Shreeya Patel wrote: Following warning was reported by Kernel Test Robot. In function 'utf8_parse_version', inlined from 'utf8_load' at fs/unicode/utf8mod.c:195:7: fs/unicode/utf8mod.c:175:2: warning: 'strncpy' specified bound 12 equals

[PATCH v2 4/4] fs: unicode: Add utf8 module and a unicode layer

2021-03-18 Thread Shreeya Patel
-core which will act as a layer for unicode subsystem. It will load the UTF-8 module and access it's functions whenever any filesystem that needs unicode is mounted. Signed-off-by: Shreeya Patel --- Changes in v2 - Remove the duplicate file utf8-core.c - Make the wrapper functions i

[PATCH v2 2/4] fs: unicode: Rename utf8-core file to unicode-core

2021-03-18 Thread Shreeya Patel
Rename the file name from utf8-core to unicode-core for transformation of utf8-core file into the unicode subsystem layer file and also for better understanding. Signed-off-by: Shreeya Patel --- fs/unicode/Makefile| 2 +- fs/unicode/{utf8-core.c => unicode-core.c} | 0

[PATCH v2 3/4] fs: unicode: Use strscpy() instead of strncpy()

2021-03-18 Thread Shreeya Patel
ike strncpy(), strscpy() always null-terminates the destination string, hence use strscpy() instead of strncpy(). Signed-off-by: Shreeya Patel Reported-by: kernel test robot --- Changes in v2 - Resolve warning of -Wstringop-truncation reported by kernel test robot. fs/unicode/unicode-core.c | 2 +

[PATCH v2 1/4] fs: unicode: Rename function names from utf8 to unicode

2021-03-18 Thread Shreeya Patel
Rename the function names from utf8 to unicode for taking the first step towards the transformation of utf8-core file into the unicode subsystem layer file. Signed-off-by: Shreeya Patel --- fs/ext4/hash.c | 2 +- fs/ext4/namei.c| 12 fs/ext4/super.c

[PATCH v2 0/4] Make UTF-8 encoding loadable

2021-03-18 Thread Shreeya Patel
msleep and use try_module_get() and module_put() for ensuring that module is loaded correctly and also doesn't get unloaded while in use. - Resolve the warning reported by kernel test robot. - Resolve all the checkpatch.pl warnings. Shreeya Patel (4): fs: unicode: Rename function

Re: [PATCH 3/3] fs: unicode: Add utf8 module and a unicode layer

2021-03-14 Thread Shreeya Patel
On 14/03/21 7:19 am, Gabriel Krisman Bertazi wrote: Shreeya Patel writes: utf8data.h_shipped has a large database table which is an auto-generated decodification trie for the unicode normalization functions. It is not necessary to carry this large table in the kernel hence make UTF-8

[PATCH 3/3] fs: unicode: Add utf8 module and a unicode layer

2021-03-13 Thread Shreeya Patel
-core which will act as a layer for unicode subsystem. It will load the UTF-8 module and access it's functions whenever any filesystem that needs unicode is mounted. Signed-off-by: Shreeya Patel --- fs/unicode/Kconfig| 7 +- fs/unicode/Makefile | 5 +- fs/unicode/unicode-c

[PATCH 3/3] fs: unicode: Make UTF-8 encoding loadable

2021-03-13 Thread Shreeya Patel
-core which will act as a layer for unicode subsystem. It will load the UTF-8 module and access it's functions whenever any filesystem that needs unicode is mounted. Signed-off-by: Shreeya Patel --- fs/unicode/Kconfig| 7 +- fs/unicode/Makefile | 5 +- fs/unicode/unicode-c

[PATCH 2/3] fs: unicode: Rename utf8-core file to unicode-core

2021-03-13 Thread Shreeya Patel
Rename the file name from utf8-core to unicode-core for transformation of utf8-core file into the unicode subsystem layer file and also for better understanding. Signed-off-by: Shreeya Patel --- fs/unicode/Makefile| 2 +- fs/unicode/{utf8-core.c => unicode-core.c} | 0

[PATCH 1/3] fs: unicode: Rename function names from utf8 to unicode

2021-03-13 Thread Shreeya Patel
Rename the function names from utf8 to unicode for taking the first step towards the transformation of utf8-core file into the unicode subsystem layer file. Signed-off-by: Shreeya Patel --- fs/ext4/hash.c | 2 +- fs/ext4/namei.c| 12 fs/ext4/super.c

[PATCH 0/3] Make UTF-8 encoding loadable

2021-03-13 Thread Shreeya Patel
understanding the difference between UTF-8 module and unicode layer. Last patch in the series adds the layer and utf8 module. Shreeya Patel (3): fs: unicode: Rename function names from utf8 to unicode fs: unicode: Rename utf8-core file to unicode-core fs: unicode: Add utf8 module and a unicode layer

Re: [PATCH 5.2 00/61] 5.2.1-stable review

2019-07-13 Thread Shreeya Patel
On Fri, 2019-07-12 at 14:19 +0200, Greg Kroah-Hartman wrote: > This is the start of the stable review cycle for the 5.2.1 release. > There are 61 patches in this series, all will be posted as a response > to this one. If anyone has any issues with these being applied, > please > let me know. > >

Re: [PATCH 5.1 00/55] 5.1.16-stable review

2019-07-02 Thread Shreeya Patel
On Tue, 2019-07-02 at 10:01 +0200, Greg Kroah-Hartman wrote: > This is the start of the stable review cycle for the 5.1.16 release. > There are 55 patches in this series, all will be posted as a response > to this one. If anyone has any issues with these being applied, > please > let me know. > >

[PATCH v4 0/3] adt7316 regmap implementation

2019-01-26 Thread Shreeya Patel
ainst greg's testing branch. Changes in v3 -Fetch the changes from remote and rebase to have it in the current working directory. Changes in v2 -Change the val_bits to 8 and add two more patches having a different change before the final implemetation of regmap. Shreeya Patel (3): St

[PATCH v4 2/3] Staging: iio: adt7316: Remove multi read and write functions

2019-01-26 Thread Shreeya Patel
Currently, adt7316 doesn't use multi read and multi write functions hence remove the redundant code and make the necessary changes in the code. Signed-off-by: Shreeya Patel --- drivers/staging/iio/addac/adt7316-i2c.c | 40 - drivers/staging/iio/addac/adt7316-spi.c

[PATCH v4 3/3] Staging: iio: adt7316: Add regmap support

2019-01-26 Thread Shreeya Patel
Both i2c and spi drivers have functions for reading and writing to/from registers. Remove this redundant and common code by using regmap API. Signed-off-by: Shreeya Patel --- drivers/staging/iio/addac/adt7316-i2c.c | 56 +++--- drivers/staging/iio/addac/adt7316-spi.c | 74

[PATCH v4 1/3] Staging: iio: adt7316: Remove irq from bus structure

2019-01-26 Thread Shreeya Patel
interrupt request is not needed to be present in the bus structure. It is a good option to pass it as a parameter in the probe function instead of having it in the bus structure. Signed-off-by: Shreeya Patel --- drivers/staging/iio/addac/adt7316-i2c.c | 3 +-- drivers/staging/iio/addac/adt7316

Re: [PATCH v3 0/3] adt7316 regmap implementation

2019-01-25 Thread Shreeya Patel
On Sat, 2019-01-26 at 10:42 +0530, Shreeya Patel wrote: > On Fri, 2019-01-25 at 18:22 -0700, Jeremy Fertic wrote: > > On Sun, Jan 20, 2019 at 09:06:30PM +0530, Shreeya Patel wrote: > > > This patchset consist of some initial patches for heading > > > towards the regmap

Re: [PATCH v3 0/3] adt7316 regmap implementation

2019-01-25 Thread Shreeya Patel
On Fri, 2019-01-25 at 18:22 -0700, Jeremy Fertic wrote: > On Sun, Jan 20, 2019 at 09:06:30PM +0530, Shreeya Patel wrote: > > This patchset consist of some initial patches for heading > > towards the regmap implementation and also the final patch > > which enables the driver t

[PATCH v3 2/3] Staging: iio: adt7316: Remove multi read and write functions

2019-01-20 Thread Shreeya Patel
Currently, adt7316 doesn't use multi read and multi write functions hence remove the redundant code and make the necessary changes in the code. Signed-off-by: Shreeya Patel --- drivers/staging/iio/addac/adt7316-i2c.c | 40 - drivers/staging/iio/addac/adt7316-spi.c

[PATCH v3 1/3] Staging: iio: adt7316: Remove irq from bus structure

2019-01-20 Thread Shreeya Patel
interrupt request is not needed to be present in the bus structure. It is a good option to pass it as a parameter in the probe function instead of having it in the bus structure. Signed-off-by: Shreeya Patel --- drivers/staging/iio/addac/adt7316-i2c.c | 3 +-- drivers/staging/iio/addac/adt7316

[PATCH v3 0/3] adt7316 regmap implementation

2019-01-20 Thread Shreeya Patel
directory. Changes in v2 -Change the val_bits to 8 and add two more patches having a different change before the final implemetation of regmap. Shreeya Patel (3): Staging: iio: adt7316: Remove irq from bus structure Staging: iio: adt7316: Remove multi read and write functions Staging: iio

[PATCH v3 3/3] Staging: iio: adt7316: Add regmap support

2019-01-20 Thread Shreeya Patel
Both i2c and spi drivers have functions for reading and writing to/from registers. Remove this redundant and common code by using regmap API. Signed-off-by: Shreeya Patel --- drivers/staging/iio/addac/adt7316-i2c.c | 56 +++--- drivers/staging/iio/addac/adt7316-spi.c | 74

Re: [PATCH v2 0/3] adt7316 regmap implementation

2019-01-19 Thread Shreeya Patel
On Sat, 2019-01-19 at 19:04 +, Jonathan Cameron wrote: > On Sun, 20 Jan 2019 00:09:29 +0530 > Shreeya Patel wrote: > > > This patchset consist of some initial patches for heading > > towards the regmap implementation and also the final patch > > which enables t

[PATCH v2 3/3] Staging: iio: adt7316: Add regmap support

2019-01-19 Thread Shreeya Patel
Both i2c and spi drivers have functions for reading and writing to/from registers. Remove this redundant and common code by using regmap API. Signed-off-by: Shreeya Patel --- drivers/staging/iio/addac/adt7316-i2c.c | 60 +++ drivers/staging/iio/addac/adt7316-spi.c | 74

[PATCH v2 2/3] Staging: iio: adt7316: Remove multi read and write functions

2019-01-19 Thread Shreeya Patel
Currently, adt7316 doesn't use multi read and multi write functions hence remove the redundant code and make the necessary changes in the code. Signed-off-by: Shreeya Patel --- drivers/staging/iio/addac/adt7316-i2c.c | 40 - drivers/staging/iio/addac/adt7316-spi.c

[PATCH v2 0/3] adt7316 regmap implementation

2019-01-19 Thread Shreeya Patel
This patchset consist of some initial patches for heading towards the regmap implementation and also the final patch which enables the driver to use regmap API thus removing the redundant and common code. Shreeya Patel (3): Staging: iio: adt7316: Remove irq from bus structure Staging: iio

[PATCH v2 1/3] Staging: iio: adt7316: Remove irq from bus structure

2019-01-19 Thread Shreeya Patel
interrupt request is not needed to be present in the bus structure. It is a good option to pass it as a parameter in the probe function instead of having it in the bus structure. Signed-off-by: Shreeya Patel --- drivers/staging/iio/addac/adt7316-i2c.c | 3 +-- drivers/staging/iio/addac/adt7316

[PATCH] Staging: iio: adt7316: Add regmap support

2018-12-23 Thread Shreeya Patel
Both i2c and spi drivers have functions for reading and writing to/from registers. Remove this redundant and common code by using regmap API. Also remove multi_read and multi_write functions from i2c and spi driver as they are not being used anywhere. Signed-off-by: Shreeya Patel --- drivers

[PATCH v4] Staging: iio: adt7316: Add all irq related code in adt7316_irq_setup()

2018-12-13 Thread Shreeya Patel
e i.e. irq_type = IRQF_TRIGGER_LOW Move devm_request_threaded_irq() and assignment of chip->config1 into the adt7316_setup_irq() to unclutter the code in probe function. Signed-off-by: Shreeya Patel --- Changes in v4 - Merge patches *[1/3 v3], *[2/3 v3] and *[3/3 v3] to make it less complex t

Re: [PATCH v3 2/3] Staging: iio: adt7316: Move interrupt related code

2018-12-08 Thread Shreeya Patel
On Sat, 2018-12-08 at 16:12 +, Jonathan Cameron wrote: > On Sat, 8 Dec 2018 20:46:37 +0530 > Shreeya Patel wrote: > > > There is a function adt7316_irq_setup() where irq_type is being > > set. It would be good to move devm_request_threaded_irq() function > > and

Re: [PATCH] Revert "Staging: iio: adt7316: Add an extra check for 'ret' equals to 0"

2018-12-08 Thread Shreeya Patel
On Sat, 2018-12-08 at 11:17 +, Jonathan Cameron wrote: > On Sat, 08 Dec 2018 00:07:21 +0530 > Shreeya Patel wrote: > > > On Thu, 2018-12-06 at 15:40 +0300, Dan Carpenter wrote: > > > On Wed, Dec 05, 2018 at 02:59:53PM -0700, Jeremy Fertic wrote: > > > >

[PATCH v3 3/3] Staging: iio: adt7316: Add a dev_err() message

2018-12-08 Thread Shreeya Patel
Add a dev_err() message "failed to request irq" for describing what went wrong when an error contition is statisfied. Signed-off-by: Shreeya Patel --- drivers/staging/iio/addac/adt7316.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/staging/iio/addac

[PATCH v3 0/3] Remove platform data and introduce DT bindings

2018-12-08 Thread Shreeya Patel
about the error. Shreeya Patel (3): Staging: iio: adt7316: Use device tree data to assign irq_type Staging: iio: adt7316: Move interrupt related code Staging: iio: adt7316: Add a dev_err() message drivers/staging/iio/addac/adt7316.c | 52 + 1 file changed, 38

[PATCH v3 2/3] Staging: iio: adt7316: Move interrupt related code

2018-12-08 Thread Shreeya Patel
There is a function adt7316_irq_setup() where irq_type is being set. It would be good to move devm_request_threaded_irq() function and assignment of chip->config1 in adt7316_irq_setup() to unclutter the code in probe function. Signed-off-by: Shreeya Patel --- drivers/staging/iio/addac/adt731

[PATCH v3 1/3] Staging: iio: adt7316: Use device tree data to assign irq_type

2018-12-08 Thread Shreeya Patel
is is implemented in a new function called adt7316_setup_irq. Signed-off-by: Shreeya Patel --- drivers/staging/iio/addac/adt7316.c | 29 + 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c

Re: [PATCH] Revert "Staging: iio: adt7316: Add an extra check for 'ret' equals to 0"

2018-12-07 Thread Shreeya Patel
On Thu, 2018-12-06 at 15:40 +0300, Dan Carpenter wrote: > On Wed, Dec 05, 2018 at 02:59:53PM -0700, Jeremy Fertic wrote: > > On Thu, Dec 06, 2018 at 01:25:55AM +0530, Shreeya Patel wrote: > > > On Tue, 2018-12-04 at 18:49 -0700, Jeremy Fertic wrote: > >

Re: [PATCH] Revert "Staging: iio: adt7316: Add an extra check for 'ret' equals to 0"

2018-12-05 Thread Shreeya Patel
On Tue, 2018-12-04 at 18:49 -0700, Jeremy Fertic wrote: > This reverts commit 00426e99789357dbff7e719a092ce36a3ce49d94. > > i2c_smbus_read_byte() returns 0 when a byte with the value 0 is read > from > the device. This is a valid read so revert the check for 0. > > Signed-off-by: Jeremy Fertic >

Re: [PATCH v2 5/5] Staging: iio: adt7316: Use device tree data to assign irq_type

2018-11-21 Thread Shreeya Patel
On Wed, 2018-11-21 at 08:21 +, Ardelean, Alexandru wrote: > On Tue, 2018-11-20 at 22:30 +0530, Shreeya Patel wrote: > > ADT7316 driver no more uses platform data and hence use device tree > > data instead of platform data for assigning irq_type field. > > Switch case fi

[PATCH v2 5/5] Staging: iio: adt7316: Use device tree data to assign irq_type

2018-11-20 Thread Shreeya Patel
ff-by: Shreeya Patel --- drivers/staging/iio/addac/adt7316.c | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c index 9c72538baf9e..c647875a64f5 100644 --- a/drivers/staging/iio/addac/adt7

[PATCH v2 4/5] Staging: iio: adt7316: Change the name from irq_flags to irq_type

2018-11-20 Thread Shreeya Patel
Most of the drivers in IIO uses irq_type as the name for storing the interrupt type and hence change the name from irq_flags to irq_type for maintaining the consistency. Signed-off-by: Shreeya Patel --- drivers/staging/iio/addac/adt7316.c | 8 1 file changed, 4 insertions(+), 4

[PATCH v2 3/5] Staging: iio: adt7316: Switch irq_flags to a local variable

2018-11-20 Thread Shreeya Patel
There is no need to store irq_flags into the structure as it is always set to the same thing. Hence switch irq_flags to a local variable. Signed-off-by: Shreeya Patel --- drivers/staging/iio/addac/adt7316-i2c.c | 1 - drivers/staging/iio/addac/adt7316-spi.c | 1 - drivers/staging/iio/addac

[PATCH v2 2/5] Staging: iio: adt7316: Use device tree data to set ldac_pin

2018-11-20 Thread Shreeya Patel
Make the driver use device tree instead of the platform data. Hence, use devm_gpiod_get_optional function to get the data from device tree for ldac-pin and accordingly make the needed changes in the driver. Signed-off-by: Shreeya Patel --- drivers/staging/iio/addac/adt7316.c | 14

[PATCH v2 1/5] Staging: iio: adt7316: Add of_device_id table

2018-11-20 Thread Shreeya Patel
should be a fall back path with which desired kernel modules can be loaded. Hence, add of_device_id table in the i2c driver to be able to use when there is no dt table. Signed-off-by: Shreeya Patel --- Changes in v2: - Make the commit message appropriate and assign of_match_table in the driver

[PATCH v2 0/5] Remove platform data and introduce DT bindings

2018-11-20 Thread Shreeya Patel
*[1/5] appropriate. Shreeya Patel (5): Staging: iio: adt7316: Add of_device_id table Staging: iio: adt7316: Use device tree data to set ldac_pin Staging: iio: adt7316: Switch irq_flags to a local variable Staging: iio: adt7316: Change the name from irq_flags to irq_type Staging: iio: adt7316: Use d

[PATCH 7/7] Staging: iio: adt7316: Use device tree data to assign irq_type

2018-11-16 Thread Shreeya Patel
ff-by: Shreeya Patel --- drivers/staging/iio/addac/adt7316.c | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c index 9c72538baf9e..c647875a64f5 100644 --- a/drivers/staging/iio/addac/adt7

[PATCH 6/7] Staging: iio: adt7316: Change the name from irq_flags to irq_type

2018-11-16 Thread Shreeya Patel
Most of the drivers in IIO uses irq_type as the name for storing the interrupt type and hence change the name from irq_flags to irq_type for maintaining the consistency. Signed-off-by: Shreeya Patel --- drivers/staging/iio/addac/adt7316.c | 8 1 file changed, 4 insertions(+), 4

[PATCH 5/7] Staging: iio: adt7316: Switch irq_flags to a local variable

2018-11-16 Thread Shreeya Patel
There is no need to store irq_flags into the structure as it is always set to the same thing. Hence switch irq_flags to a local variable. Signed-off-by: Shreeya Patel --- drivers/staging/iio/addac/adt7316-i2c.c | 1 - drivers/staging/iio/addac/adt7316-spi.c | 1 - drivers/staging/iio/addac

[PATCH 4/7] Staging: iio: adt7316: Use device tree data to set ldac_pin

2018-11-16 Thread Shreeya Patel
Make the driver use device tree instead of the platform data. Hence, use devm_gpiod_get_optional function to get the data from device tree for ldac-pin and accordingly make the needed changes in the driver. Signed-off-by: Shreeya Patel --- drivers/staging/iio/addac/adt7316.c | 14

[PATCH 3/7] Staging: iio: adt7316: Add of_device_id table

2018-11-16 Thread Shreeya Patel
ADT7316, add of_device_id table which specifies the supported devices through compatible property. Note that there is a fall back path in i2c that will result in i2c_device_id table being used if there is no of_devcie_id table. Signed-off-by: Shreeya Patel --- drivers/staging/iio/addac/adt7316-i2c.c

[PATCH 2/7] Staging: iio: adt7316: Add an extra check for 'ret' equals to 0

2018-11-16 Thread Shreeya Patel
ret = 0 indicates a case of no error but no data read from the bus which is an invalid case. This case doesn't ever happen in reality. It should perhaps be handled for correctness though. Signed-off-by: Shreeya Patel --- drivers/staging/iio/addac/adt7316-i2c.c | 4 1 file chang

[PATCH 1/7] Staging: iio: adt7316: Set the data field

2018-11-16 Thread Shreeya Patel
adt7316_i2c_read function nowhere sets the data field. It is necessary to have an appropriate value for it. Hence, assign the value stored in 'ret' variable to data field. Signed-off-by: Shreeya Patel --- drivers/staging/iio/addac/adt7316-i2c.c | 2 ++ 1 file changed, 2 insertion

[PATCH 0/7] Remove platform data and introduce DT bindings

2018-11-16 Thread Shreeya Patel
This patchset introduces device tree bindings for adt7316 driver and removes the usage of platform data from it. Also, it sets the data field to it's appropriate value in the i2c read function which was nowhere being set before. Shreeya Patel (7): Staging: iio: adt7316: Set the data

Re: [PATCH] staging: iio: adt7316: Switch to the gpio descriptor interface

2018-10-22 Thread Shreeya Patel
On Mon, 2018-10-22 at 22:44 +0530, Nishad Kamdar wrote: > Use the gpiod interface instead of the deprecated old non-descriptor > interface for ldac_pin. > > Signed-off-by: Nishad Kamdar > --- Hi Nishad, I have been working on implementing device tree bindings for this driver and removing platfo

Re: [PATCH] Staging iio/adc: fixes parenthesis alignment

2018-10-17 Thread Shreeya Patel
On Tue, 2018-10-16 at 13:01 -0300, Marcelo Schmitt wrote: > Fixes close parenthesis alignment to match open parenthesis at > iio/drivers/staging/iio/adc/ad7606.c line 379. > > Signed-of-by: Marcelo Schmitt Hi Marcelo, Some suggestions from my side 1) Your subject line should look like "Sta

[PATCH] Staging: lustre: Use kmemdup() instead of kzalloc and memcpy

2018-06-17 Thread Shreeya Patel
,flag); if (to==NULL || ...) S - memcpy(to, from, size); Signed-off-by: Shreeya Patel --- drivers/staging/lustre/lnet/lnet/api-ni.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lnet/lnet/api-ni.c b/drivers/staging/lustre/lnet/lnet/api-ni.c

[PATCH v6 6/6] Staging: iio: adis16209: Move adis16209 driver out of staging

2018-03-29 Thread Shreeya Patel
Move the adis16209 driver out of staging directory and merge to the mainline IIO subsystem. Signed-off-by: Shreeya Patel --- Changes in v6 -Move driver adis16209 from staging to mainline IIO subsystem after complete cleanup of it. drivers/iio/accel/Kconfig | 12 ++ drivers/iio

[PATCH v6 5/6] Staging: iio: adis16209: Use GENMASK

2018-03-29 Thread Shreeya Patel
Use GENMASK to improve readability and remove the local variables used to store intermediate data. Signed-off-by: Shreeya Patel --- Changes in v6 -Introduce this new patch in the series. drivers/staging/iio/accel/adis16209.c | 19 --- 1 file changed, 8 insertions(+), 11

[PATCH v6 4/6] Staging: iio: adis16209: Remove unused headers

2018-03-29 Thread Shreeya Patel
Remove few unused header files since the adis core handles the sysfs and buffer support. Signed-off-by: Shreeya Patel --- Changes in v6 -Introduce this new patch in the series. drivers/staging/iio/accel/adis16209.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/iio

[PATCH v6 3/6] Staging: iio: adis16209: Add a blank line after return statements

2018-03-29 Thread Shreeya Patel
Add a blank line after return statements to improve the code readability. Signed-off-by: Shreeya Patel --- Changes in v6 -Introduce this new patch in the series. drivers/staging/iio/accel/adis16209.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/iio/accel/adis16209.c

[PATCH v6 2/6] Staging: iio: adis16209: Prefer reverse christmas tree ordering

2018-03-29 Thread Shreeya Patel
Prefer reverse christmas tree ordering of declarations to improve readability. Signed-off-by: Shreeya Patel --- Changes in v6 -Introduce this new patch in the series. drivers/staging/iio/accel/adis16209.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH v6 1/6] Staging: iio: adis16209: Indent the field definitions

2018-03-29 Thread Shreeya Patel
Have indentation in field definitions to make them clearly different from the register addresses. Signed-off-by: Shreeya Patel --- Changes in v5 -Change some macro names and have indentation in the field definitions. Changes in v6 -Have indentation in the field definitions and do not

  1   2   >