[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202108202232.JuIatlhX-lkp@intel.com>
Date: Fri, 20 Aug 2021 22:19:41 +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:20210819-add-disk-error-handling-next 55/90]
drivers/block/paride/pd.c:943:34: error: expected ';' before ':' token
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git 20210819-add-disk-error-handling-next
head: 4a644c3aee4465306a79d393956c84ce8925fa6b
commit: dead4ade0ca0ea1852b1c7a0b1b2a5ad3a66f49f [55/90] pd: add error handling support for add_disk()
config: sh-allmodconfig (attached as .config)
compiler: sh4-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=dead4ade0ca0ea1852b1c7a0b1b2a5ad3a66f49f
git remote add mcgrof-next https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git
git fetch --no-tags mcgrof-next 20210819-add-disk-error-handling-next
git checkout dead4ade0ca0ea1852b1c7a0b1b2a5ad3a66f49f
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=sh SHELL=/bin/bash
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:943:34: error: expected ';' before ':' token
943 | goto cleanup_disk:
| ^
| ;
>> 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 +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
Download attachment ".config.gz" of type "application/gzip" (55471 bytes)
Powered by blists - more mailing lists