lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230108202931.42c9ee66@heffalump.sk2.org>
Date:   Sun, 8 Jan 2023 20:29:31 +0100
From:   Stephen Kitt <steve@....org>
To:     Sam Ravnborg via B4 Submission Endpoint 
        <devnull+sam.ravnborg.org@...nel.org>
Cc:     <sam@...nborg.org>, Nicolas Ferre <nicolas.ferre@...rochip.com>,
        Helge Deller <deller@....de>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Claudiu Beznea <claudiu.beznea@...rochip.com>,
        Antonino Daplas <adaplas@...il.com>,
        Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Paul Mackerras <paulus@...ba.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Robin van der Gracht <robin@...tonic.nl>,
        Miguel Ojeda <ojeda@...nel.org>, Lee Jones <lee@...nel.org>,
        Daniel Thompson <daniel.thompson@...aro.org>,
        Jingoo Han <jingoohan1@...il.com>, linux-fbdev@...r.kernel.org,
        dri-devel@...ts.freedesktop.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux-omap@...r.kernel.org, linux-staging@...ts.linux.dev,
        linuxppc-dev@...ts.ozlabs.org,
        Thomas Zimmermann <tzimmermann@...e.de>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Javier Martinez Canillas <javierm@...hat.com>,
        Peter Suti <peter.suti@...eamunlimited.com>
Subject: Re: [PATCH 10/15] staging: fbtft: core: Introduce
 backlight_is_blank()

On Sat, 07 Jan 2023 19:26:24 +0100, Sam Ravnborg via B4 Submission Endpoint
<devnull+sam.ravnborg.org@...nel.org> wrote:

> From: Sam Ravnborg <sam@...nborg.org>
> 
> Avoiding direct access to backlight_properties.props.
> 
> Access to the deprecated props.fb_blank replaced by backlight_is_blank().
> Access to props.power is dropped - it was only used for debug.
> 
> Signed-off-by: Sam Ravnborg <sam@...nborg.org>
> Cc: Thomas Zimmermann <tzimmermann@...e.de>
> Cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> Cc: Javier Martinez Canillas <javierm@...hat.com>
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Cc: Sam Ravnborg <sam@...nborg.org>
> Cc: Stephen Kitt <steve@....org>
> Cc: Peter Suti <peter.suti@...eamunlimited.com>
> Cc: linux-fbdev@...r.kernel.org
> ---
>  drivers/staging/fbtft/fbtft-core.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/staging/fbtft/fbtft-core.c
> b/drivers/staging/fbtft/fbtft-core.c index afaba94d1d1c..1746327e1939 100644
> --- a/drivers/staging/fbtft/fbtft-core.c
> +++ b/drivers/staging/fbtft/fbtft-core.c
> @@ -132,15 +132,15 @@ static int fbtft_backlight_update_status(struct
> backlight_device *bd) {
>  	struct fbtft_par *par = bl_get_data(bd);
>  	bool polarity = par->polarity;
> +	bool blank = backlight_is_blank(bd);
>  
> -	fbtft_par_dbg(DEBUG_BACKLIGHT, par,
> -		      "%s: polarity=%d, power=%d, fb_blank=%d\n",
> -		      __func__, polarity, bd->props.power,
> bd->props.fb_blank);
> +	fbtft_par_dbg(DEBUG_BACKLIGHT, par, "%s: polarity=%d, blank=%d\n",
> +		      __func__, polarity, blank);
>  
> -	if (!backlight_is_blank(bd))
> -		gpiod_set_value(par->gpio.led[0], polarity);
> -	else
> +	if (blank)
>  		gpiod_set_value(par->gpio.led[0], !polarity);
> +	else
> +		gpiod_set_value(par->gpio.led[0], polarity);
>  
>  	return 0;
>  }
> 
> -- 
> 2.34.1

Reviewed-by: Stephen Kitt <steve@....org>

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ