Messages in this thread | | | Date | Tue, 17 Aug 2021 20:59:03 +0800 | From | kernel test robot <> | Subject | [mcgrof:20210816-add-disk-error-handling 19/64] drivers/block/paride/pd.c:943:20: error: expected ';' after goto statement |
| |
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git 20210816-add-disk-error-handling head: e1e79332ea1bba0e751529b114ef9d301bf962a5 commit: b7e9e637531f1679afe287c382cfaa1af857012b [19/64] pd: add error handling support for add_disk() config: arm-randconfig-r022-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=b7e9e637531f1679afe287c382cfaa1af857012b 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 b7e9e637531f1679afe287c382cfaa1af857012b # save the attached .config to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=arm SHELL=/bin/bash
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:943:20: error: expected ';' after goto statement goto cleanup_disk: ^ ; >> drivers/block/paride/pd.c:946:19: error: incompatible pointer types passing 'struct pd_unit *' to parameter of type 'struct gendisk *' [-Werror,-Wincompatible-pointer-types] blk_cleanup_disk(disk); ^~~~ include/linux/genhd.h:281:39: note: passing argument to parameter 'disk' here void blk_cleanup_disk(struct gendisk *disk); ^ 2 errors generated.
vim +943 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 [unhandled content-type:application/gzip] | |