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] [day] [month] [year] [list]
Date:	Wed, 04 Feb 2015 17:48:28 +0000
From:	Ian Abbott <abbotti@....co.uk>
To:	Nicholas Mc Guire <hofrat@...dl.org>
CC:	H Hartley Sweeten <hsweeten@...ionengravers.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] staging: comedi: dt282x: condition with no effect
 - if identical to else

On 04/02/15 17:02, 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>
> ---
>
> v2: Review notes from Ian Abbott <abbotti@....co.uk> and Hartley Sweeten
>      <HartleyS@...ionengravers.com> confirm that the condition is not
>      needed and, as suggested, the misleading comment is completely removed.
>
> Patch was only compile tested for x86_64_defconfig + CONFIG_STAGING=y
> CONFIG_COMEDI=m, COMEDI_ISA_DRIVERS=y, CONFIG_COMEDI_DT282X=m
>
> Patch is against 3.19.0-rc7 (localversion = -next-20150204)
>
>   drivers/staging/comedi/drivers/dt282x.c |    9 +--------
>   1 file changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/dt282x.c b/drivers/staging/comedi/drivers/dt282x.c
> index 051dfb2..db21d21 100644
> --- a/drivers/staging/comedi/drivers/dt282x.c
> +++ b/drivers/staging/comedi/drivers/dt282x.c
> @@ -685,14 +685,7 @@ static int dt282x_ai_cmdtest(struct comedi_device *dev,
>
>   	err |= cfc_check_trigger_arg_is(&cmd->start_arg, 0);
>
> -	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);
> -	}
> +	err |= cfc_check_trigger_arg_is(&cmd->scan_begin_arg, 0);
>
>   	err |= cfc_check_trigger_arg_min(&cmd->convert_arg, 4000);
>
>

Reviewed-by: Ian Abbott <abbotti@....co.uk>

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@....co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-
--
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