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]
Message-ID: <558AD5B1.8030406@ti.com>
Date:	Wed, 24 Jun 2015 11:07:13 -0500
From:	Nishanth Menon <nm@...com>
To:	Grygorii Strashko <grygorii.strashko@...com>,
	Alexandre Belloni <alexandre.belloni@...e-electrons.com>,
	Alessandro Zummo <a.zummo@...ertech.it>
CC:	<linux-kernel@...r.kernel.org>, <rtc-linux@...glegroups.com>,
	<linux-omap@...r.kernel.org>,
	<linux-arm-kernel@...ts.infradead.org>, <balbi@...com>
Subject: Re: [PATCH V2 4/5] drivers/rtc/rtc-ds1307.c: Support optional wakeup
 interrupt source

On 06/24/2015 10:36 AM, Grygorii Strashko wrote:
> On 06/23/2015 07:15 PM, Nishanth Menon wrote:
[...]

>> +		ds1307->wakeirq = of_irq_get(node, 1);
>> +		if (ds1307->wakeirq <= 0) {
>> +			if (ds1307->wakeirq == -EPROBE_DEFER) {
>> +				err = ds1307->wakeirq;
>> +				goto exit;
>> +			}
>> +			ds1307->wakeirq = 0;
>> +			goto no_irq;
>> +		}
> 
> Might be above code could be done a little bit simpler?
> 
> 		err = of_irq_get(node, 1);
> 		if (err <= 0) {
> 			if (err == -EPROBE_DEFER)
> 				goto exit;
> 			goto no_irq;

I had considered it, but problem with this approach is that is err
does not get reset back to 0 and probe will fail as it flows through
the rest of the code.. which is not our intent.

> 		}
> 		ds1307->wakeirq = err;
> 





-- 
Regards,
Nishanth Menon
--
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