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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 18 Sep 2014 10:02:49 -0700
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Caesar Wang <caesar.wang@...k-chips.com>
Cc:	heiko@...ech.de, rui.zhang@...el.com, edubezval@...il.com,
	arnd@...db.de, linux-kernel@...r.kernel.org,
	linux-pm@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	devicetree@...r.kernel.org, linux-doc@...r.kernel.org,
	huangtao@...k-chips.com, cf@...k-chips.com, dianders@...omium.org,
	addy.ke@...k-chips.com, zyf@...k-chips.com, cjf@...k-chips.com,
	钟勇汪 <zyw@...k-chips.com>,
	zhengsq@...k-chips.com
Subject: Re: [PATCH v5 1/4] thermal: rockchip: add driver for Thermal

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-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ