Re: [PATCH v5 1/4] thermal: rockchip: add driver for Thermal

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

 



Hi Caesar,

On Thu, Sep 18, 2014 at 04:31:24PM +0800, Caesar Wang wrote:
> Dear Dmitry,
> 
> 
> 在 2014年09月18日 01:02, Dmitry Torokhov 写道:
> >Hi Caesar,
> >
> >On Wed, Sep 17, 2014 at 11:59:10AM +0800, Caesar Wang wrote:
> >>+{
> >>+	int i;
> >>+
> >>+	for (i = 0; i < ARRAY_SIZE(v2_code_table) - 1; i++) {
> >>+		if (code >= v2_code_table[i].code)
> >>+			return v2_code_table[i].temp;
> >>+	}
> >>+
> >>+	return 0;
> >I think if we do not find the code we should be returning max
> >temperature, not 0.
> Agree.
> >And also WARN_ON() as this should not be happening.
> >
> Maybe,I will fix it as the follows:
> 
> pr_warn("Don't find code from v2_code_table\n");
> return 125;
> 
> Do you agree?

Sounds good.

Thanks.

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




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux