]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 31 Jan 2020 18:30:40 +0000 (10:30 -0800)
commit1b9d7cd9e2ef4fc7b2c582d7b8a7014fe5e95f77
tree4b954476bbc5e06322a1fb514238e066714d1121
parent630f976c42ee14dbd0db753687c5001147406e0f
uapi: rename ext2_swab() to swab() and share globally in swab.h

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>
include/linux/swab.h
include/uapi/linux/swab.h
lib/find_bit.c