mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil+cisco@kernel.org>
To: "jempty.liang" <imntjempty@163.com>,
	hverkuil@kernel.org, mchehab@kernel.org
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: vivid: Simplify fb_vblank init in fb_blank
Date: Mon, 16 Mar 2026 15:07:16 +0100	[thread overview]
Message-ID: <c1c1b70f-8937-4f40-b9f0-3f46ffe37b6b@kernel.org> (raw)
In-Reply-To: <20260112055921.118009-1-imntjempty@163.com>

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

      reply	other threads:[~2026-03-16 14:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-12  5:59 jempty.liang
2026-03-16 14:07 ` Hans Verkuil [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c1c1b70f-8937-4f40-b9f0-3f46ffe37b6b@kernel.org \
    --to=hverkuil+cisco@kernel.org \
    --cc=hverkuil@kernel.org \
    --cc=imntjempty@163.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®