# git rev-parse -q --verify 0f1a7b3fac0583083ca19d4de47403511ced3521^{commit} 0f1a7b3fac0583083ca19d4de47403511ced3521 already have revision, skipping fetch # git checkout -q -f -B kisskb 0f1a7b3fac0583083ca19d4de47403511ced3521 # git clean -qxdf # < git log -1 # commit 0f1a7b3fac0583083ca19d4de47403511ced3521 # Author: Linus Torvalds # Date: Wed Oct 2 16:16:07 2019 -0700 # # timer-of: don't use conditional expression with mixed 'void' types # # Randy Dunlap reports on the sparse list that sparse warns about this # expression: # # of_irq->percpu ? free_percpu_irq(of_irq->irq, clkevt) : # free_irq(of_irq->irq, clkevt); # # and honestly, sparse is correct to warn. The return type of # free_percpu_irq() is 'void', while free_irq() returns a 'const void *' # that is the devname argument passed in to the request_irq(). # # You can't mix a void type with a non-void types in a conditional # expression according to the C standard. It so happens that gcc seems to # accept it - and the resulting type of the expression is void - but # there's really no reason for the kernel to have this kind of # non-standard expression with no real upside. # # The natural way to write that expression is with an if-statement: # # if (of_irq->percpu) # free_percpu_irq(of_irq->irq, clkevt); # else # free_irq(of_irq->irq, clkevt); # # which is more legible anyway. # # I'm not sure why that timer-of code seems to have this odd pattern. It # does the same at allocation time, but at least there the types match, # and it makes sense as an expression. # # Reported-by: Randy Dunlap # Signed-off-by: Linus Torvalds # < /opt/cross/kisskb/br-aarch64-glibc-2016.08-613-ge98b4dd/bin/aarch64-linux-gcc --version # < /opt/cross/kisskb/br-aarch64-glibc-2016.08-613-ge98b4dd/bin/aarch64-linux-ld --version # < git log --format=%s --max-count=1 0f1a7b3fac0583083ca19d4de47403511ced3521 # < make -s -j 10 ARCH=arm64 O=/kisskb/build/linus_arm64-defconfig_arm64-gcc5.4 CROSS_COMPILE=/opt/cross/kisskb/br-aarch64-glibc-2016.08-613-ge98b4dd/bin/aarch64-linux- defconfig arch/arm64/configs/defconfig:726:warning: symbol value 'm' invalid for REMOTEPROC # make -s -j 10 ARCH=arm64 O=/kisskb/build/linus_arm64-defconfig_arm64-gcc5.4 CROSS_COMPILE=/opt/cross/kisskb/br-aarch64-glibc-2016.08-613-ge98b4dd/bin/aarch64-linux- arch/arm64/Makefile:27: ld does not support --fix-cortex-a53-843419; kernel may be susceptible to erratum arch/arm64/Makefile:38: LSE atomics not supported by binutils arch/arm64/Makefile:62: CROSS_COMPILE_COMPAT not defined or empty, the compat vDSO will not be built In file included from /kisskb/src/include/linux/list.h:9:0, from /kisskb/src/include/linux/wait.h:7, from /kisskb/src/include/linux/wait_bit.h:8, from /kisskb/src/include/linux/fs.h:6, from /kisskb/src/fs/btrfs/send.c:7: /kisskb/src/fs/btrfs/send.c: In function 'process_extent': /kisskb/src/include/linux/kernel.h:37:33: warning: 'clone_src_i_size' may be used uninitialized in this function [-Wmaybe-uninitialized] #define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0) ^ /kisskb/src/fs/btrfs/send.c:5088:6: note: 'clone_src_i_size' was declared here u64 clone_src_i_size; ^ /kisskb/src/drivers/i2c/busses/i2c-sh_mobile.c: In function 'sh_mobile_i2c_isr': /kisskb/src/drivers/i2c/busses/i2c-sh_mobile.c:399:26: warning: 'data' may be used uninitialized in this function [-Wmaybe-uninitialized] pd->msg->buf[real_pos] = data; ^ /kisskb/src/drivers/i2c/busses/i2c-sh_mobile.c:372:16: note: 'data' was declared here unsigned char data; ^ In file included from /kisskb/src/include/linux/rwsem.h:16:0, from /kisskb/src/include/linux/notifier.h:15, from /kisskb/src/include/linux/clk.h:14, from /kisskb/src/drivers/tty/serial/sh-sci.c:24: /kisskb/src/drivers/tty/serial/sh-sci.c: In function 'sci_dma_rx_submit': /kisskb/src/include/linux/spinlock.h:288:3: warning: 'flags' may be used uninitialized in this function [-Wmaybe-uninitialized] _raw_spin_unlock_irqrestore(lock, flags); \ ^ /kisskb/src/drivers/tty/serial/sh-sci.c:1351:16: note: 'flags' was declared here unsigned long flags; ^ WARNING: "HYPERVISOR_platform_op" [vmlinux] is a static EXPORT_SYMBOL_GPL WARNING: "HYPERVISOR_platform_op" [vmlinux] is a static EXPORT_SYMBOL_GPL Completed OK # rm -rf /kisskb/build/linus_arm64-defconfig_arm64-gcc5.4 # Build took: 0:05:43.696926