tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 69cb6c6556ad89620547318439d6be8bb1629a5a commit: eff5cdd745a68863a73095b0b4d62d15e0d9d902 gpio: virtio: Add IRQ support date: 8 months ago config: arm-randconfig-c002-20220629 compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project a9119143a2d1f4d0d0bc1fe0d819e5351b4e0deb) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install arm cross compiling tool for clang build # apt-get install binutils-arm-linux-gnueabi # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=eff5cdd745a68863a73095b0b4d62d15e0d9d902 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout eff5cdd745a68863a73095b0b4d62d15e0d9d902 # save the config file COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm clang-analyzer If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot clang-analyzer warnings: (new ones prefixed by >>) drivers/clk/clk-cdce706.c:313:43: note: Left side of '&&' is true drivers/clk/clk-cdce706.c:314:8: note: Assuming the condition is false div <= CDCE706_PLL_FREQ_MAX / rate; ++div) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/clk/clk-cdce706.c:313:3: note: Loop condition is false. Execution continues on line 342 for (div = CDCE706_PLL_FREQ_MIN / rate; best_diff && ^ drivers/clk/clk-cdce706.c:342:3: note: The value 0 is assigned to 'div' div = best_div; ^~~~~~~~~~~~~~ drivers/clk/clk-cdce706.c:344:3: note: Taking false branch dev_dbg(&hwd->dev_data->client->dev, ^ include/linux/dev_printk.h:162:2: note: expanded from macro 'dev_dbg' if (0) \ ^ drivers/clk/clk-cdce706.c:351:2: note: Taking false branch dev_dbg(&hwd->dev_data->client->dev, ^ include/linux/dev_printk.h:162:2: note: expanded from macro 'dev_dbg' if (0) \ ^ drivers/clk/clk-cdce706.c:355:22: note: Division by zero return *parent_rate / div; ~~~~~~~~~~~~~^~~~~ Suppressed 1 warnings (1 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 2 warnings generated. crypto/pcbc.c:74:10: warning: Although the value stored to 'nbytes' is used in the enclosing expression, the value is never actually read from 'nbytes' [clang-analyzer-deadcode.DeadStores] while ((nbytes = walk.nbytes)) { ^ ~~~~~~~~~~~ crypto/pcbc.c:74:10: note: Although the value stored to 'nbytes' is used in the enclosing expression, the value is never actually read from 'nbytes' while ((nbytes = walk.nbytes)) { ^ ~~~~~~~~~~~ crypto/pcbc.c:141:10: warning: Although the value stored to 'nbytes' is used in the enclosing expression, the value is never actually read from 'nbytes' [clang-analyzer-deadcode.DeadStores] while ((nbytes = walk.nbytes)) { ^ ~~~~~~~~~~~ crypto/pcbc.c:141:10: note: Although the value stored to 'nbytes' is used in the enclosing expression, the value is never actually read from 'nbytes' while ((nbytes = walk.nbytes)) { ^ ~~~~~~~~~~~ 1 warning generated. include/asm-generic/bitops/non-atomic.h:22:6: warning: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage [clang-analyzer-core.uninitialized.Assign] *p |= mask; ^ crypto/lrw.c:82:6: note: Assuming 'err' is 0 if (err) ^~~ crypto/lrw.c:82:2: note: Taking false branch if (err) ^ crypto/lrw.c:85:6: note: Assuming field 'table' is null if (ctx->table) ^~~~~~~~~~ crypto/lrw.c:85:2: note: Taking false branch if (ctx->table) ^ crypto/lrw.c:90:6: note: Assuming field 'table' is non-null if (!ctx->table) ^~~~~~~~~~~ crypto/lrw.c:90:2: note: Taking false branch if (!ctx->table) ^ crypto/lrw.c:94:2: note: Loop condition is true. Entering loop body for (i = 0; i < 128; i++) { ^ crypto/lrw.c:95:3: note: Calling 'lrw_setbit128_bbe' lrw_setbit128_bbe(&tmp, i); ^~~~~~~~~~~~~~~~~~~~~~~~~~ crypto/lrw.c:59:2: note: Calling 'arch___set_bit' __set_bit(bit ^ (0x80 - ^ include/asm-generic/bitops/non-atomic.h:24:19: note: expanded from macro '__set_bit' #define __set_bit arch___set_bit ^ include/asm-generic/bitops/non-atomic.h:22:6: note: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage *p |= mask; ~~ ^ 1 warning generated. drivers/pwm/pwm-atmel.c:275:16: warning: Value stored to 'timeout' during its initialization is never read [clang-analyzer-deadcode.DeadStores] unsigned long timeout = jiffies + 2 * HZ; ^~~~~~~ ~~~~~~~~~~~~~~~~ drivers/pwm/pwm-atmel.c:275:16: note: Value stored to 'timeout' during its initialization is never read unsigned long timeout = jiffies + 2 * HZ; ^~~~~~~ ~~~~~~~~~~~~~~~~ 1 warning generated. Suppressed 1 warnings (1 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 1 warning generated. Suppressed 1 warnings (1 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 1 warning generated. Suppressed 1 warnings (1 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 2 warnings generated. drivers/gpio/gpio-virtio.c:24:8: warning: Excessive padding in 'struct virtio_gpio_line' (58 padding bytes, where 26 is optimal). Optimal fields order: res, rxlen, lock, completion, req, consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding] struct virtio_gpio_line { ~~~~~~~^~~~~~~~~~~~~~~~~~ drivers/gpio/gpio-virtio.c:24:8: note: Excessive padding in 'struct virtio_gpio_line' (58 padding bytes, where 26 is optimal). Optimal fields order: res, rxlen, lock, completion, req, consider reordering the fields or adding explicit padding members struct virtio_gpio_line { ~~~~~~~^~~~~~~~~~~~~~~~~~ >> drivers/gpio/gpio-virtio.c:32:8: warning: Excessive padding in 'struct vgpio_irq_line' (87 padding bytes, where 55 is optimal). Optimal fields order: ires, type, disabled, masked, queued, update_pending, queue_pending, ireq, consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding] struct vgpio_irq_line { ~~~~~~~^~~~~~~~~~~~~~~~ drivers/gpio/gpio-virtio.c:32:8: note: Excessive padding in 'struct vgpio_irq_line' (87 padding bytes, where 55 is optimal). Optimal fields order: ires, type, disabled, masked, queued, update_pending, queue_pending, ireq, consider reordering the fields or adding explicit padding members struct vgpio_irq_line { ~~~~~~~^~~~~~~~~~~~~~~~ 1 warning generated. drivers/pwm/core.c:816:13: warning: Access to field 'name' results in a dereference of a null pointer (loaded from variable 'np') [clang-analyzer-core.NullDereference] con_id = np->name; ^ drivers/pwm/core.c:1148:6: note: Assuming the condition is true if (is_of_node(fwnode)) ^~~~~~~~~~~~~~~~~~ drivers/pwm/core.c:1148:2: note: Taking true branch if (is_of_node(fwnode)) ^ drivers/pwm/core.c:1149:25: note: Assuming the condition is false pwm = of_pwm_get(dev, to_of_node(fwnode), con_id); ^ include/linux/of.h:164:3: note: expanded from macro 'to_of_node' is_of_node(__to_of_node_fwnode) ? \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/pwm/core.c:1149:25: note: '?' condition is false pwm = of_pwm_get(dev, to_of_node(fwnode), con_id); ^ include/linux/of.h:164:3: note: expanded from macro 'to_of_node' is_of_node(__to_of_node_fwnode) ? \ ^ drivers/pwm/core.c:1149:25: note: Passing null pointer value via 2nd parameter 'np' pwm = of_pwm_get(dev, to_of_node(fwnode), con_id); ^ include/linux/of.h:161:2: note: expanded from macro 'to_of_node' ({ \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/pwm/core.c:1149:9: note: Calling 'of_pwm_get' pwm = of_pwm_get(dev, to_of_node(fwnode), con_id); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/pwm/core.c:773:6: note: Assuming 'con_id' is null if (con_id) { ^~~~~~ drivers/pwm/core.c:773:2: note: Taking false branch if (con_id) { ^ drivers/pwm/core.c:781:6: note: Assuming 'err' is 0 if (err) { ^~~ drivers/pwm/core.c:781:2: note: Taking false branch if (err) { ^ drivers/pwm/core.c:786:25: note: Assuming '__of_fwnode_handle_node' is null pc = fwnode_to_pwmchip(of_fwnode_handle(args.np)); ^ include/linux/of.h:174:3: note: expanded from macro 'of_fwnode_handle' __of_fwnode_handle_node ? \ ^~~~~~~~~~~~~~~~~~~~~~~ drivers/pwm/core.c:786:25: note: '?' condition is false pc = fwnode_to_pwmchip(of_fwnode_handle(args.np)); ^ include/linux/of.h:174:3: note: expanded from macro 'of_fwnode_handle' __of_fwnode_handle_node ? \ ^ drivers/pwm/core.c:787:2: note: Taking false branch if (IS_ERR(pc)) { ^ drivers/pwm/core.c:796:2: note: Taking false branch if (IS_ERR(pwm)) ^ drivers/pwm/core.c:800:2: note: Taking false branch if (IS_ERR(dl)) { ^ drivers/pwm/core.c:812:7: note: 'con_id' is null if (!con_id) { ^~~~~~ drivers/pwm/core.c:812:2: note: Taking true branch if (!con_id) { ^ drivers/pwm/core.c:815:7: note: 'err' is < 0 if (err < 0) ^~~ drivers/pwm/core.c:815:3: note: Taking true branch if (err < 0) ^ drivers/pwm/core.c:816:13: note: Access to field 'name' results in a dereference of a null pointer (loaded from variable 'np') con_id = np->name; ^~ 1 warning generated. lib/crypto/chacha20poly1305-selftest.c:9027:7: warning: Value stored to 'total_len' is never read [clang-analyzer-deadcode.DeadStores] for (total_len = POLY1305_DIGEST_SIZE; IS_ENABLED(DEBUG_CHACHA20POLY1305_SLOW_CHUNK_TEST) ^ lib/crypto/chacha20poly1305-selftest.c:9027:7: note: Value stored to 'total_len' is never read 2 warnings generated. include/linux/bitmap.h:582:13: warning: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage [clang-analyzer-core.uninitialized.Assign] map[index] &= ~(0xFFUL << offset); ^ drivers/gpio/gpio-pca953x.c:794:8: note: Calling 'pca953x_irq_pending' ret = pca953x_irq_pending(chip, pending); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpio/gpio-pca953x.c:738:6: note: Assuming the condition is true if (chip->driver_data & PCA_PCAL) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpio/gpio-pca953x.c:738:2: note: Taking true branch vim +32 drivers/gpio/gpio-virtio.c 31 > 32 struct vgpio_irq_line { 33 u8 type; 34 bool disabled; 35 bool masked; 36 bool queued; 37 bool update_pending; 38 bool queue_pending; 39 40 struct virtio_gpio_irq_request ireq ____cacheline_aligned; 41 struct virtio_gpio_irq_response ires ____cacheline_aligned; 42 }; 43 -- 0-DAY CI Kernel Test Service https://01.org/lkp