Re: REGRESSION: [RESEND PATCH v3 1/4] backlight: pwm_bl: linear interpolation between brightness-levels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 16, 2018 at 11:57:29AM +0000, Marcel Ziswiler wrote:
> On Mon, 2018-07-16 at 10:42 +0100, Daniel Thompson wrote:
> > > 
> > > From dbb31d00c9f2873affedbceae917c9d7fce5f832 Mon Sep 17 00:00:00
> > > 2001
> > > Message-Id:
> > > <dbb31d00c9f2873affedbceae917c9d7fce5f832.1531664663.git.ma
> > > rcel.ziswiler@xxxxxxxxxxx>
> > > From: Daniel Thompson <daniel.thompson@xxxxxxxxxx>
> > > Date: Sun, 15 Jul 2018 08:49:05 +0100
> > > Subject: [PATCH] backlight: pwm_bl: Fix uninitialized variable
> > > 
> > > Currently, if the DT does not define num-interpolated-steps then
> > > num_steps is undefined meaning the interpolation code will deploy
> > > randomly. Fix this.
> > > 
> > > Fixes: 573fe6d1c25c ("backlight: pwm_bl: Linear interpolation
> > > between
> > > brightness-levels")
> > > Reported-by: Marcel Ziswiler <marcel.ziswiler@xxxxxxxxxxx>
> > > Signed-off-by: Daniel Thompson <daniel.thompson@xxxxxxxxxx>
> > > Signed-off-by: Marcel Ziswiler <marcel.ziswiler@xxxxxxxxxxx>
> > 
> > Is it Tested-by: too? It would be good to confirm I was right about
> > the
> > cause of the problem.
> 
> Yes and I confirm you were right.

Thanks.


> > >  drivers/video/backlight/pwm_bl.c | 18 ++++++++----------
> > >  1 file changed, 8 insertions(+), 10 deletions(-)
> > > 
> > > diff --git a/drivers/video/backlight/pwm_bl.c
> > > b/drivers/video/backlight/pwm_bl.c
> > > index 9ee4c1b735b2..e884d589378d 100644
> > > --- a/drivers/video/backlight/pwm_bl.c
> > > +++ b/drivers/video/backlight/pwm_bl.c
> > > @@ -250,7 +250,7 @@ static int pwm_backlight_parse_dt(struct device
> > > *dev,
> > >  	struct device_node *node = dev->of_node;
> > >  	unsigned int num_levels = 0;
> > >  	unsigned int levels_count;
> > > -	unsigned int num_steps;
> > > +	unsigned int num_steps = 0;
> > 
> > This can go. If we check the return code them this variable is no
> > longer
> > used uninitialized [I'm OK to make the change though... since you've
> > kept my name at the top ;-) ].
> 
> Yes, I confirm that this works for me. Are you gona send a proper patch
> out or should I do it?

I can send it out.


Daniel.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux