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] [day] [month] [year] [list]
Message-ID: <YqOuRQ33bo1Y7Q+B@ravnborg.org>
Date:   Fri, 10 Jun 2022 22:49:09 +0200
From:   Sam Ravnborg <sam@...nborg.org>
To:     Stephen Kitt <steve@....org>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Noralf Trønnes <noralf@...nnes.org>,
        Thomas Zimmermann <tzimmermann@...e.de>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Javier Martinez Canillas <javierm@...hat.com>,
        Len Baker <len.baker@....com>, linux-fbdev@...r.kernel.org,
        linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
        dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH] staging: ftbft: Use backlight helper

On Fri, Jun 10, 2022 at 10:43:06PM +0200, Stephen Kitt wrote:
> Hi Sam,
> 
> On Fri, 10 Jun 2022 22:22:59 +0200, Sam Ravnborg <sam@...nborg.org> wrote:
> > On Tue, Jun 07, 2022 at 08:55:16PM +0200, Stephen Kitt wrote:
> > > backlight_properties.fb_blank is deprecated. The states it represents
> > > are handled by other properties; but instead of accessing those
> > > properties directly, drivers should use the helpers provided by
> > > backlight.h.
> > > 
> > > Instead of manually checking the power state in struct
> > > backlight_properties, use backlight_is_blank().
> > > 
> > > Signed-off-by: Stephen Kitt <steve@....org>
> > > Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> > > Cc: "Noralf Trønnes" <noralf@...nnes.org>
> > > Cc: Thomas Zimmermann <tzimmermann@...e.de>
> > > Cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> > > Cc: Javier Martinez Canillas <javierm@...hat.com>
> > > Cc: Len Baker <len.baker@....com>
> > > Cc: dri-devel@...ts.freedesktop.org
> > > Cc: linux-fbdev@...r.kernel.org
> > > Cc: linux-staging@...ts.linux.dev
> > > ---
> > >  drivers/staging/fbtft/fb_ssd1351.c | 3 +--
> > >  drivers/staging/fbtft/fbtft-core.c | 3 +--
> > >  2 files changed, 2 insertions(+), 4 deletions(-)
> > > 
> > > diff --git a/drivers/staging/fbtft/fb_ssd1351.c
> > > b/drivers/staging/fbtft/fb_ssd1351.c index 6fd549a424d5..b8d55aa8c5c7
> > > 100644 --- a/drivers/staging/fbtft/fb_ssd1351.c
> > > +++ b/drivers/staging/fbtft/fb_ssd1351.c
> > > @@ -196,8 +196,7 @@ static int update_onboard_backlight(struct
> > > backlight_device *bd) "%s: power=%d, fb_blank=%d\n",
> > >  		      __func__, bd->props.power, bd->props.fb_blank);  
> > Could you try to kill this use of props.fb_blank too?      ^^^^^^
> > A local variable should do the trick.
> 
> I have a pending patch changing this to show props.state instead, that way
> the debug info shows all the backlight-relevant information from props. How
> does that sound?
In the end we want to have only _one_ state for backlight, so the
simpler solution that just use one of the helpers would be better.
For this driver there is no reason to do much anyway.

	Sam

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ