lkml.org 
[lkml]   [2021]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[mcgrof:20210816-add-disk-error-handling 44/64] drivers/memstick/core/ms_block.c:2166:19: error: incompatible pointer types passing 'struct request_queue *' to parameter of type 'struct gendisk *'
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git 20210816-add-disk-error-handling
head: e1e79332ea1bba0e751529b114ef9d301bf962a5
commit: e3939d1f567d414dd705aa8c5015396cde7f3306 [44/64] ms_block: add error handling support for add_disk()
config: arm-randconfig-r026-20210817 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 2c6448cdc2f68f8c28fd0bd9404182b81306e6e6)
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/mcgrof/linux.git/commit/?id=e3939d1f567d414dd705aa8c5015396cde7f3306
git remote add mcgrof https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git
git fetch --no-tags mcgrof 20210816-add-disk-error-handling
git checkout e3939d1f567d414dd705aa8c5015396cde7f3306
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm

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/memstick/core/ms_block.c:2166:19: error: incompatible pointer types passing 'struct request_queue *' to parameter of type 'struct gendisk *' [-Werror,-Wincompatible-pointer-types]
blk_cleanup_disk(msb->queue);
^~~~~~~~~~
include/linux/genhd.h:281:39: note: passing argument to parameter 'disk' here
void blk_cleanup_disk(struct gendisk *disk);
^
1 error generated.


vim +2166 drivers/memstick/core/ms_block.c

2108
2109 /* Registers the block device */
2110 static int msb_init_disk(struct memstick_dev *card)
2111 {
2112 struct msb_data *msb = memstick_get_drvdata(card);
2113 int rc;
2114 unsigned long capacity;
2115
2116 mutex_lock(&msb_disk_lock);
2117 msb->disk_id = idr_alloc(&msb_disk_idr, card, 0, 256, GFP_KERNEL);
2118 mutex_unlock(&msb_disk_lock);
2119
2120 if (msb->disk_id < 0)
2121 return msb->disk_id;
2122
2123 rc = blk_mq_alloc_sq_tag_set(&msb->tag_set, &msb_mq_ops, 2,
2124 BLK_MQ_F_SHOULD_MERGE);
2125 if (rc)
2126 goto out_release_id;
2127
2128 msb->disk = blk_mq_alloc_disk(&msb->tag_set, card);
2129 if (IS_ERR(msb->disk)) {
2130 rc = PTR_ERR(msb->disk);
2131 goto out_free_tag_set;
2132 }
2133 msb->queue = msb->disk->queue;
2134
2135 blk_queue_max_hw_sectors(msb->queue, MS_BLOCK_MAX_PAGES);
2136 blk_queue_max_segments(msb->queue, MS_BLOCK_MAX_SEGS);
2137 blk_queue_max_segment_size(msb->queue,
2138 MS_BLOCK_MAX_PAGES * msb->page_size);
2139 blk_queue_logical_block_size(msb->queue, msb->page_size);
2140
2141 sprintf(msb->disk->disk_name, "msblk%d", msb->disk_id);
2142 msb->disk->fops = &msb_bdops;
2143 msb->disk->private_data = msb;
2144
2145 capacity = msb->pages_in_block * msb->logical_block_count;
2146 capacity *= (msb->page_size / 512);
2147 set_capacity(msb->disk, capacity);
2148 dbg("Set total disk size to %lu sectors", capacity);
2149
2150 msb->usage_count = 1;
2151 msb->io_queue = alloc_ordered_workqueue("ms_block", WQ_MEM_RECLAIM);
2152 INIT_WORK(&msb->io_work, msb_io_work);
2153 sg_init_table(msb->prealloc_sg, MS_BLOCK_MAX_SEGS+1);
2154
2155 if (msb->read_only)
2156 set_disk_ro(msb->disk, 1);
2157
2158 msb_start(card);
2159 rc = device_add_disk(&card->dev, msb->disk, NULL);
2160 if (rc)
2161 goto out_cleanup_disk;
2162 dbg("Disk added");
2163 return 0;
2164
2165 out_cleanup_disk:
> 2166 blk_cleanup_disk(msb->queue);
2167 out_free_tag_set:
2168 blk_mq_free_tag_set(&msb->tag_set);
2169 out_release_id:
2170 mutex_lock(&msb_disk_lock);
2171 idr_remove(&msb_disk_idr, msb->disk_id);
2172 mutex_unlock(&msb_disk_lock);
2173 return rc;
2174 }
2175

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2021-08-17 12:37    [W:0.049 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site