Revision 467d12f5c7842896d2de3ced74e4147ee29e97c8 authored by Christian Borntraeger on 21 February 2020, 04:04:03 UTC, committed by Linus Torvalds on 21 February 2020, 19:22:15 UTC
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 d5767057c9a ("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: d5767057c9a ("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>
1 parent edf28f4
History
File Mode Size
partitions
Kconfig -rw-r--r-- 6.3 KB
Kconfig.iosched -rw-r--r-- 1.4 KB
Makefile -rw-r--r-- 1.6 KB
badblocks.c -rw-r--r-- 14.1 KB
bfq-cgroup.c -rw-r--r-- 37.7 KB
bfq-iosched.c -rw-r--r-- 236.5 KB
bfq-iosched.h -rw-r--r-- 36.7 KB
bfq-wf2q.c -rw-r--r-- 52.6 KB
bio-integrity.c -rw-r--r-- 12.3 KB
bio.c -rw-r--r-- 55.3 KB
blk-cgroup-rwstat.c -rw-r--r-- 3.4 KB
blk-cgroup-rwstat.h -rw-r--r-- 3.9 KB
blk-cgroup.c -rw-r--r-- 44.3 KB
blk-core.c -rw-r--r-- 48.7 KB
blk-exec.c -rw-r--r-- 2.6 KB
blk-flush.c -rw-r--r-- 15.0 KB
blk-integrity.c -rw-r--r-- 11.6 KB
blk-ioc.c -rw-r--r-- 10.2 KB
blk-iocost.c -rw-r--r-- 67.1 KB
blk-iolatency.c -rw-r--r-- 28.0 KB
blk-lib.c -rw-r--r-- 10.2 KB
blk-map.c -rw-r--r-- 6.0 KB
blk-merge.c -rw-r--r-- 24.6 KB
blk-mq-cpumap.c -rw-r--r-- 2.2 KB
blk-mq-debugfs-zoned.c -rw-r--r-- 435 bytes
blk-mq-debugfs.c -rw-r--r-- 24.4 KB
blk-mq-debugfs.h -rw-r--r-- 2.7 KB
blk-mq-pci.c -rw-r--r-- 1.3 KB
blk-mq-rdma.c -rw-r--r-- 1.3 KB
blk-mq-sched.c -rw-r--r-- 14.1 KB
blk-mq-sched.h -rw-r--r-- 2.5 KB
blk-mq-sysfs.c -rw-r--r-- 8.4 KB
blk-mq-tag.c -rw-r--r-- 15.0 KB
blk-mq-tag.h -rw-r--r-- 2.2 KB
blk-mq-virtio.c -rw-r--r-- 1.3 KB
blk-mq.c -rw-r--r-- 88.4 KB
blk-mq.h -rw-r--r-- 7.6 KB
blk-pm.c -rw-r--r-- 6.6 KB
blk-pm.h -rw-r--r-- 1.4 KB
blk-rq-qos.c -rw-r--r-- 7.1 KB
blk-rq-qos.h -rw-r--r-- 5.0 KB
blk-settings.c -rw-r--r-- 28.0 KB
blk-softirq.c -rw-r--r-- 3.7 KB
blk-stat.c -rw-r--r-- 4.6 KB
blk-stat.h -rw-r--r-- 4.6 KB
blk-sysfs.c -rw-r--r-- 26.3 KB
blk-throttle.c -rw-r--r-- 69.2 KB
blk-timeout.c -rw-r--r-- 3.8 KB
blk-wbt.c -rw-r--r-- 19.9 KB
blk-wbt.h -rw-r--r-- 2.9 KB
blk-zoned.c -rw-r--r-- 12.3 KB
blk.h -rw-r--r-- 10.7 KB
bounce.c -rw-r--r-- 9.3 KB
bsg-lib.c -rw-r--r-- 9.8 KB
bsg.c -rw-r--r-- 11.1 KB
cmdline-parser.c -rw-r--r-- 4.9 KB
elevator.c -rw-r--r-- 18.9 KB
genhd.c -rw-r--r-- 50.7 KB
ioctl.c -rw-r--r-- 19.5 KB
ioprio.c -rw-r--r-- 5.1 KB
kyber-iosched.c -rw-r--r-- 27.8 KB
mq-deadline.c -rw-r--r-- 20.6 KB
opal_proto.h -rw-r--r-- 9.3 KB
partition-generic.c -rw-r--r-- 15.9 KB
scsi_ioctl.c -rw-r--r-- 22.7 KB
sed-opal.c -rw-r--r-- 62.4 KB
t10-pi.c -rw-r--r-- 7.8 KB

back to top