Re: [PATCH v3 3/6] iio: light: stk3310: Implement vdd and leda supplies

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

 



On Mon, 28 Oct 2024 12:37:14 -0400
Aren Moynihan <aren@xxxxxxxxxxxxxxxxx> wrote:

> On Mon, Oct 28, 2024 at 04:38:37PM +0200, Andy Shevchenko wrote:
> > On Mon, Oct 28, 2024 at 10:19:57AM -0400, Aren Moynihan wrote:  
> > > The vdd and leda supplies must be powered on for the chip to function
> > > and can be powered off during system suspend.
> > > 
> > > Co-developed-by: Ondrej Jirman <megi@xxxxxx>  
> > 
> > Missing SoB. Please, read Submitting Patches documentation for understanding
> > what has to be done here.
> >   
> > > Signed-off-by: Aren Moynihan <aren@xxxxxxxxxxxxxxxxx>  
> > 
> > ...
> >   
> > > Notes:
> > >     I'm not sure what the proper way to handle attribution for this patch
> > >     is. It was origionally based on a patch by Ondrej Jirman[1], but I have
> > >     rewritten a large portion if it. I have included a Co-developed-by tag
> > >     to indicate this, but haven't sent him this patch, so I'm not sure what
> > >     to do about a Signed-off-by.  
> > 
> > Ah, seems you already aware of this issue. So, either drop Co-developed-by
> > (and if you wish you may give a credit in a free form inside commit message)
> > or make sure you get his SoB tag.  
> 
> Alright, thanks for clarifying that.
> 
> > >  	mutex_init(&data->lock);  
> > 
> > Somewhere (in the previous patch?) you want to switch to devm_mutex_init().  
> 
> Good catch, it looks like that was being leaked before this refactor.
> Yeah that sounds like the right place, I'll include it in v4.
Not really on the leaking.  Take a look at the cleanup for devm_mutex_init().
It's debug only and not all that useful in most cases.

However, it is good to not assume that now we have a devm_mutex_init()
available that is easy to use.

> 
> > > +	ret = devm_regulator_bulk_get(&client->dev, ARRAY_SIZE(data->supplies),
> > > +				      data->supplies);
> > > +	if (ret)
> > > +		return dev_err_probe(&client->dev, ret, "get regulators failed\n");  
> >   
> > > +		return dev_err_probe(&client->dev, ret,
> > > +				     "regulator enable failed\n");  
> >   
> > > +	ret = devm_add_action_or_reset(&client->dev, stk3310_regulators_disable, data);
> > > +	if (ret)
> > > +		return dev_err_probe(&client->dev, ret,
> > > +				     "failed to register regulator cleanup\n");  
> > 
> > With
> > 
> > 	struct devuce *dev = &client->dev;
> > 
> > at the top of the function makes these and more lines neater.
> >   
> [snip]
> > 
> > While changing to RCT order here, it seems you have inconsistent approach
> > elsewhere (in your own patches!). Please, be consistent with chosen style.  
> 
> Sounds easy enough to fix, I'll include these in v4.
> 
> Thanks taking the time to review
>  - Aren





[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