Re: [PATCH 19/23] include: bitops: fix dead increment in fls() and ffs()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 11, 2020 at 09:21:36AM +0200, Ahmad Fatoum wrote:
> Static analyzers trip over this and a comment is as descriptive,
> thus replace the dead code.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
> ---
>  include/asm-generic/bitops/ffs.h | 2 +-
>  include/asm-generic/bitops/fls.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/asm-generic/bitops/ffs.h b/include/asm-generic/bitops/ffs.h
> index fbbb43af7dc0..afc2d7b2d19f 100644
> --- a/include/asm-generic/bitops/ffs.h
> +++ b/include/asm-generic/bitops/ffs.h
> @@ -32,7 +32,7 @@ static inline int ffs(int x)
>  		r += 2;
>  	}
>  	if (!(x & 1)) {
> -		x >>= 1;
> +		/* x >>= 1; */

I would rather just drop the dead code.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux