Linux Warning Report - 5.6-rc3

From: Zzy Wysm
Date: Mon Feb 24 2020 - 19:18:01 EST


As of Linux 5.6-rc3, the defconfig still builds with 33 warnings.

Can we get it down to zero by the time 5.6 ships?

zzy


zzy@esquivalience:~/linux-5.6-rc3$ make -j4 KCFLAGS="-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers" > build_log_5.6-rc3
kernel/time/hrtimer.c:120:21: warning: initialized field overwritten [-Woverride-init]
[CLOCK_REALTIME] = HRTIMER_BASE_REALTIME,
^~~~~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:120:21: note: (near initialization for âhrtimer_clock_to_base_table[0]â)
kernel/time/hrtimer.c:121:22: warning: initialized field overwritten [-Woverride-init]
[CLOCK_MONOTONIC] = HRTIMER_BASE_MONOTONIC,
^~~~~~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:121:22: note: (near initialization for âhrtimer_clock_to_base_table[1]â)
kernel/time/hrtimer.c:122:21: warning: initialized field overwritten [-Woverride-init]
[CLOCK_BOOTTIME] = HRTIMER_BASE_BOOTTIME,
^~~~~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:122:21: note: (near initialization for âhrtimer_clock_to_base_table[7]â)
kernel/time/hrtimer.c:123:17: warning: initialized field overwritten [-Woverride-init]
[CLOCK_TAI] = HRTIMER_BASE_TAI,
^~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:123:17: note: (near initialization for âhrtimer_clock_to_base_table[11]â)
In file included from kernel/bpf/core.c:21:
kernel/bpf/core.c: In function â___bpf_prog_runâ:
./include/linux/filter.h:863:3: warning: cast between incompatible function types from âu64 (*)(u64, u64, u64, u64, u64)â {aka âlong long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)â} to âu64 (*)(u64, u64, u64, u64, u64, const struct bpf_insn *)â {aka âlong long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, const struct bpf_insn *)â} [-Wcast-function-type]
((u64 (*)(u64, u64, u64, u64, u64, const struct bpf_insn *)) \
^
kernel/bpf/core.c:1513:13: note: in expansion of macro â__bpf_call_base_argsâ
BPF_R0 = (__bpf_call_base_args + insn->imm)(BPF_R1, BPF_R2,
^~~~~~~~~~~~~~~~~~~~
kernel/bpf/core.c: In function âbpf_patch_call_argsâ:
./include/linux/filter.h:863:3: warning: cast between incompatible function types from âu64 (*)(u64, u64, u64, u64, u64)â {aka âlong long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)â} to âu64 (*)(u64, u64, u64, u64, u64, const struct bpf_insn *)â {aka âlong long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, const struct bpf_insn *)â} [-Wcast-function-type]
((u64 (*)(u64, u64, u64, u64, u64, const struct bpf_insn *)) \
^
kernel/bpf/core.c:1704:3: note: in expansion of macro â__bpf_call_base_argsâ
__bpf_call_base_args;
^~~~~~~~~~~~~~~~~~~~
kernel/trace/blktrace.c: In function â__trace_note_messageâ:
kernel/trace/blktrace.c:145:63: warning: parameter âblkcgâ set but not used [-Wunused-but-set-parameter]
void __trace_note_message(struct blk_trace *bt, struct blkcg *blkcg,
~~~~~~~~~~~~~~^~~~~
arch/x86/kernel/jump_label.c:61:1: warning: âinlineâ is not at beginning of declaration [-Wold-style-declaration]
static void inline __jump_label_transform(struct jump_entry *entry,
^~~~~~
In file included from ./include/linux/capability.h:16,
from security/commoncap.c:5:
security/commoncap.c: In function âcap_prctl_dropâ:
./include/uapi/linux/capability.h:373:27: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
#define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP)
^~
security/commoncap.c:1145:7: note: in expansion of macro âcap_validâ
if (!cap_valid(cap))
^~~~~~~~~
security/commoncap.c: In function âcap_task_prctlâ:
./include/uapi/linux/capability.h:373:27: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
#define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP)
^~
security/commoncap.c:1175:8: note: in expansion of macro âcap_validâ
if (!cap_valid(arg2))
^~~~~~~~~
./include/uapi/linux/capability.h:373:27: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
#define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP)
^~
security/commoncap.c:1260:10: note: in expansion of macro âcap_validâ
if (((!cap_valid(arg3)) | arg4 | arg5))
^~~~~~~~~
drivers/video/fbdev/core/fbmon.c: In function âget_monspecsâ:
drivers/video/fbdev/core/fbmon.c:812:47: warning: suggest braces around empty body in an âifâ statement [-Wempty-body]
DPRINTK(" Configurable signal level\n");
^
drivers/video/fbdev/core/fbmon.c:842:24: warning: suggest braces around empty body in an âelseâ statement [-Wempty-body]
DPRINTK("variable\n");
^
drivers/video/fbdev/core/fbmon.c:847:24: warning: suggest braces around empty body in an âelseâ statement [-Wempty-body]
DPRINTK("variable\n");
^
drivers/tty/vt/keyboard.c: In function âk_fnâ:
drivers/tty/vt/keyboard.c:740:22: warning: comparison is always true due to limited range of data type [-Wtype-limits]
if ((unsigned)value < ARRAY_SIZE(func_table)) {
^
drivers/acpi/scan.c: In function âacpi_bus_get_wakeup_device_flagsâ:
drivers/acpi/scan.c:903:43: warning: suggest braces around empty body in an âifâ statement [-Wempty-body]
"error in _DSW or _PSW evaluation\n"));
^
drivers/acpi/acpi_processor.c: In function âacpi_processor_errata_piix4â:
drivers/acpi/acpi_processor.c:133:67: warning: suggest braces around empty body in an âifâ statement [-Wempty-body]
"Bus master activity detection (BM-IDE) erratum enabled\n"));
^
drivers/acpi/acpi_processor.c:136:54: warning: suggest braces around empty body in an âifâ statement [-Wempty-body]
"Type-F DMA livelock erratum (C3 disabled)\n"));
^
drivers/acpi/acpi_processor.c: In function âacpi_processor_get_infoâ:
drivers/acpi/acpi_processor.c:251:49: warning: suggest braces around empty body in an âelseâ statement [-Wempty-body]
"No bus mastering arbitration control\n"));
^
drivers/acpi/processor_pdc.c: In function âacpi_processor_eval_pdcâ:
drivers/acpi/processor_pdc.c:136:65: warning: suggest braces around empty body in an âifâ statement [-Wempty-body]
"Could not evaluate _PDC, using legacy perf. control.\n"));
^
fs/posix_acl.c: In function âget_aclâ:
fs/posix_acl.c:127:22: warning: suggest braces around empty body in an âifâ statement [-Wempty-body]
/* fall through */ ;
^
lib/errname.c:15:67: warning: initialized field overwritten [-Woverride-init]
#define E(err) [err + BUILD_BUG_ON_ZERO(err <= 0 || err > 300)] = "-" #err
^~~
lib/errname.c:172:2: note: in expansion of macro âEâ
E(EDEADLK), /* EDEADLOCK */
^
lib/errname.c:15:67: note: (near initialization for ânames_0[35]â)
#define E(err) [err + BUILD_BUG_ON_ZERO(err <= 0 || err > 300)] = "-" #err
^~~
lib/errname.c:172:2: note: in expansion of macro âEâ
E(EDEADLK), /* EDEADLOCK */
^
lib/radix-tree.c: In function âset_iter_tagsâ:
lib/radix-tree.c:1134:15: warning: comparison is always false due to limited range of data type [-Wtype-limits]
if (tag_long < RADIX_TREE_TAG_LONGS - 1) {
^
drivers/scsi/sr.c:691:12: warning: initialized field overwritten [-Woverride-init]
.ioctl = sr_block_compat_ioctl,
^~~~~~~~~~~~~~~~~~~~~
drivers/scsi/sr.c:691:12: note: (near initialization for âsr_bdops.ioctlâ)
In file included from drivers/ata/ahci.c:35:
drivers/ata/ahci.h:384:16: warning: initialized field overwritten [-Woverride-init]
.can_queue = AHCI_MAX_CMDS, \
^~~~~~~~~~~~~
drivers/ata/ahci.c:103:2: note: in expansion of macro âAHCI_SHTâ
AHCI_SHT("ahci"),
^~~~~~~~
drivers/ata/ahci.h:384:16: note: (near initialization for âahci_sht.can_queueâ)
.can_queue = AHCI_MAX_CMDS, \
^~~~~~~~~~~~~
drivers/ata/ahci.c:103:2: note: in expansion of macro âAHCI_SHTâ
AHCI_SHT("ahci"),
^~~~~~~~
drivers/ata/ahci.h:388:17: warning: initialized field overwritten [-Woverride-init]
.sdev_attrs = ahci_sdev_attrs
^~~~~~~~~~~~~~~
drivers/ata/ahci.c:103:2: note: in expansion of macro âAHCI_SHTâ
AHCI_SHT("ahci"),
^~~~~~~~
drivers/ata/ahci.h:388:17: note: (near initialization for âahci_sht.sdev_attrsâ)
.sdev_attrs = ahci_sdev_attrs
^~~~~~~~~~~~~~~
drivers/ata/ahci.c:103:2: note: in expansion of macro âAHCI_SHTâ
AHCI_SHT("ahci"),
^~~~~~~~
drivers/usb/core/sysfs.c: In function âusb_create_sysfs_intf_filesâ:
drivers/usb/core/sysfs.c:1266:3: warning: suggest braces around empty body in an âifâ statement [-Wempty-body]
; /* We don't actually care if the function fails. */
^
drivers/input/mouse/synaptics.c: In function âsynaptics_process_packetâ:
drivers/input/mouse/synaptics.c:1105:6: warning: suggest braces around empty body in an âifâ statement [-Wempty-body]
; /* Nothing, treat a pen as a single finger */
^
drivers/md/md.c: In function âbind_rdev_to_arrayâ:
drivers/md/md.c:2438:27: warning: suggest braces around empty body in an âifâ statement [-Wempty-body]
/* failure here is OK */;
^
drivers/md/md.c: In function âslot_storeâ:
drivers/md/md.c:3200:28: warning: suggest braces around empty body in an âifâ statement [-Wempty-body]
/* failure here is OK */;
^
drivers/md/md.c: In function âremove_and_add_sparesâ:
drivers/md/md.c:9045:29: warning: suggest braces around empty body in an âifâ statement [-Wempty-body]
/* failure here is OK */;
^
drivers/hid/hid-lgff.c: In function âhid_lgff_playâ:
drivers/hid/hid-lgff.c:65:24: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
#define CLAMP(x) if (x < 0) x = 0; if (x > 0xff) x = 0xff
^
drivers/hid/hid-lgff.c:86:3: note: in expansion of macro âCLAMPâ
CLAMP(left);
^~~~~
drivers/hid/hid-lgff.c:65:24: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
#define CLAMP(x) if (x < 0) x = 0; if (x > 0xff) x = 0xff
^
drivers/hid/hid-lgff.c:87:3: note: in expansion of macro âCLAMPâ
CLAMP(right);
^~~~~