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>] [day] [month] [year] [list]
Message-ID: <202109010957.lJGE0T1T-lkp@intel.com>
Date:   Wed, 1 Sep 2021 09:23:04 +0800
From:   kernel test robot <lkp@...el.com>
To:     Luis Chamberlain <mcgrof@...nel.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [mcgrof-next:20210830-for-axboe-add-disk-error-handling-v2 33/68]
 drivers/block/paride/pd.c:946:26: error: passing argument 1 of
 'blk_cleanup_disk' from incompatible pointer type

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git 20210830-for-axboe-add-disk-error-handling-v2
head:   997320ae7fef21afc2fbb5dab325858c5631b6b0
commit: 8d7d9d47bce01899e01b794b38cb1484883a08d7 [33/68] pd: add error handling support for add_disk()
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 11.2.0
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
        # https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git/commit/?id=8d7d9d47bce01899e01b794b38cb1484883a08d7
        git remote add mcgrof-next https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git
        git fetch --no-tags mcgrof-next 20210830-for-axboe-add-disk-error-handling-v2
        git checkout 8d7d9d47bce01899e01b794b38cb1484883a08d7
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=m68k 

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

All errors (new ones prefixed by >>):

   drivers/block/paride/pd.c: In function 'pd_probe_drive':
>> drivers/block/paride/pd.c:946:26: error: passing argument 1 of 'blk_cleanup_disk' from incompatible pointer type [-Werror=incompatible-pointer-types]
     946 |         blk_cleanup_disk(&disk);
         |                          ^~~~~
         |                          |
         |                          struct pd_unit **
   In file included from include/linux/blkdev.h:8,
                    from include/linux/blk-mq.h:5,
                    from drivers/block/paride/pd.c:154:
   include/linux/genhd.h:281:39: note: expected 'struct gendisk *' but argument is of type 'struct pd_unit **'
     281 | void blk_cleanup_disk(struct gendisk *disk);
         |                       ~~~~~~~~~~~~~~~~^~~~
   cc1: some warnings being treated as errors


vim +/blk_cleanup_disk +946 drivers/block/paride/pd.c

   877	
   878	static int pd_probe_drive(struct pd_unit *disk, int autoprobe, int port,
   879			int mode, int unit, int protocol, int delay)
   880	{
   881		int index = disk - pd;
   882		int *parm = *drives[index];
   883		struct gendisk *p;
   884		int ret;
   885	
   886		disk->pi = &disk->pia;
   887		disk->access = 0;
   888		disk->changed = 1;
   889		disk->capacity = 0;
   890		disk->drive = parm[D_SLV];
   891		snprintf(disk->name, PD_NAMELEN, "%s%c", name, 'a' + index);
   892		disk->alt_geom = parm[D_GEO];
   893		disk->standby = parm[D_SBY];
   894		INIT_LIST_HEAD(&disk->rq_list);
   895	
   896		if (!pi_init(disk->pi, autoprobe, port, mode, unit, protocol, delay,
   897				pd_scratch, PI_PD, verbose, disk->name))
   898			return -ENXIO;
   899	
   900		memset(&disk->tag_set, 0, sizeof(disk->tag_set));
   901		disk->tag_set.ops = &pd_mq_ops;
   902		disk->tag_set.cmd_size = sizeof(struct pd_req);
   903		disk->tag_set.nr_hw_queues = 1;
   904		disk->tag_set.nr_maps = 1;
   905		disk->tag_set.queue_depth = 2;
   906		disk->tag_set.numa_node = NUMA_NO_NODE;
   907		disk->tag_set.flags = BLK_MQ_F_SHOULD_MERGE | BLK_MQ_F_BLOCKING;
   908		ret = blk_mq_alloc_tag_set(&disk->tag_set);
   909		if (ret)
   910			goto pi_release;
   911	
   912		p = blk_mq_alloc_disk(&disk->tag_set, disk);
   913		if (IS_ERR(p)) {
   914			ret = PTR_ERR(p);
   915			goto free_tag_set;
   916		}
   917		disk->gd = p;
   918	
   919		strcpy(p->disk_name, disk->name);
   920		p->fops = &pd_fops;
   921		p->major = major;
   922		p->first_minor = (disk - pd) << PD_BITS;
   923		p->minors = 1 << PD_BITS;
   924		p->events = DISK_EVENT_MEDIA_CHANGE;
   925		p->private_data = disk;
   926		blk_queue_max_hw_sectors(p->queue, cluster);
   927		blk_queue_bounce_limit(p->queue, BLK_BOUNCE_HIGH);
   928	
   929		if (disk->drive == -1) {
   930			for (disk->drive = 0; disk->drive <= 1; disk->drive++) {
   931				ret = pd_special_command(disk, pd_identify);
   932				if (ret == 0)
   933					break;
   934			}
   935		} else {
   936			ret = pd_special_command(disk, pd_identify);
   937		}
   938		if (ret)
   939			goto put_disk;
   940		set_capacity(disk->gd, disk->capacity);
   941		ret = add_disk(disk->gd);
   942		if (ret)
   943			goto cleanup_disk;
   944		return 0;
   945	cleanup_disk:
 > 946		blk_cleanup_disk(&disk);
   947	put_disk:
   948		put_disk(p);
   949		disk->gd = NULL;
   950	free_tag_set:
   951		blk_mq_free_tag_set(&disk->tag_set);
   952	pi_release:
   953		pi_release(disk->pi);
   954		return ret;
   955	}
   956	

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

Download attachment ".config.gz" of type "application/gzip" (60665 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ