hexagon: modify ffs() and fls() to return int
authorRandy Dunlap <rdunlap@infradead.org>
Sun, 22 Jul 2018 23:03:58 +0000 (16:03 -0700)
committerRichard Kuo <rkuo@codeaurora.org>
Tue, 11 Sep 2018 00:42:15 +0000 (19:42 -0500)
commit5c41aaad409c097cf1ef74f2c649fed994744ef5
tree0909717180f25a262f81ab138ab3501fff172ad1
parent200f351e27f014fcbf69b544b0b4b72aeaf45fd3
hexagon: modify ffs() and fls() to return int

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: Randy 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: Richard Kuo <rkuo@codeaurora.org>
arch/hexagon/include/asm/bitops.h