CC: [email protected] CC: [email protected] BCC: [email protected] CC: [email protected] TO: Damien Le Moal <[email protected]> CC: Hannes Reinecke <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 7e57714cd0ad2d5bb90e50b5096a0e671dec1ef3 commit: a3d11c275b647b5b56b907011b432e00f7ddb683 ata: pata_bk3710: add compile test support date: 6 weeks ago :::::: branch date: 5 hours ago :::::: commit date: 6 weeks ago config: riscv-randconfig-c006-20220222 (https://download.01.org/0day-ci/archive/20220228/[email protected]/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project d271fc04d5b97b12e6b797c6067d3c96a8d7470e) 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 riscv cross compiling tool for clang build # apt-get install binutils-riscv64-linux-gnu # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a3d11c275b647b5b56b907011b432e00f7ddb683 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout a3d11c275b647b5b56b907011b432e00f7ddb683 # save the config file to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv clang-analyzer If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> clang-analyzer warnings: (new ones prefixed by >>) ^ ~ drivers/w1/slaves/w1_ds2438.c:69:3: note: Value stored to 'crc' is never read crc = 0; ^ ~ Suppressed 6 warnings (6 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. 6 warnings generated. Suppressed 6 warnings (6 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. 6 warnings generated. Suppressed 6 warnings (6 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. 6 warnings generated. Suppressed 6 warnings (6 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. 10 warnings generated. fs/gfs2/recovery.c:397:2: warning: Value stored to 'error' is never read [clang-analyzer-deadcode.DeadStores] error = update_statfs_inode(jd, NULL, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/gfs2/recovery.c:397:2: note: Value stored to 'error' is never read error = update_statfs_inode(jd, NULL, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/list.h:137:13: warning: Use of memory after it is freed [clang-analyzer-unix.Malloc] __list_del(entry->prev, entry->next); ^ fs/gfs2/recovery.c:113:2: note: Loop condition is true. Entering loop body while (!list_empty(head)) { ^ fs/gfs2/recovery.c:116:3: note: Memory is released kfree(rr); ^~~~~~~~~ fs/gfs2/recovery.c:113:2: note: Loop condition is true. Entering loop body while (!list_empty(head)) { ^ fs/gfs2/recovery.c:115:3: note: Calling 'list_del' list_del(&rr->rr_list); ^~~~~~~~~~~~~~~~~~~~~~ include/linux/list.h:148:2: note: Calling '__list_del_entry' __list_del_entry(entry); ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/list.h:134:6: note: Assuming the condition is false if (!__list_del_entry_valid(entry)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/list.h:134:2: note: Taking false branch if (!__list_del_entry_valid(entry)) ^ include/linux/list.h:137:13: note: Use of memory after it is freed __list_del(entry->prev, entry->next); ^~~~~~~~~~~ include/linux/list.h:149:14: warning: Use of memory after it is freed [clang-analyzer-unix.Malloc] entry->next = LIST_POISON1; ^ fs/gfs2/recovery.c:113:2: note: Loop condition is true. Entering loop body while (!list_empty(head)) { ^ fs/gfs2/recovery.c:116:3: note: Memory is released kfree(rr); ^~~~~~~~~ fs/gfs2/recovery.c:113:2: note: Loop condition is true. Entering loop body while (!list_empty(head)) { ^ fs/gfs2/recovery.c:115:3: note: Calling 'list_del' list_del(&rr->rr_list); ^~~~~~~~~~~~~~~~~~~~~~ include/linux/list.h:149:14: note: Use of memory after it is freed entry->next = LIST_POISON1; ~~~~~~~~~~~ ^ Suppressed 7 warnings (7 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. 9 warnings generated. Suppressed 9 warnings (9 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. 9 warnings generated. Suppressed 9 warnings (9 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. 9 warnings generated. Suppressed 9 warnings (9 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. 10 warnings generated. drivers/ata/pata_ali.c:126:10: warning: Although the value stored to 'mask' is used in the enclosing expression, the value is never actually read from 'mask' [clang-analyzer-deadcode.DeadStores] return mask &= ~ATA_MASK_UDMA; ^ ~~~~~~~~~~~~~~ drivers/ata/pata_ali.c:126:10: note: Although the value stored to 'mask' is used in the enclosing expression, the value is never actually read from 'mask' return mask &= ~ATA_MASK_UDMA; ^ ~~~~~~~~~~~~~~ Suppressed 9 warnings (9 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. 10 warnings generated. drivers/ata/pata_amd.c:280:9: warning: Although the value stored to 'saved_udma' is used in the enclosing expression, the value is never actually read from 'saved_udma' [clang-analyzer-deadcode.DeadStores] udma = saved_udma = (unsigned long)ap->host->private_data; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/ata/pata_amd.c:280:9: note: Although the value stored to 'saved_udma' is used in the enclosing expression, the value is never actually read from 'saved_udma' udma = saved_udma = (unsigned long)ap->host->private_data; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 9 warnings (9 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. 9 warnings generated. Suppressed 9 warnings (9 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. 10 warnings generated. >> drivers/ata/pata_bk3710.c:179:4: warning: Value stored to 'mode' is never >> read [clang-analyzer-deadcode.DeadStores] mode = mode2; ^ ~~~~~ drivers/ata/pata_bk3710.c:179:4: note: Value stored to 'mode' is never read mode = mode2; ^ ~~~~~ Suppressed 9 warnings (9 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. 9 warnings generated. Suppressed 9 warnings (9 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. 11 warnings generated. drivers/media/i2c/hi846.c:1494:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct i2c_client *client = v4l2_get_subdevdata(&hi846->sd); ^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/i2c/hi846.c:1494:21: note: Value stored to 'client' during its initialization is never read struct i2c_client *client = v4l2_get_subdevdata(&hi846->sd); ^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/i2c/hi846.c:1764:2: warning: Value stored to 'tgt_fps' is never read [clang-analyzer-deadcode.DeadStores] tgt_fps = hi846->cur_mode->fps; ^ ~~~~~~~~~~~~~~~~~~~~ drivers/media/i2c/hi846.c:1764:2: note: Value stored to 'tgt_fps' is never read tgt_fps = hi846->cur_mode->fps; ^ ~~~~~~~~~~~~~~~~~~~~ drivers/media/i2c/hi846.c:1805:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct i2c_client *client = v4l2_get_subdevdata(sd); ^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/i2c/hi846.c:1805:21: note: Value stored to 'client' during its initialization is never read struct i2c_client *client = v4l2_get_subdevdata(sd); ^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 8 warnings (8 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. 6 warnings generated. Suppressed 6 warnings (6 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. 7 warnings generated. Suppressed 7 warnings (7 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. 6 warnings generated. Suppressed 6 warnings (6 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. 6 warnings generated. Suppressed 6 warnings (6 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. 6 warnings generated. Suppressed 6 warnings (6 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. 6 warnings generated. Suppressed 6 warnings (6 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. 6 warnings generated. Suppressed 6 warnings (6 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. 6 warnings generated. Suppressed 6 warnings (6 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. 6 warnings generated. Suppressed 6 warnings (6 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. 6 warnings generated. Suppressed 6 warnings (6 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. 7 warnings generated. Suppressed 7 warnings (7 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. 9 warnings generated. drivers/media/i2c/ad9389b.c:399:7: warning: Value stored to 'N' during its initialization is never read [clang-analyzer-deadcode.DeadStores] u32 N = (ad9389b_rd(sd, 0x01) & 0xf) << 16 | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/i2c/ad9389b.c:399:7: note: Value stored to 'N' during its initialization is never read u32 N = (ad9389b_rd(sd, 0x01) & 0xf) << 16 | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 8 warnings (8 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. 9 warnings generated. Suppressed 9 warnings (8 in non-user code, 1 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 8 warnings generated. Suppressed 8 warnings (8 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. 8 warnings generated. Suppressed 8 warnings (8 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. 8 warnings generated. Suppressed 8 warnings (8 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. 8 warnings generated. Suppressed 8 warnings (8 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. 8 warnings generated. Suppressed 8 warnings (8 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. 8 warnings generated. Suppressed 8 warnings (8 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. 9 warnings generated. Suppressed 9 warnings (9 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. 9 warnings generated. Suppressed 9 warnings (9 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. vim +/mode +179 drivers/ata/pata_bk3710.c 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 148 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 149 static void pata_bk3710_setpiomode(void __iomem *base, struct ata_device *pair, 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 150 unsigned int dev, unsigned int cycletime, 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 151 unsigned int mode) 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 152 { 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 153 const struct ata_timing *t; 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 154 u32 val32; 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 155 u8 t2, t2i, t0; 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 156 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 157 t = ata_timing_find_mode(XFER_PIO_0 + mode); 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 158 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 159 /* PIO Data Setup */ 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 160 t0 = DIV_ROUND_UP(cycletime, ideclk_period); 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 161 t2 = DIV_ROUND_UP(t->active, ideclk_period); 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 162 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 163 t2i = t0 - t2 - 1; 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 164 t2--; 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 165 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 166 val32 = ioread32(base + BK3710_DATSTB) & (0xFF << (dev ? 0 : 8)); 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 167 val32 |= t2 << (dev ? 8 : 0); 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 168 iowrite32(val32, base + BK3710_DATSTB); 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 169 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 170 val32 = ioread32(base + BK3710_DATRCVR) & (0xFF << (dev ? 0 : 8)); 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 171 val32 |= t2i << (dev ? 8 : 0); 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 172 iowrite32(val32, base + BK3710_DATRCVR); 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 173 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 174 /* FIXME: this is broken also in the old driver */ 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 175 if (pair) { 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 176 u8 mode2 = pair->pio_mode - XFER_PIO_0; 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 177 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 178 if (mode2 < mode) 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 @179 mode = mode2; 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 180 } 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 181 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 182 /* TASKFILE Setup */ 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 183 t0 = DIV_ROUND_UP(t->cyc8b, ideclk_period); 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 184 t2 = DIV_ROUND_UP(t->act8b, ideclk_period); 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 185 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 186 t2i = t0 - t2 - 1; 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 187 t2--; 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 188 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 189 val32 = ioread32(base + BK3710_REGSTB) & (0xFF << (dev ? 0 : 8)); 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 190 val32 |= t2 << (dev ? 8 : 0); 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 191 iowrite32(val32, base + BK3710_REGSTB); 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 192 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 193 val32 = ioread32(base + BK3710_REGRCVR) & (0xFF << (dev ? 0 : 8)); 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 194 val32 |= t2i << (dev ? 8 : 0); 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 195 iowrite32(val32, base + BK3710_REGRCVR); 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 196 } 76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 197 :::::: The code at line 179 was first introduced by commit :::::: 76a40ca82f3498da2683b3d5efa9b24d5ffaeecc ata: add Palmchip BK3710 PATA controller driver :::::: TO: Bartlomiej Zolnierkiewicz <[email protected]> :::::: CC: Sekhar Nori <[email protected]> --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected] _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
