Re: [PATCH v3] of: refactor of_read_number for clarity

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

 



On Wed, Apr 29, 2020 at 12:58:04PM +0200, Ahmad Fatoum wrote:
> While the code is correct, less sophisticated static analyzers (and
> users operating them..) trip over it, because they don't see that
> the be32_to_cpu argument is evaluated multiple times only if it's
> constant. Moving the side effect out:
> 
> - Lets us avoid the false positive
> - Aligns us with what Linux does
> - Makes the code IMO a bit clearer
> 
> Do so.
> 
> Signed-off-by: Ahmad Fatoum <ahmad@xxxxxx>

Applied, thanks

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