lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202107060648.767XjMRK-lkp@intel.com>
Date:   Tue, 6 Jul 2021 10:54:10 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     kbuild@...ts.01.org, Abd-Alrhman Masalkhi <abd.masalkhi@...il.com>,
        axboe@...nel.dk
Cc:     lkp@...el.com, kbuild-all@...ts.01.org,
        linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
        Abd-Alrhman Masalkhi <abd.masalkhi@...il.com>
Subject: Re: [PATCH v2] block: Removed a warning while compiling with a cross
 compiler for parisc

Hi Abd-Alrhman,

url:    https://github.com/0day-ci/linux/commits/Abd-Alrhman-Masalkhi/block-Removed-a-warning-while-compiling-with-a-cross-compiler-for-parisc/20210704-205212
base:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: i386-randconfig-m021-20210705 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
Reported-by: Dan Carpenter <dan.carpenter@...cle.com>

smatch warnings:
block/genhd.c:1147 diskstats_show() error: '%pg' expects argument of type struct 'block_device*', argument 5 has type 'struct gendisk*'

vim +1147 block/genhd.c

acc384f7df09a5 block/genhd.c         Abd-Alrhman Masalkhi  2021-07-04  1113  
cf771cb5a7b716 block/genhd.c         Tejun Heo             2008-09-03  1114  /*
cf771cb5a7b716 block/genhd.c         Tejun Heo             2008-09-03  1115   * aggregate disk stat collector.  Uses the same stats that the sysfs
cf771cb5a7b716 block/genhd.c         Tejun Heo             2008-09-03  1116   * entries do, above, but makes them available through one seq_file.
cf771cb5a7b716 block/genhd.c         Tejun Heo             2008-09-03  1117   *
cf771cb5a7b716 block/genhd.c         Tejun Heo             2008-09-03  1118   * The output looks suspiciously like /proc/partitions with a bunch of
cf771cb5a7b716 block/genhd.c         Tejun Heo             2008-09-03  1119   * extra fields.
cf771cb5a7b716 block/genhd.c         Tejun Heo             2008-09-03  1120   */
cf771cb5a7b716 block/genhd.c         Tejun Heo             2008-09-03  1121  static int diskstats_show(struct seq_file *seqf, void *v)
^1da177e4c3f41 drivers/block/genhd.c Linus Torvalds        2005-04-16  1122  {
^1da177e4c3f41 drivers/block/genhd.c Linus Torvalds        2005-04-16  1123  	struct gendisk *gp = v;
ad1eaa5344b293 block/genhd.c         Christoph Hellwig     2020-11-24  1124  	struct block_device *hd;
e016b78201a2d9 block/genhd.c         Mikulas Patocka       2018-12-06  1125  	unsigned int inflight;
ea18e0f0a63af9 block/genhd.c         Konstantin Khlebnikov 2020-03-25  1126  	struct disk_stats stat;
7fae67cc9c0e06 block/genhd.c         Christoph Hellwig     2021-04-06  1127  	unsigned long idx;
^1da177e4c3f41 drivers/block/genhd.c Linus Torvalds        2005-04-16  1128  
^1da177e4c3f41 drivers/block/genhd.c Linus Torvalds        2005-04-16  1129  	/*
ed9e1982347b36 block/genhd.c         Tejun Heo             2008-08-25  1130  	if (&disk_to_dev(gp)->kobj.entry == block_class.devices.next)
cf771cb5a7b716 block/genhd.c         Tejun Heo             2008-09-03  1131  		seq_puts(seqf,	"major minor name"
^1da177e4c3f41 drivers/block/genhd.c Linus Torvalds        2005-04-16  1132  				"     rio rmerge rsect ruse wio wmerge "
^1da177e4c3f41 drivers/block/genhd.c Linus Torvalds        2005-04-16  1133  				"wsect wuse running use aveq"
^1da177e4c3f41 drivers/block/genhd.c Linus Torvalds        2005-04-16  1134  				"\n\n");
^1da177e4c3f41 drivers/block/genhd.c Linus Torvalds        2005-04-16  1135  	*/
^1da177e4c3f41 drivers/block/genhd.c Linus Torvalds        2005-04-16  1136  
7fae67cc9c0e06 block/genhd.c         Christoph Hellwig     2021-04-06  1137  	rcu_read_lock();
7fae67cc9c0e06 block/genhd.c         Christoph Hellwig     2021-04-06  1138  	xa_for_each(&gp->part_tbl, idx, hd) {
7fae67cc9c0e06 block/genhd.c         Christoph Hellwig     2021-04-06  1139  		if (bdev_is_partition(hd) && !bdev_nr_sectors(hd))
7fae67cc9c0e06 block/genhd.c         Christoph Hellwig     2021-04-06  1140  			continue;
0d02129e76edf9 block/genhd.c         Christoph Hellwig     2020-11-27  1141  		part_stat_read_all(hd, &stat);
b2f609e191edc9 block/genhd.c         Christoph Hellwig     2020-05-13  1142  		if (queue_is_mq(gp->queue))
ad1eaa5344b293 block/genhd.c         Christoph Hellwig     2020-11-24  1143  			inflight = blk_mq_in_flight(gp->queue, hd);
b2f609e191edc9 block/genhd.c         Christoph Hellwig     2020-05-13  1144  		else
ad1eaa5344b293 block/genhd.c         Christoph Hellwig     2020-11-24  1145  			inflight = part_in_flight(hd);
ea18e0f0a63af9 block/genhd.c         Konstantin Khlebnikov 2020-03-25  1146  
acc384f7df09a5 block/genhd.c         Abd-Alrhman Masalkhi  2021-07-04 @1147  		seq_printf(seqf, "%4d %7d %pg "
                                                                                                                  ^^^

bdca3c87fb7ad1 block/genhd.c         Michael Callahan      2018-07-18  1148  			   "%lu %lu %lu %u "
bdca3c87fb7ad1 block/genhd.c         Michael Callahan      2018-07-18  1149  			   "%lu %lu %lu %u "
bdca3c87fb7ad1 block/genhd.c         Michael Callahan      2018-07-18  1150  			   "%u %u %u "
b6866318657717 block/genhd.c         Konstantin Khlebnikov 2019-11-21  1151  			   "%lu %lu %lu %u "
b6866318657717 block/genhd.c         Konstantin Khlebnikov 2019-11-21  1152  			   "%lu %u"
b6866318657717 block/genhd.c         Konstantin Khlebnikov 2019-11-21  1153  			   "\n",
acc384f7df09a5 block/genhd.c         Abd-Alrhman Masalkhi  2021-07-04  1154  			   MAJOR(hd->bd_dev), MINOR(hd->bd_dev), gp,
                                                                                                                                         ^^

ea18e0f0a63af9 block/genhd.c         Konstantin Khlebnikov 2020-03-25  1155  			   stat.ios[STAT_READ],
ea18e0f0a63af9 block/genhd.c         Konstantin Khlebnikov 2020-03-25  1156  			   stat.merges[STAT_READ],
ea18e0f0a63af9 block/genhd.c         Konstantin Khlebnikov 2020-03-25  1157  			   stat.sectors[STAT_READ],
acc384f7df09a5 block/genhd.c         Abd-Alrhman Masalkhi  2021-07-04  1158  			   (unsigned int)call_div_u64(stat.nsecs[STAT_READ],
ea18e0f0a63af9 block/genhd.c         Konstantin Khlebnikov 2020-03-25  1159  						      NSEC_PER_MSEC),
ea18e0f0a63af9 block/genhd.c         Konstantin Khlebnikov 2020-03-25  1160  			   stat.ios[STAT_WRITE],
ea18e0f0a63af9 block/genhd.c         Konstantin Khlebnikov 2020-03-25  1161  			   stat.merges[STAT_WRITE],
ea18e0f0a63af9 block/genhd.c         Konstantin Khlebnikov 2020-03-25  1162  			   stat.sectors[STAT_WRITE],
acc384f7df09a5 block/genhd.c         Abd-Alrhman Masalkhi  2021-07-04  1163  			   (unsigned int)call_div_u64(stat.nsecs[STAT_WRITE],
ea18e0f0a63af9 block/genhd.c         Konstantin Khlebnikov 2020-03-25  1164  						      NSEC_PER_MSEC),
e016b78201a2d9 block/genhd.c         Mikulas Patocka       2018-12-06  1165  			   inflight,
ea18e0f0a63af9 block/genhd.c         Konstantin Khlebnikov 2020-03-25  1166  			   jiffies_to_msecs(stat.io_ticks),
acc384f7df09a5 block/genhd.c         Abd-Alrhman Masalkhi  2021-07-04  1167  			   (unsigned int)call_div_u64(stat.nsecs[STAT_READ] +
8cd5b8fc00716f block/genhd.c         Konstantin Khlebnikov 2020-03-25  1168  						      stat.nsecs[STAT_WRITE] +
8cd5b8fc00716f block/genhd.c         Konstantin Khlebnikov 2020-03-25  1169  						      stat.nsecs[STAT_DISCARD] +
8cd5b8fc00716f block/genhd.c         Konstantin Khlebnikov 2020-03-25  1170  						      stat.nsecs[STAT_FLUSH],
8cd5b8fc00716f block/genhd.c         Konstantin Khlebnikov 2020-03-25  1171  						      NSEC_PER_MSEC),
ea18e0f0a63af9 block/genhd.c         Konstantin Khlebnikov 2020-03-25  1172  			   stat.ios[STAT_DISCARD],
ea18e0f0a63af9 block/genhd.c         Konstantin Khlebnikov 2020-03-25  1173  			   stat.merges[STAT_DISCARD],
ea18e0f0a63af9 block/genhd.c         Konstantin Khlebnikov 2020-03-25  1174  			   stat.sectors[STAT_DISCARD],
acc384f7df09a5 block/genhd.c         Abd-Alrhman Masalkhi  2021-07-04  1175  			   (unsigned int)call_div_u64(stat.nsecs[STAT_DISCARD],
ea18e0f0a63af9 block/genhd.c         Konstantin Khlebnikov 2020-03-25  1176  						      NSEC_PER_MSEC),
ea18e0f0a63af9 block/genhd.c         Konstantin Khlebnikov 2020-03-25  1177  			   stat.ios[STAT_FLUSH],
acc384f7df09a5 block/genhd.c         Abd-Alrhman Masalkhi  2021-07-04  1178  			   (unsigned int)call_div_u64(stat.nsecs[STAT_FLUSH],
ea18e0f0a63af9 block/genhd.c         Konstantin Khlebnikov 2020-03-25  1179  						      NSEC_PER_MSEC)
28f39d553ee242 block/genhd.c         Jerome Marchand       2008-02-08  1180  			);
^1da177e4c3f41 drivers/block/genhd.c Linus Torvalds        2005-04-16  1181  	}
7fae67cc9c0e06 block/genhd.c         Christoph Hellwig     2021-04-06  1182  	rcu_read_unlock();
^1da177e4c3f41 drivers/block/genhd.c Linus Torvalds        2005-04-16  1183  
^1da177e4c3f41 drivers/block/genhd.c Linus Torvalds        2005-04-16  1184  	return 0;
^1da177e4c3f41 drivers/block/genhd.c Linus Torvalds        2005-04-16  1185  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ