• Randy Dunlap's avatar
    hexagon: modify ffs() and fls() to return int · 7a2df42a
    Randy Dunlap authored
    [ Upstream commit 5c41aaad409c097cf1ef74f2c649fed994744ef5 ]
    
    Building drivers/mtd/nand/raw/nandsim.c on arch/hexagon/ produces a
    printk format build warning.  This is due to hexagon's ffs() being
    coded as returning long instead of int.
    
    Fix the printk format warning by changing all of hexagon's ffs() and
    fls() functions to return int instead of long.  The variables that
    they return are already int instead of long.  This return type
    matches the return type in <asm-generic/bitops/>.
    
    ../drivers/mtd/nand/raw/nandsim.c: In function 'init_nandsim':
    ../drivers/mtd/nand/raw/nandsim.c:760:2: warning: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'long int' [-Wformat]
    
    There are no ffs() or fls() allmodconfig build errors after making this
    change.
    Signed-off-by: 's avatarRandy Dunlap <rdunlap@infradead.org>
    Cc: Richard Kuo <rkuo@codeaurora.org>
    Cc: linux-hexagon@vger.kernel.org
    Cc: Geert Uytterhoeven <geert@linux-m68k.org>
    Patch-mainline: linux-kernel @ 07/22/2018, 16:03
    Signed-off-by: 's avatarRichard Kuo <rkuo@codeaurora.org>
    Signed-off-by: 's avatarSasha Levin <alexander.levin@microsoft.com>
    Signed-off-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    7a2df42a
Name
Last commit
Last update
..
configs Loading commit data...
include Loading commit data...
kernel Loading commit data...
lib Loading commit data...
mm Loading commit data...
Kconfig Loading commit data...
Makefile Loading commit data...