* [PATCH] video: fbdev: replace spurious snprintf() with sprintf() @ 2020-08-24 17:44 ` Alex Dewar 2020-09-08 11:37 ` Bartlomiej Zolnierkiewicz 0 siblings, 1 reply; 2+ messages in thread From: Alex Dewar @ 2020-08-24 17:44 UTC (permalink / raw) To: Bartlomiej Zolnierkiewicz, Alex Dewar, Daniel Vetter, Jani Nikula, Arnd Bergmann, dri-devel, linux-fbdev, linux-kernel par->vgapass is a u8, so if we are assuming that buf is at least PAGE_SIZE then the extra checking is pointless. Signed-off-by: Alex Dewar <alex.dewar90@gmail.com> --- drivers/video/fbdev/sstfb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/sstfb.c b/drivers/video/fbdev/sstfb.c index afe6d1b7c3a0..c05cdabeb11c 100644 --- a/drivers/video/fbdev/sstfb.c +++ b/drivers/video/fbdev/sstfb.c @@ -733,7 +733,7 @@ static ssize_t show_vgapass(struct device *device, struct device_attribute *attr { struct fb_info *info = dev_get_drvdata(device); struct sstfb_par *par = info->par; - return snprintf(buf, PAGE_SIZE, "%d\n", par->vgapass); + return sprintf(buf, "%d\n", par->vgapass); } static struct device_attribute device_attrs[] = { -- 2.28.0 ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] video: fbdev: replace spurious snprintf() with sprintf() 2020-08-24 17:44 ` [PATCH] video: fbdev: replace spurious snprintf() with sprintf() Alex Dewar @ 2020-09-08 11:37 ` Bartlomiej Zolnierkiewicz 0 siblings, 0 replies; 2+ messages in thread From: Bartlomiej Zolnierkiewicz @ 2020-09-08 11:37 UTC (permalink / raw) To: Alex Dewar Cc: Daniel Vetter, Jani Nikula, Arnd Bergmann, dri-devel, linux-fbdev, linux-kernel On 8/24/20 7:44 PM, Alex Dewar wrote: > par->vgapass is a u8, so if we are assuming that buf is at least > PAGE_SIZE then the extra checking is pointless. > > Signed-off-by: Alex Dewar <alex.dewar90@gmail.com> Applied to drm-misc-next tree, thanks. Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics > --- > drivers/video/fbdev/sstfb.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/video/fbdev/sstfb.c b/drivers/video/fbdev/sstfb.c > index afe6d1b7c3a0..c05cdabeb11c 100644 > --- a/drivers/video/fbdev/sstfb.c > +++ b/drivers/video/fbdev/sstfb.c > @@ -733,7 +733,7 @@ static ssize_t show_vgapass(struct device *device, struct device_attribute *attr > { > struct fb_info *info = dev_get_drvdata(device); > struct sstfb_par *par = info->par; > - return snprintf(buf, PAGE_SIZE, "%d\n", par->vgapass); > + return sprintf(buf, "%d\n", par->vgapass); > } > > static struct device_attribute device_attrs[] = { > ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-08 12:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20200824174423eucas1p25ee511479ffce613260a49d415e5733f@eucas1p2.samsung.com>
2020-08-24 17:44 ` [PATCH] video: fbdev: replace spurious snprintf() with sprintf() Alex Dewar
2020-09-08 11:37 ` Bartlomiej Zolnierkiewicz
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®