All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Luis Chamberlain <mcgrof@kernel.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.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
Date: Wed, 1 Sep 2021 09:23:04 +0800	[thread overview]
Message-ID: <202109010957.lJGE0T1T-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 4749 bytes --]

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@intel.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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 60665 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.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
Date: Wed, 01 Sep 2021 09:23:04 +0800	[thread overview]
Message-ID: <202109010957.lJGE0T1T-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 4872 bytes --]

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@intel.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(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 60665 bytes --]

             reply	other threads:[~2021-09-01  1:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-01  1:23 kernel test robot [this message]
2021-09-01  1:23 ` [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 kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202109010957.lJGE0T1T-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.