# 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/gcc-4.6.3-nolibc/sh4-linux/bin/sh4-linux-gcc --version # < /opt/cross/kisskb/gcc-4.6.3-nolibc/sh4-linux/bin/sh4-linux-ld --version # < git log --format=%s --max-count=1 0f1a7b3fac0583083ca19d4de47403511ced3521 # < make -s -j 8 ARCH=sh O=/kisskb/build/linus_se7724_defconfig_sh4 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/sh4-linux/bin/sh4-linux- se7724_defconfig # make -s -j 8 ARCH=sh O=/kisskb/build/linus_se7724_defconfig_sh4 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/sh4-linux/bin/sh4-linux- Generating include/generated/machtypes.h :1511:2: warning: #warning syscall clone3 not implemented [-Wcpp] /kisskb/src/arch/sh/kernel/cpu/sh4/../sh3/../../entry-common.S: Assembler messages: /kisskb/src/arch/sh/kernel/cpu/sh4/../sh3/../../entry-common.S:385: Warning: overflow in branch to syscall_exit_work; converted into longer instruction sequence /kisskb/src/arch/sh/kernel/cpu/sh4/../sh3/../../entry-common.S:388: Warning: overflow in branch to syscall_exit_work; converted into longer instruction sequence /kisskb/src/kernel/printk/printk.c: In function 'devkmsg_sysctl_set_loglvl': /kisskb/src/kernel/printk/printk.c:204:16: warning: 'old' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/kernel/rcu/srcutree.c: In function 'init_srcu_struct_fields': /kisskb/src/kernel/rcu/srcutree.c:121:34: warning: 'levelspread[]' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/kernel/rcu/srcutree.c:88:6: note: 'levelspread[]' was declared here /kisskb/src/drivers/base/regmap/regmap.c: In function 'regmap_raw_read': /kisskb/src/drivers/base/regmap/regmap.c:2591:6: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/base/regmap/regmap.c: In function '_regmap_raw_write': /kisskb/src/drivers/base/regmap/regmap.c:1852:6: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/sound/soc/soc-pcm.c: In function 'soc_pcm_trigger': /kisskb/src/sound/soc/soc-pcm.c:1074:5: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/sound/soc/soc-pcm.c: In function 'soc_pcm_bespoke_trigger': /kisskb/src/sound/soc/soc-pcm.c:1092:9: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /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 [-Wuninitialized] /kisskb/src/drivers/i2c/busses/i2c-sh_mobile.c:372:16: note: 'data' was declared here /kisskb/src/fs/proc/inode.c: In function 'proc_reg_open': /kisskb/src/include/linux/list.h:65:12: warning: 'pdeo' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/proc/inode.c:338:21: note: 'pdeo' was declared here /kisskb/src/drivers/sh/clk/cpg.c: In function 'r8': /kisskb/src/drivers/sh/clk/cpg.c:41:2: warning: passing argument 1 of 'ioread8' discards 'const' qualifier from pointer target type [enabled by default] /kisskb/src/include/asm-generic/iomap.h:29:21: note: expected 'void *' but argument is of type 'const void *' /kisskb/src/drivers/sh/clk/cpg.c: In function 'r16': /kisskb/src/drivers/sh/clk/cpg.c:46:2: warning: passing argument 1 of 'ioread16' discards 'const' qualifier from pointer target type [enabled by default] /kisskb/src/include/asm-generic/iomap.h:30:21: note: expected 'void *' but argument is of type 'const void *' /kisskb/src/drivers/sh/clk/cpg.c: In function 'r32': /kisskb/src/drivers/sh/clk/cpg.c:51:2: warning: passing argument 1 of 'ioread32' discards 'const' qualifier from pointer target type [enabled by default] /kisskb/src/include/asm-generic/iomap.h:32:21: note: expected 'void *' but argument is of type 'const void *' /kisskb/src/drivers/usb/core/devio.c: In function 'async_completed': /kisskb/src/drivers/usb/core/devio.c:625:23: warning: 'errno' may be used uninitialized in this function [-Wuninitialized] Image Name: Linux-5.4.0-rc1+ Created: Thu Oct 3 13:44:01 2019 Image Type: SuperH Linux Kernel Image (gzip compressed) Data Size: 3388968 Bytes = 3309.54 KiB = 3.23 MiB Load Address: 88001000 Entry Point: 88002000 Image arch/sh/boot/uImage is ready Completed OK # rm -rf /kisskb/build/linus_se7724_defconfig_sh4 # Build took: 0:01:04.406604