commit | aea0b210077b192ef46aa93d9f518c08cf501fd9 | [log] [tgz] |
---|---|---|
author | Rasmus Villemoes <rasmus.villemoes@prevas.dk> | Fri Mar 13 01:06:38 2020 +0100 |
committer | Jagan Teki <jagan@amarulasolutions.com> | Wed Apr 29 01:44:35 2020 +0530 |
tree | 818c6604e5cb8757a1b7609b609d3d2f1af362be | |
parent | d8429a15c43b8058de50b783ebaad4c1e7b30e79 [diff] |
spi: use is_power_of_2 instead of hweight32 in spi_nor_write() hweight32 is a somewhat expensive way to check for power-of-2. Use the is_power_of_2 helper, which does the standard and cheap idiom foo&(foo-1)==0. add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-96 (-96) Function old new delta spi_nor_write 388 292 -96 Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Acked-by: Vignesh Raghavendra <vigneshr@ti.com> Acked-by: Jagan Teki <jagan@amarulasolutions.com>