[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <53F081E2.5060207@mev.co.uk>
Date: Sun, 17 Aug 2014 11:20:18 +0100
From: Ian Abbott <abbotti@....co.uk>
To: Chase Southwood <chase.southwood@...il.com>,
<gregkh@...uxfoundation.org>
CC: <hsweeten@...ionengravers.com>, <devel@...verdev.osuosl.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/3] staging: comedi: dt3000: remove unneeded variable
On 17/08/14 05:26, Chase Southwood wrote:
> Coccinelle (using scripts/coccinelle/tests/doublebitand.cocci) found this
> assignment because 0 is or'd twice. Upon inspection, I found that the
> variable "mode" is only assigned once and used once, and thus can be
> cleanly removed. This patch plugs its value straight into writew() and
> then removes the variable.
>
> Signed-off-by: Chase Southwood <chase.southwood@...il.com>
> Cc: Ian Abbott <abbotti@....co.uk>
> Cc: H Hartley Sweeten <hsweeten@...ionengravers.com>
> ---
> It occurred to me while doing this that zero might be or'd twice to
> indicate "no information" in order to maintain some three-part structure
> used elsewhere. If this is the case, I think that the variable could
> still be removed and the "| 0 | 0" could be added to the writew().
>
> drivers/staging/comedi/drivers/dt3000.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
This shouldn't be in the same series as the other two patches, but never
mind.
Reviewed-by: Ian Abbott <abbotti@....co.uk>
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@....co.uk> )=-
-=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-
--
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