* [PATCH] staging: comedi: Use sysfs_emit for show(device *...) functions
@ 2020-10-18 18:09 Deepak R Varma
2020-10-18 18:31 ` [Outreachy kernel] " Sumera Priyadarsini
0 siblings, 1 reply; 6+ messages in thread
From: Deepak R Varma @ 2020-10-18 18:09 UTC (permalink / raw)
To: outreachy-kernel, Ian Abbott, H Hartley Sweeten,
Greg Kroah-Hartman
Cc: mh12gx2825
Convert snprintf calls in device show functions to sysfs_emit
for PAGE_SIZE buffer safety.
Warning generated by: scripts/coccinelle/api/device_attr_show.cocci
Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com>
---
drivers/staging/comedi/comedi_fops.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index d99231c737fb..5b8ba0c84a8e 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -396,7 +396,7 @@ static ssize_t max_read_buffer_kb_show(struct device *csdev,
mutex_unlock(&dev->mutex);
comedi_dev_put(dev);
- return snprintf(buf, PAGE_SIZE, "%u\n", size);
+ return sysfs_emit(buf, "%u\n", size);
}
static ssize_t max_read_buffer_kb_store(struct device *csdev,
@@ -452,7 +452,7 @@ static ssize_t read_buffer_kb_show(struct device *csdev,
mutex_unlock(&dev->mutex);
comedi_dev_put(dev);
- return snprintf(buf, PAGE_SIZE, "%u\n", size);
+ return sysfs_emit(buf, "%u\n", size);
}
static ssize_t read_buffer_kb_store(struct device *csdev,
@@ -509,7 +509,7 @@ static ssize_t max_write_buffer_kb_show(struct device *csdev,
mutex_unlock(&dev->mutex);
comedi_dev_put(dev);
- return snprintf(buf, PAGE_SIZE, "%u\n", size);
+ return sysfs_emit(buf, "%u\n", size);
}
static ssize_t max_write_buffer_kb_store(struct device *csdev,
@@ -565,7 +565,7 @@ static ssize_t write_buffer_kb_show(struct device *csdev,
mutex_unlock(&dev->mutex);
comedi_dev_put(dev);
- return snprintf(buf, PAGE_SIZE, "%u\n", size);
+ return sysfs_emit(buf, "%u\n", size);
}
static ssize_t write_buffer_kb_store(struct device *csdev,
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: comedi: Use sysfs_emit for show(device *...) functions
2020-10-18 18:09 [PATCH] staging: comedi: Use sysfs_emit for show(device *...) functions Deepak R Varma
@ 2020-10-18 18:31 ` Sumera Priyadarsini
2020-10-18 18:45 ` Deepak R Varma
0 siblings, 1 reply; 6+ messages in thread
From: Sumera Priyadarsini @ 2020-10-18 18:31 UTC (permalink / raw)
To: Deepak R Varma
Cc: outreachy-kernel, Ian Abbott, H Hartley Sweeten,
Greg Kroah-Hartman
[-- Attachment #1: Type: text/plain, Size: 2649 bytes --]
On Sun, 18 Oct, 2020, 11:40 PM Deepak R Varma, <mh12gx2825@gmail.com> wrote:
> Convert snprintf calls in device show functions to sysfs_emit
> for PAGE_SIZE buffer safety.
> Warning generated by: scripts/coccinelle/api/device_attr_show.cocci
>
> Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com>
> ---
> drivers/staging/comedi/comedi_fops.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/comedi/comedi_fops.c
> b/drivers/staging/comedi/comedi_fops.c
> index d99231c737fb..5b8ba0c84a8e 100644
> --- a/drivers/staging/comedi/comedi_fops.c
> +++ b/drivers/staging/comedi/comedi_fops.c
> @@ -396,7 +396,7 @@ static ssize_t max_read_buffer_kb_show(struct device
> *csdev,
> mutex_unlock(&dev->mutex);
>
> comedi_dev_put(dev);
> - return snprintf(buf, PAGE_SIZE, "%u\n", size);
> + return sysfs_emit(buf, "%u\n", size);
> }
>
> static ssize_t max_read_buffer_kb_store(struct device *csdev,
> @@ -452,7 +452,7 @@ static ssize_t read_buffer_kb_show(struct device
> *csdev,
> mutex_unlock(&dev->mutex);
>
> comedi_dev_put(dev);
> - return snprintf(buf, PAGE_SIZE, "%u\n", size);
> + return sysfs_emit(buf, "%u\n", size);
> }
>
> static ssize_t read_buffer_kb_store(struct device *csdev,
> @@ -509,7 +509,7 @@ static ssize_t max_write_buffer_kb_show(struct device
> *csdev,
> mutex_unlock(&dev->mutex);
>
> comedi_dev_put(dev);
> - return snprintf(buf, PAGE_SIZE, "%u\n", size);
> + return sysfs_emit(buf, "%u\n", size);
> }
>
> static ssize_t max_write_buffer_kb_store(struct device *csdev,
> @@ -565,7 +565,7 @@ static ssize_t write_buffer_kb_show(struct device
> *csdev,
> mutex_unlock(&dev->mutex);
>
> comedi_dev_put(dev);
> - return snprintf(buf, PAGE_SIZE, "%u\n", size);
> + return sysfs_emit(buf, "%u\n", size);
> }
>
> static ssize_t write_buffer_kb_store(struct device *csdev,
> --
> 2.25.1
>
Hi Deepak,
I was just about to send a V2 for the previous patchset I sent which
included this file as well. No issues since I've not sent it yet- I'll
remove this file from my V2. But please give me a heads-up the next time so
we are not working on the same files. :-)
Thanks, and regards,
Sumera
--
> You received this message because you are subscribed to the Google Groups
> "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/outreachy-kernel/20201018180954.GA39024%40ubuntu204
> .
>
[-- Attachment #2: Type: text/html, Size: 4034 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: comedi: Use sysfs_emit for show(device *...) functions
2020-10-18 18:31 ` [Outreachy kernel] " Sumera Priyadarsini
@ 2020-10-18 18:45 ` Deepak R Varma
2020-10-19 0:21 ` Helen Koike
0 siblings, 1 reply; 6+ messages in thread
From: Deepak R Varma @ 2020-10-18 18:45 UTC (permalink / raw)
To: Sumera Priyadarsini
Cc: outreachy-kernel, Ian Abbott, H Hartley Sweeten,
Greg Kroah-Hartman
On Mon, Oct 19, 2020 at 12:01:24AM +0530, Sumera Priyadarsini wrote:
> On Sun, 18 Oct, 2020, 11:40 PM Deepak R Varma, <mh12gx2825@gmail.com> wrote:
>
> > Convert snprintf calls in device show functions to sysfs_emit
> > for PAGE_SIZE buffer safety.
> > Warning generated by: scripts/coccinelle/api/device_attr_show.cocci
> >
> > Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com>
> > ---
> > drivers/staging/comedi/comedi_fops.c | 8 ++++----
> > 1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/staging/comedi/comedi_fops.c
> > b/drivers/staging/comedi/comedi_fops.c
> > index d99231c737fb..5b8ba0c84a8e 100644
> > --- a/drivers/staging/comedi/comedi_fops.c
> > +++ b/drivers/staging/comedi/comedi_fops.c
> > @@ -396,7 +396,7 @@ static ssize_t max_read_buffer_kb_show(struct device
> > *csdev,
> > mutex_unlock(&dev->mutex);
> >
> > comedi_dev_put(dev);
> > - return snprintf(buf, PAGE_SIZE, "%u\n", size);
> > + return sysfs_emit(buf, "%u\n", size);
> > }
> >
> > static ssize_t max_read_buffer_kb_store(struct device *csdev,
> > @@ -452,7 +452,7 @@ static ssize_t read_buffer_kb_show(struct device
> > *csdev,
> > mutex_unlock(&dev->mutex);
> >
> > comedi_dev_put(dev);
> > - return snprintf(buf, PAGE_SIZE, "%u\n", size);
> > + return sysfs_emit(buf, "%u\n", size);
> > }
> >
> > static ssize_t read_buffer_kb_store(struct device *csdev,
> > @@ -509,7 +509,7 @@ static ssize_t max_write_buffer_kb_show(struct device
> > *csdev,
> > mutex_unlock(&dev->mutex);
> >
> > comedi_dev_put(dev);
> > - return snprintf(buf, PAGE_SIZE, "%u\n", size);
> > + return sysfs_emit(buf, "%u\n", size);
> > }
> >
> > static ssize_t max_write_buffer_kb_store(struct device *csdev,
> > @@ -565,7 +565,7 @@ static ssize_t write_buffer_kb_show(struct device
> > *csdev,
> > mutex_unlock(&dev->mutex);
> >
> > comedi_dev_put(dev);
> > - return snprintf(buf, PAGE_SIZE, "%u\n", size);
> > + return sysfs_emit(buf, "%u\n", size);
> > }
> >
> > static ssize_t write_buffer_kb_store(struct device *csdev,
> > --
> > 2.25.1
> >
>
> Hi Deepak,
>
> I was just about to send a V2 for the previous patchset I sent which
> included this file as well. No issues since I've not sent it yet- I'll
> remove this file from my V2. But please give me a heads-up the next time so
> we are not working on the same files. :-)
>
> Thanks, and regards,
> Sumera
>
Sure. I should have informed you. My bad.
I also sent in patches for the other two files as well. So you can look
for other issues to fix.
Thanks.
Deepak.
> --
> > You received this message because you are subscribed to the Google Groups
> > "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to outreachy-kernel+unsubscribe@googlegroups.com.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/outreachy-kernel/20201018180954.GA39024%40ubuntu204
> > .
> >
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: comedi: Use sysfs_emit for show(device *...) functions
2020-10-18 18:45 ` Deepak R Varma
@ 2020-10-19 0:21 ` Helen Koike
2020-10-19 1:27 ` Deepak R Varma
0 siblings, 1 reply; 6+ messages in thread
From: Helen Koike @ 2020-10-19 0:21 UTC (permalink / raw)
To: Deepak R Varma
Cc: Sumera Priyadarsini, outreachy-kernel, Ian Abbott,
H Hartley Sweeten, Greg Kroah-Hartman
Hi Deepak,
On Sun, Oct 18, 2020 at 3:45 PM Deepak R Varma <mh12gx2825@gmail.com> wrote:
>
> On Mon, Oct 19, 2020 at 12:01:24AM +0530, Sumera Priyadarsini wrote:
> > On Sun, 18 Oct, 2020, 11:40 PM Deepak R Varma, <mh12gx2825@gmail.com> wrote:
> >
> > > Convert snprintf calls in device show functions to sysfs_emit
> > > for PAGE_SIZE buffer safety.
> > > Warning generated by: scripts/coccinelle/api/device_attr_show.cocci
> > >
> > > Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com>
> > > ---
> > > drivers/staging/comedi/comedi_fops.c | 8 ++++----
> > > 1 file changed, 4 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/drivers/staging/comedi/comedi_fops.c
> > > b/drivers/staging/comedi/comedi_fops.c
> > > index d99231c737fb..5b8ba0c84a8e 100644
> > > --- a/drivers/staging/comedi/comedi_fops.c
> > > +++ b/drivers/staging/comedi/comedi_fops.c
> > > @@ -396,7 +396,7 @@ static ssize_t max_read_buffer_kb_show(struct device
> > > *csdev,
> > > mutex_unlock(&dev->mutex);
> > >
> > > comedi_dev_put(dev);
> > > - return snprintf(buf, PAGE_SIZE, "%u\n", size);
> > > + return sysfs_emit(buf, "%u\n", size);
> > > }
> > >
> > > static ssize_t max_read_buffer_kb_store(struct device *csdev,
> > > @@ -452,7 +452,7 @@ static ssize_t read_buffer_kb_show(struct device
> > > *csdev,
> > > mutex_unlock(&dev->mutex);
> > >
> > > comedi_dev_put(dev);
> > > - return snprintf(buf, PAGE_SIZE, "%u\n", size);
> > > + return sysfs_emit(buf, "%u\n", size);
> > > }
> > >
> > > static ssize_t read_buffer_kb_store(struct device *csdev,
> > > @@ -509,7 +509,7 @@ static ssize_t max_write_buffer_kb_show(struct device
> > > *csdev,
> > > mutex_unlock(&dev->mutex);
> > >
> > > comedi_dev_put(dev);
> > > - return snprintf(buf, PAGE_SIZE, "%u\n", size);
> > > + return sysfs_emit(buf, "%u\n", size);
> > > }
> > >
> > > static ssize_t max_write_buffer_kb_store(struct device *csdev,
> > > @@ -565,7 +565,7 @@ static ssize_t write_buffer_kb_show(struct device
> > > *csdev,
> > > mutex_unlock(&dev->mutex);
> > >
> > > comedi_dev_put(dev);
> > > - return snprintf(buf, PAGE_SIZE, "%u\n", size);
> > > + return sysfs_emit(buf, "%u\n", size);
> > > }
> > >
> > > static ssize_t write_buffer_kb_store(struct device *csdev,
> > > --
> > > 2.25.1
> > >
> >
> > Hi Deepak,
> >
> > I was just about to send a V2 for the previous patchset I sent which
> > included this file as well. No issues since I've not sent it yet- I'll
> > remove this file from my V2. But please give me a heads-up the next time so
> > we are not working on the same files. :-)
> >
> > Thanks, and regards,
> > Sumera
> >
>
> Sure. I should have informed you. My bad.
> I also sent in patches for the other two files as well. So you can look
> for other issues to fix.
Nice work you are doing with the contribution period :)
I just want to second what Sumera said.
Since Sumera had already replied in the past email thread[1] (which you also
replied, so I guess you saw her reply there), she mentioned she would submit
V2 with those changes.
[1] https://groups.google.com/g/outreachy-kernel/c/-VkRW5siDic/m/vGVf6Ft0AwAJ
In a community workflow, when a person sends a patch and people request
changes, we usually wait for the original author to submit v2, even if you
know how to fix it quickly.
And if, for some reason, you need that change now (which wasn't the case),
it is a good practice to ask the author if you can send v2 on their behalf.
You can expect the same from others too. I hope this helps a bit, clarifying how
the community works :)
Keep the nice work!
Regards,
Helen
>
> Thanks.
> Deepak.
>
> > --
> > > You received this message because you are subscribed to the Google Groups
> > > "outreachy-kernel" group.
> > > To unsubscribe from this group and stop receiving emails from it, send an
> > > email to outreachy-kernel+unsubscribe@googlegroups.com.
> > > To view this discussion on the web visit
> > > https://groups.google.com/d/msgid/outreachy-kernel/20201018180954.GA39024%40ubuntu204
> > > .
> > >
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20201018184550.GA53720%40ubuntu204.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: comedi: Use sysfs_emit for show(device *...) functions
2020-10-19 0:21 ` Helen Koike
@ 2020-10-19 1:27 ` Deepak R Varma
2020-10-19 6:12 ` Sumera Priyadarsini
0 siblings, 1 reply; 6+ messages in thread
From: Deepak R Varma @ 2020-10-19 1:27 UTC (permalink / raw)
To: Helen Koike
Cc: Sumera Priyadarsini, outreachy-kernel, Ian Abbott,
H Hartley Sweeten, Greg Kroah-Hartman
On Sun, Oct 18, 2020 at 09:21:24PM -0300, Helen Koike wrote:
> Hi Deepak,
>
> On Sun, Oct 18, 2020 at 3:45 PM Deepak R Varma <mh12gx2825@gmail.com> wrote:
> >
> > On Mon, Oct 19, 2020 at 12:01:24AM +0530, Sumera Priyadarsini wrote:
> > > On Sun, 18 Oct, 2020, 11:40 PM Deepak R Varma, <mh12gx2825@gmail.com> wrote:
> > >
> > > > Convert snprintf calls in device show functions to sysfs_emit
> > > > for PAGE_SIZE buffer safety.
> > > > Warning generated by: scripts/coccinelle/api/device_attr_show.cocci
> > > >
> > > > Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com>
> > > > ---
> > > > drivers/staging/comedi/comedi_fops.c | 8 ++++----
> > > > 1 file changed, 4 insertions(+), 4 deletions(-)
> > > >
> > > > diff --git a/drivers/staging/comedi/comedi_fops.c
> > > > b/drivers/staging/comedi/comedi_fops.c
> > > > index d99231c737fb..5b8ba0c84a8e 100644
> > > > --- a/drivers/staging/comedi/comedi_fops.c
> > > > +++ b/drivers/staging/comedi/comedi_fops.c
> > > > @@ -396,7 +396,7 @@ static ssize_t max_read_buffer_kb_show(struct device
> > > > *csdev,
> > > > mutex_unlock(&dev->mutex);
> > > >
> > > > comedi_dev_put(dev);
> > > > - return snprintf(buf, PAGE_SIZE, "%u\n", size);
> > > > + return sysfs_emit(buf, "%u\n", size);
> > > > }
> > > >
> > > > static ssize_t max_read_buffer_kb_store(struct device *csdev,
> > > > @@ -452,7 +452,7 @@ static ssize_t read_buffer_kb_show(struct device
> > > > *csdev,
> > > > mutex_unlock(&dev->mutex);
> > > >
> > > > comedi_dev_put(dev);
> > > > - return snprintf(buf, PAGE_SIZE, "%u\n", size);
> > > > + return sysfs_emit(buf, "%u\n", size);
> > > > }
> > > >
> > > > static ssize_t read_buffer_kb_store(struct device *csdev,
> > > > @@ -509,7 +509,7 @@ static ssize_t max_write_buffer_kb_show(struct device
> > > > *csdev,
> > > > mutex_unlock(&dev->mutex);
> > > >
> > > > comedi_dev_put(dev);
> > > > - return snprintf(buf, PAGE_SIZE, "%u\n", size);
> > > > + return sysfs_emit(buf, "%u\n", size);
> > > > }
> > > >
> > > > static ssize_t max_write_buffer_kb_store(struct device *csdev,
> > > > @@ -565,7 +565,7 @@ static ssize_t write_buffer_kb_show(struct device
> > > > *csdev,
> > > > mutex_unlock(&dev->mutex);
> > > >
> > > > comedi_dev_put(dev);
> > > > - return snprintf(buf, PAGE_SIZE, "%u\n", size);
> > > > + return sysfs_emit(buf, "%u\n", size);
> > > > }
> > > >
> > > > static ssize_t write_buffer_kb_store(struct device *csdev,
> > > > --
> > > > 2.25.1
> > > >
> > >
> > > Hi Deepak,
> > >
> > > I was just about to send a V2 for the previous patchset I sent which
> > > included this file as well. No issues since I've not sent it yet- I'll
> > > remove this file from my V2. But please give me a heads-up the next time so
> > > we are not working on the same files. :-)
> > >
> > > Thanks, and regards,
> > > Sumera
> > >
> >
> > Sure. I should have informed you. My bad.
> > I also sent in patches for the other two files as well. So you can look
> > for other issues to fix.
>
> Nice work you are doing with the contribution period :)
>
> I just want to second what Sumera said.
> Since Sumera had already replied in the past email thread[1] (which you also
> replied, so I guess you saw her reply there), she mentioned she would submit
> V2 with those changes.
>
> [1] https://groups.google.com/g/outreachy-kernel/c/-VkRW5siDic/m/vGVf6Ft0AwAJ
>
> In a community workflow, when a person sends a patch and people request
> changes, we usually wait for the original author to submit v2, even if you
> know how to fix it quickly.
> And if, for some reason, you need that change now (which wasn't the case),
> it is a good practice to ask the author if you can send v2 on their behalf.
>
> You can expect the same from others too. I hope this helps a bit, clarifying how
> the community works :)
>
> Keep the nice work!
>
> Regards,
> Helen
>
Hi Helen,
That makes perfect sense. It was my bad. I should not have modified
these files. I will remember your advise going forward.
Hi Sumera,
Once again, sorry for the overstepping. I will keep the protocol in mind
going forward.
For now, I am happy if you would like to get these patches on your name
since you started with these. Absolutely fine with me.
Thank you,
Deepak.
> >
> > Thanks.
> > Deepak.
> >
> > > --
> > > > You received this message because you are subscribed to the Google Groups
> > > > "outreachy-kernel" group.
> > > > To unsubscribe from this group and stop receiving emails from it, send an
> > > > email to outreachy-kernel+unsubscribe@googlegroups.com.
> > > > To view this discussion on the web visit
> > > > https://groups.google.com/d/msgid/outreachy-kernel/20201018180954.GA39024%40ubuntu204
> > > > .
> > > >
> >
> > --
> > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20201018184550.GA53720%40ubuntu204.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: comedi: Use sysfs_emit for show(device *...) functions
2020-10-19 1:27 ` Deepak R Varma
@ 2020-10-19 6:12 ` Sumera Priyadarsini
0 siblings, 0 replies; 6+ messages in thread
From: Sumera Priyadarsini @ 2020-10-19 6:12 UTC (permalink / raw)
To: Deepak R Varma
Cc: Helen Koike, outreachy-kernel, Ian Abbott, H Hartley Sweeten,
Greg Kroah-Hartman
[-- Attachment #1: Type: text/plain, Size: 5622 bytes --]
On Mon, 19 Oct, 2020, 6:57 AM Deepak R Varma, <mh12gx2825@gmail.com> wrote:
> On Sun, Oct 18, 2020 at 09:21:24PM -0300, Helen Koike wrote:
> > Hi Deepak,
> >
> > On Sun, Oct 18, 2020 at 3:45 PM Deepak R Varma <mh12gx2825@gmail.com>
> wrote:
> > >
> > > On Mon, Oct 19, 2020 at 12:01:24AM +0530, Sumera Priyadarsini wrote:
> > > > On Sun, 18 Oct, 2020, 11:40 PM Deepak R Varma, <mh12gx2825@gmail.com>
> wrote:
> > > >
> > > > > Convert snprintf calls in device show functions to sysfs_emit
> > > > > for PAGE_SIZE buffer safety.
> > > > > Warning generated by: scripts/coccinelle/api/device_attr_show.cocci
> > > > >
> > > > > Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com>
> > > > > ---
> > > > > drivers/staging/comedi/comedi_fops.c | 8 ++++----
> > > > > 1 file changed, 4 insertions(+), 4 deletions(-)
> > > > >
> > > > > diff --git a/drivers/staging/comedi/comedi_fops.c
> > > > > b/drivers/staging/comedi/comedi_fops.c
> > > > > index d99231c737fb..5b8ba0c84a8e 100644
> > > > > --- a/drivers/staging/comedi/comedi_fops.c
> > > > > +++ b/drivers/staging/comedi/comedi_fops.c
> > > > > @@ -396,7 +396,7 @@ static ssize_t max_read_buffer_kb_show(struct
> device
> > > > > *csdev,
> > > > > mutex_unlock(&dev->mutex);
> > > > >
> > > > > comedi_dev_put(dev);
> > > > > - return snprintf(buf, PAGE_SIZE, "%u\n", size);
> > > > > + return sysfs_emit(buf, "%u\n", size);
> > > > > }
> > > > >
> > > > > static ssize_t max_read_buffer_kb_store(struct device *csdev,
> > > > > @@ -452,7 +452,7 @@ static ssize_t read_buffer_kb_show(struct
> device
> > > > > *csdev,
> > > > > mutex_unlock(&dev->mutex);
> > > > >
> > > > > comedi_dev_put(dev);
> > > > > - return snprintf(buf, PAGE_SIZE, "%u\n", size);
> > > > > + return sysfs_emit(buf, "%u\n", size);
> > > > > }
> > > > >
> > > > > static ssize_t read_buffer_kb_store(struct device *csdev,
> > > > > @@ -509,7 +509,7 @@ static ssize_t max_write_buffer_kb_show(struct
> device
> > > > > *csdev,
> > > > > mutex_unlock(&dev->mutex);
> > > > >
> > > > > comedi_dev_put(dev);
> > > > > - return snprintf(buf, PAGE_SIZE, "%u\n", size);
> > > > > + return sysfs_emit(buf, "%u\n", size);
> > > > > }
> > > > >
> > > > > static ssize_t max_write_buffer_kb_store(struct device *csdev,
> > > > > @@ -565,7 +565,7 @@ static ssize_t write_buffer_kb_show(struct
> device
> > > > > *csdev,
> > > > > mutex_unlock(&dev->mutex);
> > > > >
> > > > > comedi_dev_put(dev);
> > > > > - return snprintf(buf, PAGE_SIZE, "%u\n", size);
> > > > > + return sysfs_emit(buf, "%u\n", size);
> > > > > }
> > > > >
> > > > > static ssize_t write_buffer_kb_store(struct device *csdev,
> > > > > --
> > > > > 2.25.1
> > > > >
> > > >
> > > > Hi Deepak,
> > > >
> > > > I was just about to send a V2 for the previous patchset I sent which
> > > > included this file as well. No issues since I've not sent it yet-
> I'll
> > > > remove this file from my V2. But please give me a heads-up the next
> time so
> > > > we are not working on the same files. :-)
> > > >
> > > > Thanks, and regards,
> > > > Sumera
> > > >
> > >
> > > Sure. I should have informed you. My bad.
> > > I also sent in patches for the other two files as well. So you can look
> > > for other issues to fix.
> >
> > Nice work you are doing with the contribution period :)
> >
> > I just want to second what Sumera said.
> > Since Sumera had already replied in the past email thread[1] (which you
> also
> > replied, so I guess you saw her reply there), she mentioned she would
> submit
> > V2 with those changes.
> >
> > [1]
> https://groups.google.com/g/outreachy-kernel/c/-VkRW5siDic/m/vGVf6Ft0AwAJ
> >
> > In a community workflow, when a person sends a patch and people request
> > changes, we usually wait for the original author to submit v2, even if
> you
> > know how to fix it quickly.
> > And if, for some reason, you need that change now (which wasn't the
> case),
> > it is a good practice to ask the author if you can send v2 on their
> behalf.
> >
> > You can expect the same from others too. I hope this helps a bit,
> clarifying how
> > the community works :)
> >
> > Keep the nice work!
> >
> > Regards,
> > Helen
> >
>
> Hi Helen,
> That makes perfect sense. It was my bad. I should not have modified
> these files. I will remember your advise going forward.
>
> Hi Sumera,
> Once again, sorry for the overstepping. I will keep the protocol in mind
> going forward.
> For now, I am happy if you would like to get these patches on your name
> since you started with these. Absolutely fine with me.
>
Hey Deepak,
Like I said, I am okay with it. :-)
Thanks,
Sumera
Thank you,
> Deepak.
>
> > >
> > > Thanks.
> > > Deepak.
> > >
> > > > --
> > > > > You received this message because you are subscribed to the Google
> Groups
> > > > > "outreachy-kernel" group.
> > > > > To unsubscribe from this group and stop receiving emails from it,
> send an
> > > > > email to outreachy-kernel+unsubscribe@googlegroups.com.
> > > > > To view this discussion on the web visit
> > > > >
> https://groups.google.com/d/msgid/outreachy-kernel/20201018180954.GA39024%40ubuntu204
> > > > > .
> > > > >
> > >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups "outreachy-kernel" group.
> > > To unsubscribe from this group and stop receiving emails from it, send
> an email to outreachy-kernel+unsubscribe@googlegroups.com.
> > > To view this discussion on the web visit
> https://groups.google.com/d/msgid/outreachy-kernel/20201018184550.GA53720%40ubuntu204
> .
>
[-- Attachment #2: Type: text/html, Size: 8796 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-10-19 6:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-18 18:09 [PATCH] staging: comedi: Use sysfs_emit for show(device *...) functions Deepak R Varma
2020-10-18 18:31 ` [Outreachy kernel] " Sumera Priyadarsini
2020-10-18 18:45 ` Deepak R Varma
2020-10-19 0:21 ` Helen Koike
2020-10-19 1:27 ` Deepak R Varma
2020-10-19 6:12 ` Sumera Priyadarsini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.