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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 15 Jan 2015 11:19:21 -0800
From:	Jonathan Richardson <jonathar@...adcom.com>
To:	Florian Fainelli <f.fainelli@...il.com>
CC:	Joe Perches <joe@...ches.com>, <devicetree@...r.kernel.org>,
	Ray Jui <rjui@...adcom.com>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	<linux-kernel@...r.kernel.org>, Rob Herring <robh+dt@...nel.org>,
	<bcm-kernel-feedback-list@...adcom.com>,
	<linux-input@...r.kernel.org>,
	Grant Likely <grant.likely@...aro.org>,
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v2 1/2] Input: touchscreen-iproc: Add Broadcom iProc touchscreen
 driver

On 15-01-14 05:08 PM, Florian Fainelli wrote:
> On 19/12/14 15:03, Jonathan Richardson wrote:
>> On 14-12-19 02:26 PM, Joe Perches wrote:
>>> On Fri, 2014-12-19 at 14:17 -0800, Jonathan Richardson wrote:
>>>> Add initial version of the Broadcom touchscreen driver.
>>>
>>> more trivia:
>>>
>>>> diff --git a/drivers/input/touchscreen/bcm_iproc_tsc.c b/drivers/input/touchscreen/bcm_iproc_tsc.c
>>> []
>>>> +static int get_tsc_config(struct device_node *np, struct iproc_ts_priv *priv)
>>>> +{
>>>> +	u32 val;
>>> []
>>>> +	if (of_property_read_u32(np, "debounce_timeout", &val) >= 0) {
>>>> +		if (val < 0 || val > 255) {
>>>> +			dev_err(dev, "debounce_timeout must be [0-255]\n");
>>>> +			return -EINVAL;
>>>> +		}
>>>> +		priv->cfg_params.debounce_timeout = val;
> 
> BTW, common practice for DT properties is to use a dash instead of an
> underscore for multi-worded properties.

ts-rotation is done that way already so I'll change the others to be
consistent. Thanks.

> 
>>>
>>> Doesn't the compiler generate a warning message
>>> about an impossible "unsigned < 0" test for all
>>> of these "val < 0" uses?
>>>
>>
>> Actually no it doesn't. The gcc output shows that neither -Wtype-limits
>> nor -Wextra are used to compile that file. I assume this is because
>> there would be just too many warnings.
>>
>>
>>>> +	}
>>>> +
>>>> +	if (of_property_read_u32(np, "settling_timeout", &val) >= 0) {
>>>> +		if (val < 0 || val > 11) {
>>> []
>>>> +	if (of_property_read_u32(np, "touch_timeout", &val) >= 0) {
>>>> +		if (val < 0 || val > 255) {
>>> []
>>>> +	if (of_property_read_u32(np, "average_data", &val) >= 0) {
>>>> +		if (val < 0 || val > 8) {
>>> []
>>>> +	if (of_property_read_u32(np, "fifo_threshold", &val) >= 0) {
>>>> +		if (val < 0 || val > 31) {
>>>
>>>
>>
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel@...ts.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>>
> 
> 

--
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