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

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

2021-04-07 Thread Shreeya Patel
. 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 utf8mod

[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
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| 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
s 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/utf8-core.c | 4 +++- 1 file chan

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

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

2021-03-31 Thread Shreeya Patel
. 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

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

2021-03-31 Thread Shreeya Patel
into 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 funct

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

2021-03-31 Thread Shreeya Patel
s 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/utf8-core.c | 4 +++- 1 file chan

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

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

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

2021-03-29 Thread Shreeya Patel
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_UTF8

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

2021-03-29 Thread Shreeya Patel
as 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
s 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/utf8-core.c | 4 +++- 1 file chan

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

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

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

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

2021-03-24 Thread Shreeya Patel
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 succeeding

[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
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/super.c b

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

2021-03-24 Thread Shreeya Patel
s 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 v4 - Remove spaces between va

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

2021-03-24 Thread Shreeya Patel
lve 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: Ren

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

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

[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
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/super.c

[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() inst

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

2021-03-23 Thread Shreeya Patel
s 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 strscpy() returns value < 0 Chan

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/utf8mod.c:175:2: warning

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 msle

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 destination size [-Wstringop

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

[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
s 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 +- 1 file changed, 1 insertion

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

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-core.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-core.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-03 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
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): Staging: iio

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

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

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

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

[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
. 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 to rev

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

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

[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
this 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 index

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

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

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

2018-11-20 Thread Shreeya Patel
-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/adt7316.c

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

2018-11-20 Thread Shreeya Patel
-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/adt7316.c

[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 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 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 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
then there 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 1/5] Staging: iio: adt7316: Add of_device_id table

2018-11-20 Thread Shreeya Patel
then there 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
] 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 device

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

2018-11-20 Thread Shreeya Patel
] 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 device

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

2018-11-16 Thread Shreeya Patel
-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/adt7316.c

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

2018-11-16 Thread Shreeya Patel
-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/adt7316.c

  1   2   3   4   >