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:	Wed, 4 Feb 2015 16:19:33 +0000
From:	Hartley Sweeten <HartleyS@...ionengravers.com>
To:	Ian Abbott <abbotti@....co.uk>,
	Nicholas Mc Guire <hofrat@...dl.org>
CC:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH RFC] staging: comedi: dt282x: condition with no effect -
 if identical to else

On Tuesday, February 03, 2015 8:13 AM, Ian Abbott wrote:
> On 03/02/15 12:38, Nicholas Mc Guire wrote:
>> The if and the else branch code are identical - so the condition has no
>> effect on the effective code - this patch removes the condition and the
>> duplicated code.
>>
>> Signed-off-by: Nicholas Mc Guire <hofrat@...dl.org>
>> ---
>>
>> The if and else branch are identical code thus the condition has no effect
>>
>>      if (cmd->scan_begin_src == TRIG_FOLLOW) {
>>              /* internal trigger */
>>              err |= cfc_check_trigger_arg_is(&cmd->scan_begin_arg, 0);
>>      } else {
>>              /* external trigger */
>>              /* should be level/edge, hi/lo specification here */
>>              err |= cfc_check_trigger_arg_is(&cmd->scan_begin_arg, 0);
>>      }
>>
> I think what that comment means is that it should allow scan_begin_arg 
> to have various combinations of the CR_EDGE and CR_INVERT bits set. 
> I.e. it ought to allow whatever combination of CR_EDGE and CR_INVERT 
> better describes the nature of the external trigger signal, in addition 
> to allowing the lazy default value 0.
>
> I don't know what the nature of the external trigger signal is, as I 
> haven't seen the manual.  I think Hartley might have seen one.

According to the manual, the external trigger is not "programmable". It's
a Schmitt trigger input, enables on TTL logic low, with a 22K pullup.

Since the 'scan_begin_arg' is not actually used for the analog input async
command, I think removing the comments completely is fine. Just change
the check to:

	err |= cfc_check_trigger_arg_is(&cmd->scan_begin_arg, 0);

Regards,
Hartley

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