* [jth:zone-append.v5 7/10] drivers/scsi/sd.c:3383:8: error: void value not ignored as it ought to be
@ 2020-04-09 18:34 kbuild test robot
0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2020-04-09 18:34 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 6323 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jth/linux.git zone-append.v5
head: d8d714aa7e0abe9fb7c6c1282250f1c1c7d4ba5a
commit: fb3849058d2b4e01ff0b036257092390d2f71451 [7/10] scsi: sd_zbc: emulate ZONE_APPEND commands
config: alpha-defconfig (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout fb3849058d2b4e01ff0b036257092390d2f71451
# save the attached .config to linux build tree
GCC_VERSION=9.3.0 make.cross ARCH=alpha
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/scsi/sd.c: In function 'sd_probe':
>> drivers/scsi/sd.c:3383:8: error: void value not ignored as it ought to be
3383 | error = sd_zbc_init_disk(sdkp);
| ^
vim +3383 drivers/scsi/sd.c
3274
3275 /**
3276 * sd_probe - called during driver initialization and whenever a
3277 * new scsi device is attached to the system. It is called once
3278 * for each scsi device (not just disks) present.
3279 * @dev: pointer to device object
3280 *
3281 * Returns 0 if successful (or not interested in this scsi device
3282 * (e.g. scanner)); 1 when there is an error.
3283 *
3284 * Note: this function is invoked from the scsi mid-level.
3285 * This function sets up the mapping between a given
3286 * <host,channel,id,lun> (found in sdp) and new device name
3287 * (e.g. /dev/sda). More precisely it is the block device major
3288 * and minor number that is chosen here.
3289 *
3290 * Assume sd_probe is not re-entrant (for time being)
3291 * Also think about sd_probe() and sd_remove() running coincidentally.
3292 **/
3293 static int sd_probe(struct device *dev)
3294 {
3295 struct scsi_device *sdp = to_scsi_device(dev);
3296 struct scsi_disk *sdkp;
3297 struct gendisk *gd;
3298 int index;
3299 int error;
3300
3301 scsi_autopm_get_device(sdp);
3302 error = -ENODEV;
3303 if (sdp->type != TYPE_DISK &&
3304 sdp->type != TYPE_ZBC &&
3305 sdp->type != TYPE_MOD &&
3306 sdp->type != TYPE_RBC)
3307 goto out;
3308
3309 #ifndef CONFIG_BLK_DEV_ZONED
3310 if (sdp->type == TYPE_ZBC)
3311 goto out;
3312 #endif
3313 SCSI_LOG_HLQUEUE(3, sdev_printk(KERN_INFO, sdp,
3314 "sd_probe\n"));
3315
3316 error = -ENOMEM;
3317 sdkp = kzalloc(sizeof(*sdkp), GFP_KERNEL);
3318 if (!sdkp)
3319 goto out;
3320
3321 gd = alloc_disk(SD_MINORS);
3322 if (!gd)
3323 goto out_free;
3324
3325 index = ida_alloc(&sd_index_ida, GFP_KERNEL);
3326 if (index < 0) {
3327 sdev_printk(KERN_WARNING, sdp, "sd_probe: memory exhausted.\n");
3328 goto out_put;
3329 }
3330
3331 error = sd_format_disk_name("sd", index, gd->disk_name, DISK_NAME_LEN);
3332 if (error) {
3333 sdev_printk(KERN_WARNING, sdp, "SCSI disk (sd) name length exceeded.\n");
3334 goto out_free_index;
3335 }
3336
3337 sdkp->device = sdp;
3338 sdkp->driver = &sd_template;
3339 sdkp->disk = gd;
3340 sdkp->index = index;
3341 atomic_set(&sdkp->openers, 0);
3342 atomic_set(&sdkp->device->ioerr_cnt, 0);
3343
3344 if (!sdp->request_queue->rq_timeout) {
3345 if (sdp->type != TYPE_MOD)
3346 blk_queue_rq_timeout(sdp->request_queue, SD_TIMEOUT);
3347 else
3348 blk_queue_rq_timeout(sdp->request_queue,
3349 SD_MOD_TIMEOUT);
3350 }
3351
3352 device_initialize(&sdkp->dev);
3353 sdkp->dev.parent = dev;
3354 sdkp->dev.class = &sd_disk_class;
3355 dev_set_name(&sdkp->dev, "%s", dev_name(dev));
3356
3357 error = device_add(&sdkp->dev);
3358 if (error)
3359 goto out_free_index;
3360
3361 get_device(dev);
3362 dev_set_drvdata(dev, sdkp);
3363
3364 gd->major = sd_major((index & 0xf0) >> 4);
3365 gd->first_minor = ((index & 0xf) << 4) | (index & 0xfff00);
3366
3367 gd->fops = &sd_fops;
3368 gd->private_data = &sdkp->driver;
3369 gd->queue = sdkp->device->request_queue;
3370
3371 /* defaults, until the device tells us otherwise */
3372 sdp->sector_size = 512;
3373 sdkp->capacity = 0;
3374 sdkp->media_present = 1;
3375 sdkp->write_prot = 0;
3376 sdkp->cache_override = 0;
3377 sdkp->WCE = 0;
3378 sdkp->RCD = 0;
3379 sdkp->ATO = 0;
3380 sdkp->first_scan = 1;
3381 sdkp->max_medium_access_timeouts = SD_MAX_MEDIUM_TIMEOUTS;
3382
> 3383 error = sd_zbc_init_disk(sdkp);
3384 if (error)
3385 goto out_free_index;
3386
3387 sd_revalidate_disk(gd);
3388
3389 gd->flags = GENHD_FL_EXT_DEVT;
3390 if (sdp->removable) {
3391 gd->flags |= GENHD_FL_REMOVABLE;
3392 gd->events |= DISK_EVENT_MEDIA_CHANGE;
3393 gd->event_flags = DISK_EVENT_FLAG_POLL | DISK_EVENT_FLAG_UEVENT;
3394 }
3395
3396 blk_pm_runtime_init(sdp->request_queue, dev);
3397 if (sdp->rpm_autosuspend) {
3398 pm_runtime_set_autosuspend_delay(dev,
3399 sdp->host->hostt->rpm_autosuspend_delay);
3400 }
3401 device_add_disk(dev, gd, NULL);
3402 if (sdkp->capacity)
3403 sd_dif_config_host(sdkp);
3404
3405 sd_revalidate_disk(gd);
3406
3407 if (sdkp->security) {
3408 sdkp->opal_dev = init_opal_dev(sdp, &sd_sec_submit);
3409 if (sdkp->opal_dev)
3410 sd_printk(KERN_NOTICE, sdkp, "supports TCG Opal\n");
3411 }
3412
3413 sd_printk(KERN_NOTICE, sdkp, "Attached SCSI %sdisk\n",
3414 sdp->removable ? "removable " : "");
3415 scsi_autopm_put_device(sdp);
3416
3417 return 0;
3418
3419 out_free_index:
3420 ida_free(&sd_index_ida, index);
3421 out_put:
3422 put_disk(gd);
3423 out_free:
3424 sd_zbc_release_disk(sdkp);
3425 kfree(sdkp);
3426 out:
3427 scsi_autopm_put_device(sdp);
3428 return error;
3429 }
3430
---
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: 13393 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-04-09 18:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-09 18:34 [jth:zone-append.v5 7/10] drivers/scsi/sd.c:3383:8: error: void value not ignored as it ought to be kbuild test robot
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.