Re: [PATCH] scsi:Prevent deletion of SCSI block device in use

From: kbuild test robot
Date: Mon Aug 22 2016 - 11:38:20 EST


Hi Vasundhara,

[auto build test WARNING on scsi/for-next]
[also build test WARNING on v4.8-rc3 next-20160822]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on]
[Check https://git-scm.com/docs/git-format-patch for more information]

url: https://github.com/0day-ci/linux/commits/Vasundhara-Gurunath/scsi-Prevent-deletion-of-SCSI-block-device-in-use/20160819-184126
base: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: x86_64-randconfig-s2-08191801 (attached as .config)
compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64

All warnings (new ones prefixed by >>):

drivers/scsi/scsi_sysfs.c: In function 'sdev_store_delete':
>> drivers/scsi/scsi_sysfs.c:744: warning: format '%d' expects type 'int', but argument 5 has type 'long int'

vim +744 drivers/scsi/scsi_sysfs.c

728 sdev->delete_msg_buf =
729 kmalloc(128, GFP_KERNEL);
730 memset(sdev->delete_msg_buf, 0, 128);
731 }
732 do_gettimeofday(&tv);
733 time_to_tm(tv.tv_sec, 0, &tms);
734 sprintf(sdev->delete_msg_buf,
735 "Last delete attempt: %d:%d:%d %02d:%02d\n"
736 "Open Count : %d\n"
737 "IO Active Count : %d\n"
738 "IO Done Count : %d\n",
739 tms.tm_mday, tms.tm_mon + 1,
740 tms.tm_year + 1900,
741 tms.tm_hour, tms.tm_min,
742 sdev->usage_count,
743 sdev->iorequest_cnt.counter,
> 744 sdev->iodone_cnt.counter);
745
746 return count;
747 }
748 }
749
750 if (device_remove_file_self(dev, attr))
751 scsi_remove_device(to_scsi_device(dev));
752 return count;

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: Binary data