* [PATCH] media: vivid: Simplify fb_vblank init in fb_blank
@ 2026-01-12 5:59 jempty.liang
2026-03-16 14:07 ` Hans Verkuil
0 siblings, 1 reply; 2+ messages in thread
From: jempty.liang @ 2026-01-12 5:59 UTC (permalink / raw)
To: hverkuil, mchehab; +Cc: linux-media, linux-kernel, jempty.liang
Adjust struct fb_vblank declaration scope and use aggregate init
instead of memset for cleaner FBIOGET_VBLANK handling.
Signed-off-by: jempty.liang <imntjempty@163.com>
---
drivers/media/test-drivers/vivid/vivid-osd.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/media/test-drivers/vivid/vivid-osd.c b/drivers/media/test-drivers/vivid/vivid-osd.c
index 91ad9b314f2e..566f870b56a6 100644
--- a/drivers/media/test-drivers/vivid/vivid-osd.c
+++ b/drivers/media/test-drivers/vivid/vivid-osd.c
@@ -73,12 +73,10 @@ void vivid_fb_clear(struct vivid_dev *dev)
static int vivid_fb_ioctl(struct fb_info *info, unsigned cmd, unsigned long arg)
{
struct vivid_dev *dev = (struct vivid_dev *)info->par;
+ struct fb_vblank vblank = {};
switch (cmd) {
case FBIOGET_VBLANK: {
- struct fb_vblank vblank;
-
- memset(&vblank, 0, sizeof(vblank));
vblank.flags = FB_VBLANK_HAVE_COUNT | FB_VBLANK_HAVE_VCOUNT |
FB_VBLANK_HAVE_VSYNC;
vblank.count = 0;
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] media: vivid: Simplify fb_vblank init in fb_blank
2026-01-12 5:59 [PATCH] media: vivid: Simplify fb_vblank init in fb_blank jempty.liang
@ 2026-03-16 14:07 ` Hans Verkuil
0 siblings, 0 replies; 2+ messages in thread
From: Hans Verkuil @ 2026-03-16 14:07 UTC (permalink / raw)
To: jempty.liang, hverkuil, mchehab; +Cc: linux-media, linux-kernel
On 12/01/2026 06:59, jempty.liang wrote:
> Adjust struct fb_vblank declaration scope and use aggregate init
> instead of memset for cleaner FBIOGET_VBLANK handling.
>
> Signed-off-by: jempty.liang <imntjempty@163.com>
> ---
> drivers/media/test-drivers/vivid/vivid-osd.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/media/test-drivers/vivid/vivid-osd.c b/drivers/media/test-drivers/vivid/vivid-osd.c
> index 91ad9b314f2e..566f870b56a6 100644
> --- a/drivers/media/test-drivers/vivid/vivid-osd.c
> +++ b/drivers/media/test-drivers/vivid/vivid-osd.c
> @@ -73,12 +73,10 @@ void vivid_fb_clear(struct vivid_dev *dev)
> static int vivid_fb_ioctl(struct fb_info *info, unsigned cmd, unsigned long arg)
> {
> struct vivid_dev *dev = (struct vivid_dev *)info->par;
> + struct fb_vblank vblank = {};
Why move it out of the case?
>
> switch (cmd) {
> case FBIOGET_VBLANK: {
> - struct fb_vblank vblank;
just add '= {}' here and drop the memset.
> -
> - memset(&vblank, 0, sizeof(vblank));
> vblank.flags = FB_VBLANK_HAVE_COUNT | FB_VBLANK_HAVE_VCOUNT |
> FB_VBLANK_HAVE_VSYNC;
> vblank.count = 0;
Regards,
Hans
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-16 14:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-12 5:59 [PATCH] media: vivid: Simplify fb_vblank init in fb_blank jempty.liang
2026-03-16 14:07 ` Hans Verkuil
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®