Hi Bart, [auto build test WARNING on scsi/for-next] [also build test WARNING on v4.11-rc5 next-20170405] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Bart-Van-Assche/Make-checking-the-scsi_device_get-return-value-mandatory/20170406-072137 base: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next config: x86_64-allyesdebian (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All warnings (new ones prefixed by >>): drivers//scsi/osd/osd_uld.c: In function 'osd_probe': >> drivers//scsi/osd/osd_uld.c:467:2: warning: ignoring return value of 'scsi_device_get', declared with attribute warn_unused_result [-Wunused-result] scsi_device_get(scsi_device); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ vim +/scsi_device_get +467 drivers//scsi/osd/osd_uld.c 95b05a7db Boaz Harrosh 2009-01-25 451 95b05a7db Boaz Harrosh 2009-01-25 452 /* allocate a disk and set it up */ 95b05a7db Boaz Harrosh 2009-01-25 453 /* FIXME: do we need this since sg has already done that */ 95b05a7db Boaz Harrosh 2009-01-25 454 disk = alloc_disk(1); 95b05a7db Boaz Harrosh 2009-01-25 455 if (!disk) { 95b05a7db Boaz Harrosh 2009-01-25 456 OSD_ERR("alloc_disk failed\n"); 95b05a7db Boaz Harrosh 2009-01-25 457 goto err_free_osd; 95b05a7db Boaz Harrosh 2009-01-25 458 } 95b05a7db Boaz Harrosh 2009-01-25 459 disk->major = SCSI_OSD_MAJOR; 95b05a7db Boaz Harrosh 2009-01-25 460 disk->first_minor = oud->minor; 95b05a7db Boaz Harrosh 2009-01-25 461 sprintf(disk->disk_name, "osd%d", oud->minor); 95b05a7db Boaz Harrosh 2009-01-25 462 oud->disk = disk; 95b05a7db Boaz Harrosh 2009-01-25 463 95b05a7db Boaz Harrosh 2009-01-25 464 /* hold one more reference to the scsi_device that will get released 95b05a7db Boaz Harrosh 2009-01-25 465 * in __release, in case a logout is happening while fs is mounted 95b05a7db Boaz Harrosh 2009-01-25 466 */ 95b05a7db Boaz Harrosh 2009-01-25 @467 scsi_device_get(scsi_device); 95b05a7db Boaz Harrosh 2009-01-25 468 osd_dev_init(&oud->od, scsi_device); 95b05a7db Boaz Harrosh 2009-01-25 469 95b05a7db Boaz Harrosh 2009-01-25 470 /* Detect the OSD Version */ 95b05a7db Boaz Harrosh 2009-01-25 471 error = __detect_osd(oud); 95b05a7db Boaz Harrosh 2009-01-25 472 if (error) { 95b05a7db Boaz Harrosh 2009-01-25 473 OSD_ERR("osd detection failed, non-compatible OSD device\n"); 95b05a7db Boaz Harrosh 2009-01-25 474 goto err_put_disk; 95b05a7db Boaz Harrosh 2009-01-25 475 } :::::: The code at line 467 was first introduced by commit :::::: 95b05a7db5865855c32e0bb8b244c3a7aac1cfeb [SCSI] osd_uld: OSD scsi ULD :::::: TO: Boaz Harrosh :::::: CC: James Bottomley --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation