Re: [PATCH 2/7] thermal: rcar_gen3_thermal: fix probe error path

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

 



Hi Wolfram,

Thanks for your feedback.

On 2017-03-07 20:52:03 +0100, Wolfram Sang wrote:
> On Mon, Mar 06, 2017 at 09:03:56PM +0100, Niklas Söderlund wrote:
> > If the memory resource for a TSC is unviable probe should fail not try
> > to go ahead with the remaining TSC. This fix is aligned with other
> > checks in probe where probe fails if they are unavailable.
> > 
> > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@xxxxxxxxxxxx>
> 
> I disagree. There are likely SoCs in the future which have less than
> TSC_MAX_NUM sensors (V3M shall have only 1 according to chapter 10C in
> v0.52 documentation). So, the code exits the loop for this case. We
> should move it before the devm_kzalloc(), however.

Ahh I did not think of that. I will drop this patch and instead do as 
you suggest move this before the devm_kzalloc().

> 
> That also means that you can't really iterate over TSC_MAX_NUM in later
> patches, but rather store the amount of instances in the main struct and
> iterate over that value.
> 

I will see how to best solve this, probably we need then to recoded in 
struct rcar_gen3_thermal_priv how many zones are in use so we can 
iterate over all active zones.

-- 
Regards,
Niklas Söderlund



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux