Re: [PATCH] staging: gasket: Use octal permissions instead of symbolic.

2018-11-07 Thread Rohit Sarkar
On Tue, Nov 06, 2018 at 09:12:45PM +0100, Greg KH wrote: > On Tue, Nov 06, 2018 at 04:33:47PM +0530, Rohit Sarkar wrote: > > Replace S_IRUGO with 0444. Issue found by checkpatch. > > > > Signed-off-by: Rohit Sarkar > > --- > > drivers/staging/gasket/gasket_sys

[PATCH] staging: pi433: Fix typo in documentation

2019-09-05 Thread Rohit Sarkar
Fixes a typo in the documentation. Signed-off-by: Rohit Sarkar --- drivers/staging/pi433/Documentation/pi433.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/pi433/Documentation/pi433.txt b/drivers/staging/pi433/Documentation/pi433.txt index 21cffdb86ecf

Re: [PATCH] staging: vhciq_core: replace snprintf with scnprintf

2019-09-11 Thread Rohit Sarkar
On Wed, Sep 11, 2019 at 08:24:22PM +0300, Dan Carpenter wrote: > On Wed, Sep 11, 2019 at 08:33:00PM +0530, Rohit Sarkar wrote: > > There are a lot of usages of "snprintf" throughout the staging > > directory (315 to be exact) > > Would it be worthwhile to find one

Re: [PATCH] staging: rtl8712: Replace snprintf with scnprintf

2019-09-10 Thread Rohit Sarkar
Resending as I made a typo in Larry's email id. On Wed, Sep 11, 2019 at 12:19:31AM +0530, Rohit Sarkar wrote: > When the number of bytes to be printed exceeds the limit snprintf > returns the number of bytes that would have been printed (if there was > no truncation). This might cau

[PATCH] staging: rtl8712: Replace snprintf with scnprintf

2019-09-10 Thread Rohit Sarkar
When the number of bytes to be printed exceeds the limit snprintf returns the number of bytes that would have been printed (if there was no truncation). This might cause issues, hence use scnprintf which returns the actual number of bytes printed to buffer always. Signed-off-by: Rohit Sarkar

[PATCH] staging: rtl8192u: ieee80211: Replace snprintf with scnprintf

2019-09-10 Thread Rohit Sarkar
When the number of bytes to be printed exceeds the limit snprintf returns the number of bytes that would have been printed (if there was no truncation). This might cause issues, hence use scnprintf which returns the actual number of bytes printed to buffer always. Signed-off-by: Rohit Sarkar

Re: [PATCH] staging: iio: ADIS16240: Remove unused include

2019-09-15 Thread Rohit Sarkar
On Sun, Sep 15, 2019 at 10:53:00AM +0100, Jonathan Cameron wrote: > On Sat, 14 Sep 2019 02:06:27 +0530 > Rohit Sarkar wrote: > > > Bcc: > > Subject: [PATCH] staging: iio: adis16240: remove unused include > > Reply-To: > Something odd happened here with pa

[PATCH] staging: iio: ADIS16240: Remove unused include

2019-09-13 Thread Rohit Sarkar
Bcc: Subject: [PATCH] staging: iio: adis16240: remove unused include Reply-To: '#include' isn't being used anywhere. Remove it. Signed-off-by: Rohit Sarkar --- drivers/staging/iio/accel/adis16240.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/iio/accel/adis16240.c b

Re: [PATCH] staging: vhciq_core: replace snprintf with scnprintf

2019-09-11 Thread Rohit Sarkar
On Wed, Sep 11, 2019 at 04:17:25PM +0200, Stefan Wahren wrote: > Hi Rohit, > > On 11.09.19 15:51, Rohit Sarkar wrote: > > When the number of bytes to be printed exceeds the limit snprintf > > returns the number of bytes that would have been printed (if there was > >

[PATCH] staging: vhciq_core: replace snprintf with scnprintf

2019-09-11 Thread Rohit Sarkar
When the number of bytes to be printed exceeds the limit snprintf returns the number of bytes that would have been printed (if there was no truncation). This might cause issues, hence use scnprintf which returns the actual number of bytes printed to buffer always Signed-off-by: Rohit Sarkar

Re: [PATCH] staging: vhciq_core: replace snprintf with scnprintf

2019-09-11 Thread Rohit Sarkar
On Wed, Sep 11, 2019 at 05:46:12PM +0300, Dan Carpenter wrote: > On Wed, Sep 11, 2019 at 07:55:43PM +0530, Rohit Sarkar wrote: > > On Wed, Sep 11, 2019 at 04:17:25PM +0200, Stefan Wahren wrote: > > > Hi Rohit, > > > > > > On 11.09.19 15:51, Rohit Sarkar wro

Re: [PATCH] staging: rtl8712: Replace snprintf with scnprintf

2019-10-01 Thread Rohit Sarkar
On Tue, Oct 01, 2019 at 10:00:56PM +0300, Dan Carpenter wrote: > > No. scnprintf() returns the number of characters *not counting the > NUL terminator*. So it can be a maximum of MAX_WPA_IE_LEN - 1. > > regards, > dan carpenter TIL :) Would the better approach be to just remove the loop or

Re: [PATCH] staging: rtl8712: Replace snprintf with scnprintf

2019-10-02 Thread Rohit Sarkar
On Wed, Oct 02, 2019 at 03:06:22PM +0300, Dan Carpenter wrote: > You could remove it, but I feel like it's better to check for > "== MAX_WPA_IE_LEN - 1". They're effectively the same, but to me it > feels cleaner to be explicit how we're handling truncated data. > > regards, > dan carpenter I

Re: [PATCH] staging: rtl8712: Replace snprintf with scnprintf

2019-10-02 Thread Rohit Sarkar
On Wed, Oct 02, 2019 at 01:57:22PM +0300, Dan Carpenter wrote: > > We could leave it as is or change it to "MAX_WPA_IE_LEN - 1". But I > feel like the default should be to leave it as is unless there is a good > reason. Makes sense, although greg has already merged this. I guess I will remove

[PATCH] staging: rtl8712: fix boundary condition for n

2019-10-02 Thread Rohit Sarkar
Now that snprintf is replaced by scnprintf n >= MAX_WPA_IE_LEN doesn't make sense as the maximum value n can take is MAX_WPA_IE_LEN. Signed-off-by: Rohit Sarkar --- drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/driv

Re: [PATCH] staging: rtl8712: Replace snprintf with scnprintf

2019-10-01 Thread Rohit Sarkar
On Tue, Oct 01, 2019 at 11:45:14AM +0300, Dan Carpenter wrote: > > diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c > > b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c > > index b08b9a191a34..ff5edcaba64d 100644 > > --- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c > > +++

Hardware prerequisites for driver development

2019-09-25 Thread Rohit Sarkar
Hi, This is probably a real rookie question. I have been interested in contributing to the driver subsystems such as iio. I have submitted some minor patches but nothing substantial. I feel that I need some hardware to be able to contribute more. What hardware would I need to get started? Where

Re: Hardware prerequisites for driver development

2019-09-25 Thread Rohit Sarkar
On Wed, Sep 25, 2019 at 10:32:02AM +0200, Crt Mori wrote: > Hi Rohit, > There are many companies for hobbyists which sell sensors included in > IIO subsystem and for sure some electronic component store in your > local area. Price of sensor can be from 0.10 USD to 10 USD. Then you > plug this

[PATCH] staging: iio: update TODO

2020-02-24 Thread Rohit Sarkar
://marc.info/?l=linux-iio=158256721009892=2 Thanks, Rohit Signed-off-by: Rohit Sarkar --- drivers/staging/iio/TODO | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/staging/iio/TODO b/drivers/staging/iio/TODO index 1b8ebf2c1b69..783878f25f08 100644 --- a/drivers

[PATCH v3] staging: iio: update TODO

2020-02-29 Thread Rohit Sarkar
Since there are no uses of the old GPIO API, remove the item from the TODO. Changelog v3: Remove new items added. v2: Add work item mentioned by Alexandru in https://marc.info/?l=linux-iio=158261515624212=2 Signed-off-by: Rohit Sarkar --- drivers/staging/iio/TODO | 8 +--- 1 file changed

[PATCH v2] staging: iio: update TODO

2020-02-25 Thread Rohit Sarkar
Since there are no uses of the old GPIO API, remove the item from the TODO and some new items. Changes from v1: Add work item mentioned by Alexandru in https://marc.info/?l=linux-iio=158261515624212=2 Signed-off-by: Rohit Sarkar --- drivers/staging/iio/TODO | 18 -- 1 file

Re: [PATCH v3] staging: iio: update TODO

2020-03-01 Thread Rohit Sarkar
On Sun, Mar 01, 2020 at 11:49:22AM +, Jonathan Cameron wrote: > On Sat, 29 Feb 2020 19:35:45 +0530 > Rohit Sarkar wrote: > > > Since there are no uses of the old GPIO API, remove the item from > > the TODO. > > > > Changelog > > v3: Remove new items