All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Andy Shevchenko <andy@kernel.org>
Cc: lee@kernel.org, daniel.thompson@linaro.org, jingoohan1@gmail.com,
	deller@gmx.de, robin@protonic.nl, javierm@redhat.com,
	dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
	linux-input@vger.kernel.org, linux-pwm@vger.kernel.org
Subject: Re: [PATCH v2 01/10] backlight: Match backlight device against struct fb_info.bl_dev
Date: Wed, 21 Feb 2024 16:44:53 +0100	[thread overview]
Message-ID: <2667387f-f768-4057-a1d0-abbc2cb40d89@suse.de> (raw)
In-Reply-To: <ZdYJ4FhJ9vhzUeiW@smile.fi.intel.com>

Hi

Am 21.02.24 um 15:34 schrieb Andy Shevchenko:
> On Wed, Feb 21, 2024 at 10:41:28AM +0100, Thomas Zimmermann wrote:
>> Framebuffer drivers for devices with dedicated backlight are supposed
>> to set struct fb_info.bl_dev to the backlight's respective device. Use
>> the value to match backlight and framebuffer in the backlight core code.
> ...
>
>>   	if (!bd->ops)
>>   		goto out;
>> -	if (bd->ops->check_fb && !bd->ops->check_fb(bd, evdata->info))
>> +	else if (bd->ops->check_fb && !bd->ops->check_fb(bd, info))
> What's the point of adding redundant 'else'?
>
>>   		goto out;
>> +#if IS_ENABLED(CONFIG_FB_BACKLIGHT)
>> +	else if (info->bl_dev && info->bl_dev != bd)
> Ditto.

They group these tests into one single block of code; signaling that 
these tests serve the same purpose.

Best regards
Thomas

>
>> +		goto out;
>> +#endif

-- 
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)


  reply	other threads:[~2024-02-21 15:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-21  9:41 [PATCH v2 00/10] backlight: Replace struct fb_info in interfaces Thomas Zimmermann
2024-02-21  9:41 ` [PATCH v2 01/10] backlight: Match backlight device against struct fb_info.bl_dev Thomas Zimmermann
2024-02-21 14:34   ` Andy Shevchenko
2024-02-21 15:44     ` Thomas Zimmermann [this message]
2024-02-21 16:46       ` Andy Shevchenko
2024-02-23 10:53   ` Lee Jones
2024-02-21  9:41 ` [PATCH v2 02/10] auxdisplay/ht16k33: Remove struct backlight_ops.check_fb Thomas Zimmermann
2024-02-21 14:35   ` Andy Shevchenko
2024-02-21  9:41 ` [PATCH v2 03/10] hid/hid-picolcd: Fix initialization order Thomas Zimmermann
2024-02-21  9:41 ` [PATCH v2 04/10] hid/hid-picolcd: Remove struct backlight_ops.check_fb Thomas Zimmermann
2024-02-21  9:41 ` [PATCH v2 05/10] backlight/aat2870-backlight: Remove struct backlight.check_fb Thomas Zimmermann
2024-02-21  9:41 ` [PATCH v2 06/10] backlight/pwm-backlight: Remove struct backlight_ops.check_fb Thomas Zimmermann
2024-02-21  9:41 ` [PATCH v2 07/10] fbdev/sh_mobile_lcdc_fb: " Thomas Zimmermann
2024-02-21  9:41 ` [PATCH v2 08/10] fbdev/ssd1307fb: Init backlight before registering framebuffer Thomas Zimmermann
2024-02-21  9:41 ` [PATCH v2 09/10] fbdev/ssd1307fb: Remove struct backlight_ops.check_fb Thomas Zimmermann
2024-02-21  9:41 ` [PATCH v2 10/10] backlight: Add controls_device callback to struct backlight_ops Thomas Zimmermann

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=2667387f-f768-4057-a1d0-abbc2cb40d89@suse.de \
    --to=tzimmermann@suse.de \
    --cc=andy@kernel.org \
    --cc=daniel.thompson@linaro.org \
    --cc=deller@gmx.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=javierm@redhat.com \
    --cc=jingoohan1@gmail.com \
    --cc=lee@kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=robin@protonic.nl \
    /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 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.