uapi: rename ext2_swab() to swab() and share globally in swab.h
authorYury Norov <yury.norov@gmail.com>
Fri, 31 Jan 2020 06:16:40 +0000 (22:16 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Apr 2020 06:00:31 +0000 (08:00 +0200)
commit4eb9d5bc7065b263edb2afee53c5d6cdf2487164
tree10adb43348c59780f57bdeed09a228a3aa9a749d
parent2ee871239dbc8a25e0379c94894807d09d8db3fd
uapi: rename ext2_swab() to swab() and share globally in swab.h

[ Upstream commit d5767057c9a76a29f073dad66b7fa12a90e8c748 ]

ext2_swab() is defined locally in lib/find_bit.c However it is not
specific to ext2, neither to bitmaps.

There are many potential users of it, so rename it to just swab() and
move to include/uapi/linux/swab.h

ABI guarantees that size of unsigned long corresponds to BITS_PER_LONG,
therefore drop unneeded cast.

Link: http://lkml.kernel.org/r/20200103202846.21616-1-yury.norov@gmail.com
Signed-off-by: Yury Norov <yury.norov@gmail.com>
Cc: Allison Randal <allison@lohutok.net>
Cc: Joe Perches <joe@perches.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: William Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/swab.h
include/uapi/linux/swab.h
lib/find_bit.c