* Re: [PATCH linux-next] backlight: lp8788: use sysfs_emit() to instead of scnprintf() [not found] <20220923063533.239315-1-ye.xingchen@zte.com.cn> @ 2022-09-23 21:04 ` Han Jingoo 2022-09-26 13:27 ` Daniel Thompson 1 sibling, 0 replies; 3+ messages in thread From: Han Jingoo @ 2022-09-23 21:04 UTC (permalink / raw) To: cgel.zte Cc: lee, daniel.thompson, deller, dri-devel, linux-fbdev, linux-kernel, ye xingchen On Thu, Sep 22, 2022 <cgel.zte@gmail.com> wrote: > > From: ye xingchen <ye.xingchen@zte.com.cn> > > Replace the open-code with sysfs_emit() to simplify the code. > > Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> Acked-by: Jingoo Han <jingoohan1@gmail.com> Best regards, Jingoo Han > --- > drivers/video/backlight/lp8788_bl.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/video/backlight/lp8788_bl.c b/drivers/video/backlight/lp8788_bl.c > index ba42f3fe0c73..00d79c0cfee9 100644 > --- a/drivers/video/backlight/lp8788_bl.c > +++ b/drivers/video/backlight/lp8788_bl.c > @@ -240,7 +240,7 @@ static ssize_t lp8788_get_bl_ctl_mode(struct device *dev, > else > strmode = "Invalid mode"; > > - return scnprintf(buf, PAGE_SIZE, "%s\n", strmode); > + return sysfs_emit(buf, "%s\n", strmode); > } > > static DEVICE_ATTR(bl_ctl_mode, S_IRUGO, lp8788_get_bl_ctl_mode, NULL); > -- > 2.25.1 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH linux-next] backlight: lp8788: use sysfs_emit() to instead of scnprintf() [not found] <20220923063533.239315-1-ye.xingchen@zte.com.cn> 2022-09-23 21:04 ` [PATCH linux-next] backlight: lp8788: use sysfs_emit() to instead of scnprintf() Han Jingoo @ 2022-09-26 13:27 ` Daniel Thompson 2022-09-26 18:49 ` Han Jingoo 1 sibling, 1 reply; 3+ messages in thread From: Daniel Thompson @ 2022-09-26 13:27 UTC (permalink / raw) To: cgel.zte Cc: lee, jingoohan1, deller, dri-devel, linux-fbdev, linux-kernel, ye xingchen On Fri, Sep 23, 2022 at 06:35:33AM +0000, cgel.zte@gmail.com wrote: > From: ye xingchen <ye.xingchen@zte.com.cn> > > Replace the open-code with sysfs_emit() to simplify the code. > > Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> > --- > drivers/video/backlight/lp8788_bl.c | 2 +- This one has the subject right and is a good change. However I'd still prefer it as a single patchset that fixes *all* instances of this code pattern. Daniel. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH linux-next] backlight: lp8788: use sysfs_emit() to instead of scnprintf() 2022-09-26 13:27 ` Daniel Thompson @ 2022-09-26 18:49 ` Han Jingoo 0 siblings, 0 replies; 3+ messages in thread From: Han Jingoo @ 2022-09-26 18:49 UTC (permalink / raw) To: Daniel Thompson Cc: cgel.zte, lee, deller, dri-devel, linux-fbdev, linux-kernel, ye xingchen On Mon, Sep 26, 2022 Daniel Thompson <daniel.thompson@linaro.org> wrote: > > On Fri, Sep 23, 2022 at 06:35:33AM +0000, cgel.zte@gmail.com wrote: > > From: ye xingchen <ye.xingchen@zte.com.cn> > > > > Replace the open-code with sysfs_emit() to simplify the code. > > > > Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> > > --- > > drivers/video/backlight/lp8788_bl.c | 2 +- > > This one has the subject right and is a good change. However I'd still > prefer it as a single patchset that fixes *all* instances of this code > pattern. Yes, I agree with Daniel's opinion. Xingchen, Please make a "Single" patch for including "ALL" fixes for this pattern in the 'drivers/video/backlight' directory. Thank you. Best regards, Jingoo Han > > > Daniel. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-09-26 18:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20220923063533.239315-1-ye.xingchen@zte.com.cn>
2022-09-23 21:04 ` [PATCH linux-next] backlight: lp8788: use sysfs_emit() to instead of scnprintf() Han Jingoo
2022-09-26 13:27 ` Daniel Thompson
2022-09-26 18:49 ` Han Jingoo
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).