linux/include
Christian Borntraeger 467d12f5c7 include/uapi/linux/swab.h: fix userspace breakage, use __BITS_PER_LONG for swap
QEMU has a funny new build error message when I use the upstream kernel
headers:

      CC      block/file-posix.o
    In file included from /home/cborntra/REPOS/qemu/include/qemu/timer.h:4,
                     from /home/cborntra/REPOS/qemu/include/qemu/timed-average.h:29,
                     from /home/cborntra/REPOS/qemu/include/block/accounting.h:28,
                     from /home/cborntra/REPOS/qemu/include/block/block_int.h:27,
                     from /home/cborntra/REPOS/qemu/block/file-posix.c:30:
    /usr/include/linux/swab.h: In function `__swab':
    /home/cborntra/REPOS/qemu/include/qemu/bitops.h:20:34: error: "sizeof" is not defined, evaluates to 0 [-Werror=undef]
       20 | #define BITS_PER_LONG           (sizeof (unsigned long) * BITS_PER_BYTE)
          |                                  ^~~~~~
    /home/cborntra/REPOS/qemu/include/qemu/bitops.h:20:41: error: missing binary operator before token "("
       20 | #define BITS_PER_LONG           (sizeof (unsigned long) * BITS_PER_BYTE)
          |                                         ^
    cc1: all warnings being treated as errors
    make: *** [/home/cborntra/REPOS/qemu/rules.mak:69: block/file-posix.o] Error 1
    rm tests/qemu-iotests/socket_scm_helper.o

This was triggered by commit d5767057c9 ("uapi: rename ext2_swab() to
swab() and share globally in swab.h").  That patch is doing

  #include <asm/bitsperlong.h>

but it uses BITS_PER_LONG.

The kernel file asm/bitsperlong.h provide only __BITS_PER_LONG.

Let us use the __ variant in swap.h

Link: http://lkml.kernel.org/r/20200213142147.17604-1-borntraeger@de.ibm.com
Fixes: d5767057c9 ("uapi: rename ext2_swab() to swab() and share globally in swab.h")
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: 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>
Cc: Torsten Hilbrich <torsten.hilbrich@secunet.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-02-21 11:22:15 -08:00
..
acpi ACPICA: Introduce acpi_any_gpe_status_set() 2020-02-11 23:26:15 +01:00
asm-generic Microblaze patches for 5.6-rc1 2020-02-04 11:58:07 +00:00
clocksource clocksource/drivers/hyper-v: Untangle stimers and timesync from clocksources 2020-01-16 19:09:02 +01:00
crypto crypto: poly1305 - add new 32 and 64-bit generic versions 2020-01-16 15:18:12 +08:00
drm drm/amdgpu: fix doc by clarifying sched_list definition 2020-01-27 16:46:44 -05:00
dt-bindings ARM: SoC: late updates 2020-02-08 14:17:27 -08:00
keys
kunit kunit: allow kunit tests to be loaded as a module 2020-01-09 16:42:29 -07:00
kvm
linux y2038: remove unused time32 interfaces 2020-02-21 11:22:15 -08:00
math-emu
media
misc
net Just a few fixes: 2020-02-14 07:16:08 -08:00
pcmcia
ras
rdma RDMA/core: Make the entire API tree static 2020-01-30 16:28:52 -04:00
scsi block, scsi: final compat_ioctl cleanup 2020-01-10 00:14:46 -05:00
soc ARM: SoC-related driver updates 2020-02-08 14:04:19 -08:00
sound ASoC: Fixes for v5.6 2020-02-18 13:33:39 +01:00
target
trace ARM: SoC-related driver updates 2020-02-08 14:04:19 -08:00
uapi include/uapi/linux/swab.h: fix userspace breakage, use __BITS_PER_LONG for swap 2020-02-21 11:22:15 -08:00
vdso lib/vdso: Prepare for time namespace support 2020-01-14 12:20:57 +01:00
video
xen xen: branch for v5.6-rc1 2020-02-05 17:44:14 +00:00