Re: [PATCH 8/9] sd: Implement support for ZBC devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Hannes,

[auto build test WARNING on linus/master]
[also build test WARNING on v4.8-rc7]
[cannot apply to block/for-next next-20160919]
[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/Damien-Le-Moal/ZBC-Zoned-block-device-support/20160920-062608
config: i386-allmodconfig (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=i386 

All warnings (new ones prefixed by >>):

   In file included from include/linux/kernel.h:13:0,
                    from include/linux/sched.h:17,
                    from include/linux/blkdev.h:4,
                    from drivers/scsi/sd_zbc.c:24:
   drivers/scsi/sd_zbc.c: In function 'sd_zbc_report_zones':
>> drivers/scsi/sd_zbc.c:61:11: warning: format '%zu' expects argument of type 'size_t', but argument 6 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
     pr_debug("%s %s [%s]: " fmt,    \
              ^
   include/linux/printk.h:260:21: note: in definition of macro 'pr_fmt'
    #define pr_fmt(fmt) fmt
                        ^~~
   include/linux/printk.h:308:2: note: in expansion of macro 'dynamic_pr_debug'
     dynamic_pr_debug(fmt, ##__VA_ARGS__)
     ^~~~~~~~~~~~~~~~
>> drivers/scsi/sd_zbc.c:61:2: note: in expansion of macro 'pr_debug'
     pr_debug("%s %s [%s]: " fmt,    \
     ^~~~~~~~
>> drivers/scsi/sd_zbc.c:221:2: note: in expansion of macro 'sd_zbc_debug'
     sd_zbc_debug(sdkp, "REPORT ZONES lba %zu len %d\n",
     ^~~~~~~~~~~~
   In file included from include/linux/printk.h:6:0,
                    from include/linux/kernel.h:13,
                    from include/linux/sched.h:17,
                    from include/linux/blkdev.h:4,
                    from drivers/scsi/sd_zbc.c:24:
>> include/linux/kern_levels.h:4:18: warning: format '%zu' expects argument of type 'size_t', but argument 5 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */
                     ^
   include/linux/kern_levels.h:10:18: note: in expansion of macro 'KERN_SOH'
    #define KERN_ERR KERN_SOH "3" /* error conditions */
                     ^~~~~~~~
   include/linux/printk.h:276:9: note: in expansion of macro 'KERN_ERR'
     printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
            ^~~~~~~~
>> drivers/scsi/sd_zbc.c:73:2: note: in expansion of macro 'pr_err'
     pr_err("%s %s [%s]: " fmt,    \
     ^~~~~~
>> drivers/scsi/sd_zbc.c:237:3: note: in expansion of macro 'sd_zbc_err'
      sd_zbc_err(sdkp,
      ^~~~~~~~~~
   In file included from include/linux/kernel.h:13:0,
                    from include/linux/sched.h:17,
                    from include/linux/blkdev.h:4,
                    from drivers/scsi/sd_zbc.c:24:
   drivers/scsi/sd_zbc.c: In function 'sd_zbc_setup_reset_cmnd':
>> drivers/scsi/sd_zbc.c:61:11: warning: format '%zu' expects argument of type 'size_t', but argument 6 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
     pr_debug("%s %s [%s]: " fmt,    \
              ^
   include/linux/printk.h:260:21: note: in definition of macro 'pr_fmt'
    #define pr_fmt(fmt) fmt
                        ^~~
   include/linux/printk.h:308:2: note: in expansion of macro 'dynamic_pr_debug'
     dynamic_pr_debug(fmt, ##__VA_ARGS__)
     ^~~~~~~~~~~~~~~~
>> drivers/scsi/sd_zbc.c:61:2: note: in expansion of macro 'pr_debug'
     pr_debug("%s %s [%s]: " fmt,    \
     ^~~~~~~~
   drivers/scsi/sd_zbc.c:489:4: note: in expansion of macro 'sd_zbc_debug'
       sd_zbc_debug(sdkp,
       ^~~~~~~~~~~~
   In file included from drivers/scsi/sd_zbc.c:37:0:
   drivers/scsi/sd_zbc.c:517:7: warning: format '%zu' expects argument of type 'size_t', but argument 5 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
          "Unaligned reset wp request, start %zu/%zu"
          ^
   drivers/scsi/sd.h:116:31: note: in definition of macro 'sd_printk'
         (sdsk)->disk->disk_name, fmt, ##a) : \
                                  ^~~
   drivers/scsi/sd_zbc.c:517:7: warning: format '%zu' expects argument of type 'size_t', but argument 6 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
          "Unaligned reset wp request, start %zu/%zu"
          ^
   drivers/scsi/sd.h:116:31: note: in definition of macro 'sd_printk'
         (sdsk)->disk->disk_name, fmt, ##a) : \
                                  ^~~
   drivers/scsi/sd_zbc.c:517:7: warning: format '%zu' expects argument of type 'size_t', but argument 7 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
          "Unaligned reset wp request, start %zu/%zu"
          ^
   drivers/scsi/sd.h:116:31: note: in definition of macro 'sd_printk'
         (sdsk)->disk->disk_name, fmt, ##a) : \
                                  ^~~
   drivers/scsi/sd_zbc.c:517:7: warning: format '%zu' expects argument of type 'size_t', but argument 8 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
          "Unaligned reset wp request, start %zu/%zu"
          ^
   drivers/scsi/sd.h:116:31: note: in definition of macro 'sd_printk'
         (sdsk)->disk->disk_name, fmt, ##a) : \
                                  ^~~
   In file included from include/scsi/scsi_cmnd.h:10:0,
                    from drivers/scsi/sd_zbc.c:30:
   drivers/scsi/sd_zbc.c:517:7: warning: format '%zu' expects argument of type 'size_t', but argument 5 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
          "Unaligned reset wp request, start %zu/%zu"
          ^
   include/scsi/scsi_device.h:233:36: note: in definition of macro 'sdev_printk'
     sdev_prefix_printk(l, sdev, NULL, fmt, ##a)
                                       ^~~
>> drivers/scsi/sd_zbc.c:516:4: note: in expansion of macro 'sd_printk'
       sd_printk(KERN_ERR, sdkp,
       ^~~~~~~~~
   drivers/scsi/sd_zbc.c:517:7: warning: format '%zu' expects argument of type 'size_t', but argument 6 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
          "Unaligned reset wp request, start %zu/%zu"
          ^
   include/scsi/scsi_device.h:233:36: note: in definition of macro 'sdev_printk'
     sdev_prefix_printk(l, sdev, NULL, fmt, ##a)
                                       ^~~
>> drivers/scsi/sd_zbc.c:516:4: note: in expansion of macro 'sd_printk'
       sd_printk(KERN_ERR, sdkp,
       ^~~~~~~~~
   drivers/scsi/sd_zbc.c:517:7: warning: format '%zu' expects argument of type 'size_t', but argument 7 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
          "Unaligned reset wp request, start %zu/%zu"
          ^
   include/scsi/scsi_device.h:233:36: note: in definition of macro 'sdev_printk'
     sdev_prefix_printk(l, sdev, NULL, fmt, ##a)
                                       ^~~
>> drivers/scsi/sd_zbc.c:516:4: note: in expansion of macro 'sd_printk'
       sd_printk(KERN_ERR, sdkp,
       ^~~~~~~~~
   drivers/scsi/sd_zbc.c:517:7: warning: format '%zu' expects argument of type 'size_t', but argument 8 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
          "Unaligned reset wp request, start %zu/%zu"
          ^
   include/scsi/scsi_device.h:233:36: note: in definition of macro 'sdev_printk'
     sdev_prefix_printk(l, sdev, NULL, fmt, ##a)
                                       ^~~
>> drivers/scsi/sd_zbc.c:516:4: note: in expansion of macro 'sd_printk'
       sd_printk(KERN_ERR, sdkp,
       ^~~~~~~~~
   In file included from include/linux/kernel.h:13:0,
                    from include/linux/sched.h:17,
                    from include/linux/blkdev.h:4,
                    from drivers/scsi/sd_zbc.c:24:
   drivers/scsi/sd_zbc.c: In function 'sd_zbc_setup_open_cmnd':
>> drivers/scsi/sd_zbc.c:61:11: warning: format '%zu' expects argument of type 'size_t', but argument 6 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
     pr_debug("%s %s [%s]: " fmt,    \
              ^
   include/linux/printk.h:260:21: note: in definition of macro 'pr_fmt'
    #define pr_fmt(fmt) fmt
                        ^~~
   include/linux/printk.h:308:2: note: in expansion of macro 'dynamic_pr_debug'
     dynamic_pr_debug(fmt, ##__VA_ARGS__)
     ^~~~~~~~~~~~~~~~
>> drivers/scsi/sd_zbc.c:61:2: note: in expansion of macro 'pr_debug'
     pr_debug("%s %s [%s]: " fmt,    \
     ^~~~~~~~
   drivers/scsi/sd_zbc.c:573:4: note: in expansion of macro 'sd_zbc_debug'
       sd_zbc_debug(sdkp,
       ^~~~~~~~~~~~
   In file included from drivers/scsi/sd_zbc.c:37:0:
   drivers/scsi/sd_zbc.c:594:7: warning: format '%zu' expects argument of type 'size_t', but argument 5 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
          "Unaligned open zone request, start %zu/%zu"
          ^
   drivers/scsi/sd.h:116:31: note: in definition of macro 'sd_printk'
         (sdsk)->disk->disk_name, fmt, ##a) : \
                                  ^~~
   drivers/scsi/sd_zbc.c:594:7: warning: format '%zu' expects argument of type 'size_t', but argument 6 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
          "Unaligned open zone request, start %zu/%zu"
          ^
   drivers/scsi/sd.h:116:31: note: in definition of macro 'sd_printk'
         (sdsk)->disk->disk_name, fmt, ##a) : \
                                  ^~~
   drivers/scsi/sd_zbc.c:594:7: warning: format '%zu' expects argument of type 'size_t', but argument 7 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
          "Unaligned open zone request, start %zu/%zu"
          ^
   drivers/scsi/sd.h:116:31: note: in definition of macro 'sd_printk'
         (sdsk)->disk->disk_name, fmt, ##a) : \
                                  ^~~
   drivers/scsi/sd_zbc.c:594:7: warning: format '%zu' expects argument of type 'size_t', but argument 8 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
          "Unaligned open zone request, start %zu/%zu"
          ^
   drivers/scsi/sd.h:116:31: note: in definition of macro 'sd_printk'
         (sdsk)->disk->disk_name, fmt, ##a) : \
                                  ^~~
   In file included from include/scsi/scsi_cmnd.h:10:0,
                    from drivers/scsi/sd_zbc.c:30:
   drivers/scsi/sd_zbc.c:594:7: warning: format '%zu' expects argument of type 'size_t', but argument 5 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
          "Unaligned open zone request, start %zu/%zu"
          ^
   include/scsi/scsi_device.h:233:36: note: in definition of macro 'sdev_printk'
     sdev_prefix_printk(l, sdev, NULL, fmt, ##a)
                                       ^~~
   drivers/scsi/sd_zbc.c:593:4: note: in expansion of macro 'sd_printk'
       sd_printk(KERN_ERR, sdkp,
       ^~~~~~~~~
   drivers/scsi/sd_zbc.c:594:7: warning: format '%zu' expects argument of type 'size_t', but argument 6 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
          "Unaligned open zone request, start %zu/%zu"
          ^
   include/scsi/scsi_device.h:233:36: note: in definition of macro 'sdev_printk'
     sdev_prefix_printk(l, sdev, NULL, fmt, ##a)
                                       ^~~
   drivers/scsi/sd_zbc.c:593:4: note: in expansion of macro 'sd_printk'
       sd_printk(KERN_ERR, sdkp,
       ^~~~~~~~~
   drivers/scsi/sd_zbc.c:594:7: warning: format '%zu' expects argument of type 'size_t', but argument 7 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
          "Unaligned open zone request, start %zu/%zu"
          ^
   include/scsi/scsi_device.h:233:36: note: in definition of macro 'sdev_printk'
     sdev_prefix_printk(l, sdev, NULL, fmt, ##a)
                                       ^~~
   drivers/scsi/sd_zbc.c:593:4: note: in expansion of macro 'sd_printk'
       sd_printk(KERN_ERR, sdkp,
       ^~~~~~~~~
   drivers/scsi/sd_zbc.c:594:7: warning: format '%zu' expects argument of type 'size_t', but argument 8 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
          "Unaligned open zone request, start %zu/%zu"
          ^
   include/scsi/scsi_device.h:233:36: note: in definition of macro 'sdev_printk'
     sdev_prefix_printk(l, sdev, NULL, fmt, ##a)
                                       ^~~
   drivers/scsi/sd_zbc.c:593:4: note: in expansion of macro 'sd_printk'
       sd_printk(KERN_ERR, sdkp,
       ^~~~~~~~~
   In file included from include/linux/kernel.h:13:0,
                    from include/linux/sched.h:17,
                    from include/linux/blkdev.h:4,
                    from drivers/scsi/sd_zbc.c:24:
   drivers/scsi/sd_zbc.c: In function 'sd_zbc_setup_close_cmnd':
>> drivers/scsi/sd_zbc.c:61:11: warning: format '%zu' expects argument of type 'size_t', but argument 6 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
     pr_debug("%s %s [%s]: " fmt,    \
              ^
   include/linux/printk.h:260:21: note: in definition of macro 'pr_fmt'
    #define pr_fmt(fmt) fmt
                        ^~~
   include/linux/printk.h:308:2: note: in expansion of macro 'dynamic_pr_debug'
     dynamic_pr_debug(fmt, ##__VA_ARGS__)
     ^~~~~~~~~~~~~~~~
>> drivers/scsi/sd_zbc.c:61:2: note: in expansion of macro 'pr_debug'
     pr_debug("%s %s [%s]: " fmt,    \
     ^~~~~~~~
   drivers/scsi/sd_zbc.c:645:4: note: in expansion of macro 'sd_zbc_debug'
       sd_zbc_debug(sdkp,
       ^~~~~~~~~~~~
   In file included from drivers/scsi/sd_zbc.c:37:0:
   drivers/scsi/sd_zbc.c:666:7: warning: format '%zu' expects argument of type 'size_t', but argument 5 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
          "Unaligned close zone request, start %zu/%zu"
          ^
   drivers/scsi/sd.h:116:31: note: in definition of macro 'sd_printk'
         (sdsk)->disk->disk_name, fmt, ##a) : \
                                  ^~~
   drivers/scsi/sd_zbc.c:666:7: warning: format '%zu' expects argument of type 'size_t', but argument 6 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
          "Unaligned close zone request, start %zu/%zu"
          ^
   drivers/scsi/sd.h:116:31: note: in definition of macro 'sd_printk'
         (sdsk)->disk->disk_name, fmt, ##a) : \
                                  ^~~
   drivers/scsi/sd_zbc.c:666:7: warning: format '%zu' expects argument of type 'size_t', but argument 7 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
          "Unaligned close zone request, start %zu/%zu"
          ^
   drivers/scsi/sd.h:116:31: note: in definition of macro 'sd_printk'
         (sdsk)->disk->disk_name, fmt, ##a) : \
                                  ^~~
   drivers/scsi/sd_zbc.c:666:7: warning: format '%zu' expects argument of type 'size_t', but argument 8 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
          "Unaligned close zone request, start %zu/%zu"
          ^
   drivers/scsi/sd.h:116:31: note: in definition of macro 'sd_printk'
         (sdsk)->disk->disk_name, fmt, ##a) : \
                                  ^~~
   In file included from include/scsi/scsi_cmnd.h:10:0,
                    from drivers/scsi/sd_zbc.c:30:
   drivers/scsi/sd_zbc.c:666:7: warning: format '%zu' expects argument of type 'size_t', but argument 5 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
          "Unaligned close zone request, start %zu/%zu"
          ^
   include/scsi/scsi_device.h:233:36: note: in definition of macro 'sdev_printk'
     sdev_prefix_printk(l, sdev, NULL, fmt, ##a)
                                       ^~~
   drivers/scsi/sd_zbc.c:665:4: note: in expansion of macro 'sd_printk'
       sd_printk(KERN_ERR, sdkp,
       ^~~~~~~~~
   drivers/scsi/sd_zbc.c:666:7: warning: format '%zu' expects argument of type 'size_t', but argument 6 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
          "Unaligned close zone request, start %zu/%zu"
          ^
   include/scsi/scsi_device.h:233:36: note: in definition of macro 'sdev_printk'
     sdev_prefix_printk(l, sdev, NULL, fmt, ##a)
                                       ^~~
   drivers/scsi/sd_zbc.c:665:4: note: in expansion of macro 'sd_printk'
       sd_printk(KERN_ERR, sdkp,
       ^~~~~~~~~
   drivers/scsi/sd_zbc.c:666:7: warning: format '%zu' expects argument of type 'size_t', but argument 7 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
          "Unaligned close zone request, start %zu/%zu"
          ^
   include/scsi/scsi_device.h:233:36: note: in definition of macro 'sdev_printk'
     sdev_prefix_printk(l, sdev, NULL, fmt, ##a)
                                       ^~~
   drivers/scsi/sd_zbc.c:665:4: note: in expansion of macro 'sd_printk'
       sd_printk(KERN_ERR, sdkp,
       ^~~~~~~~~
   drivers/scsi/sd_zbc.c:666:7: warning: format '%zu' expects argument of type 'size_t', but argument 8 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
          "Unaligned close zone request, start %zu/%zu"
          ^
   include/scsi/scsi_device.h:233:36: note: in definition of macro 'sdev_printk'
     sdev_prefix_printk(l, sdev, NULL, fmt, ##a)
                                       ^~~
   drivers/scsi/sd_zbc.c:665:4: note: in expansion of macro 'sd_printk'
       sd_printk(KERN_ERR, sdkp,
       ^~~~~~~~~
   In file included from include/linux/kernel.h:13:0,
                    from include/linux/sched.h:17,
                    from include/linux/blkdev.h:4,
                    from drivers/scsi/sd_zbc.c:24:
   drivers/scsi/sd_zbc.c: In function 'sd_zbc_setup_finish_cmnd':
>> drivers/scsi/sd_zbc.c:61:11: warning: format '%zu' expects argument of type 'size_t', but argument 6 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
     pr_debug("%s %s [%s]: " fmt,    \
              ^
   include/linux/printk.h:260:21: note: in definition of macro 'pr_fmt'
    #define pr_fmt(fmt) fmt
                        ^~~
   include/linux/printk.h:308:2: note: in expansion of macro 'dynamic_pr_debug'
     dynamic_pr_debug(fmt, ##__VA_ARGS__)
     ^~~~~~~~~~~~~~~~
>> drivers/scsi/sd_zbc.c:61:2: note: in expansion of macro 'pr_debug'
     pr_debug("%s %s [%s]: " fmt,    \
     ^~~~~~~~
   drivers/scsi/sd_zbc.c:717:4: note: in expansion of macro 'sd_zbc_debug'
       sd_zbc_debug(sdkp,
       ^~~~~~~~~~~~
   In file included from drivers/scsi/sd_zbc.c:37:0:
   drivers/scsi/sd_zbc.c:734:7: warning: format '%zu' expects argument of type 'size_t', but argument 5 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
          "Unaligned finish zone request, start %zu/%zu"
          ^
   drivers/scsi/sd.h:116:31: note: in definition of macro 'sd_printk'
         (sdsk)->disk->disk_name, fmt, ##a) : \
                                  ^~~
   drivers/scsi/sd_zbc.c:734:7: warning: format '%zu' expects argument of type 'size_t', but argument 6 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
          "Unaligned finish zone request, start %zu/%zu"
          ^
   drivers/scsi/sd.h:116:31: note: in definition of macro 'sd_printk'
         (sdsk)->disk->disk_name, fmt, ##a) : \
                                  ^~~
   drivers/scsi/sd_zbc.c:734:7: warning: format '%zu' expects argument of type 'size_t', but argument 7 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
          "Unaligned finish zone request, start %zu/%zu"
          ^
   drivers/scsi/sd.h:116:31: note: in definition of macro 'sd_printk'
         (sdsk)->disk->disk_name, fmt, ##a) : \
                                  ^~~
   drivers/scsi/sd_zbc.c:734:7: warning: format '%zu' expects argument of type 'size_t', but argument 8 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
          "Unaligned finish zone request, start %zu/%zu"
          ^
   drivers/scsi/sd.h:116:31: note: in definition of macro 'sd_printk'
         (sdsk)->disk->disk_name, fmt, ##a) : \
                                  ^~~
   In file included from include/scsi/scsi_cmnd.h:10:0,
                    from drivers/scsi/sd_zbc.c:30:
   drivers/scsi/sd_zbc.c:734:7: warning: format '%zu' expects argument of type 'size_t', but argument 5 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
          "Unaligned finish zone request, start %zu/%zu"
          ^
   include/scsi/scsi_device.h:233:36: note: in definition of macro 'sdev_printk'
     sdev_prefix_printk(l, sdev, NULL, fmt, ##a)
                                       ^~~
   drivers/scsi/sd_zbc.c:733:4: note: in expansion of macro 'sd_printk'
       sd_printk(KERN_ERR, sdkp,
       ^~~~~~~~~
   drivers/scsi/sd_zbc.c:734:7: warning: format '%zu' expects argument of type 'size_t', but argument 6 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
          "Unaligned finish zone request, start %zu/%zu"
          ^
   include/scsi/scsi_device.h:233:36: note: in definition of macro 'sdev_printk'
     sdev_prefix_printk(l, sdev, NULL, fmt, ##a)
                                       ^~~
   drivers/scsi/sd_zbc.c:733:4: note: in expansion of macro 'sd_printk'
       sd_printk(KERN_ERR, sdkp,
       ^~~~~~~~~
   drivers/scsi/sd_zbc.c:734:7: warning: format '%zu' expects argument of type 'size_t', but argument 7 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
          "Unaligned finish zone request, start %zu/%zu"
          ^
   include/scsi/scsi_device.h:233:36: note: in definition of macro 'sdev_printk'
     sdev_prefix_printk(l, sdev, NULL, fmt, ##a)
                                       ^~~
   drivers/scsi/sd_zbc.c:733:4: note: in expansion of macro 'sd_printk'
       sd_printk(KERN_ERR, sdkp,
       ^~~~~~~~~
   drivers/scsi/sd_zbc.c:734:7: warning: format '%zu' expects argument of type 'size_t', but argument 8 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
          "Unaligned finish zone request, start %zu/%zu"
          ^
   include/scsi/scsi_device.h:233:36: note: in definition of macro 'sdev_printk'
     sdev_prefix_printk(l, sdev, NULL, fmt, ##a)
                                       ^~~
   drivers/scsi/sd_zbc.c:733:4: note: in expansion of macro 'sd_printk'
       sd_printk(KERN_ERR, sdkp,
       ^~~~~~~~~
   In file included from include/linux/kernel.h:13:0,
                    from include/linux/sched.h:17,
                    from include/linux/blkdev.h:4,
                    from drivers/scsi/sd_zbc.c:24:
   drivers/scsi/sd_zbc.c: In function 'sd_zbc_setup_read_write':
>> drivers/scsi/sd_zbc.c:61:11: warning: format '%zu' expects argument of type 'size_t', but argument 6 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
     pr_debug("%s %s [%s]: " fmt,    \
              ^
   include/linux/printk.h:260:21: note: in definition of macro 'pr_fmt'
    #define pr_fmt(fmt) fmt
                        ^~~
   include/linux/printk.h:308:2: note: in expansion of macro 'dynamic_pr_debug'
     dynamic_pr_debug(fmt, ##__VA_ARGS__)
     ^~~~~~~~~~~~~~~~
>> drivers/scsi/sd_zbc.c:61:2: note: in expansion of macro 'pr_debug'
     pr_debug("%s %s [%s]: " fmt,    \
     ^~~~~~~~
   drivers/scsi/sd_zbc.c:783:3: note: in expansion of macro 'sd_zbc_debug'
      sd_zbc_debug(sdkp,
      ^~~~~~~~~~~~
   In file included from drivers/scsi/sd_zbc.c:37:0:
   drivers/scsi/sd_zbc.c: In function 'sd_zbc_read_zones':
   drivers/scsi/sd_zbc.c:985:8: warning: format '%zu' expects argument of type 'size_t', but argument 5 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
           "Changing capacity from %zu "
           ^
   drivers/scsi/sd.h:116:31: note: in definition of macro 'sd_printk'
         (sdsk)->disk->disk_name, fmt, ##a) : \
                                  ^~~

vim +61 drivers/scsi/sd_zbc.c

    18	 * along with this program; see the file COPYING.  If not, write to
    19	 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139,
    20	 * USA.
    21	 *
    22	 */
    23	
  > 24	#include <linux/blkdev.h>
    25	#include <linux/rbtree.h>
    26	
    27	#include <asm/unaligned.h>
    28	
    29	#include <scsi/scsi.h>
  > 30	#include <scsi/scsi_cmnd.h>
    31	#include <scsi/scsi_dbg.h>
    32	#include <scsi/scsi_device.h>
    33	#include <scsi/scsi_driver.h>
    34	#include <scsi/scsi_host.h>
    35	#include <scsi/scsi_eh.h>
    36	
  > 37	#include "sd.h"
    38	#include "scsi_priv.h"
    39	
    40	enum zbc_zone_type {
    41		ZBC_ZONE_TYPE_CONV = 0x1,
    42		ZBC_ZONE_TYPE_SEQWRITE_REQ,
    43		ZBC_ZONE_TYPE_SEQWRITE_PREF,
    44		ZBC_ZONE_TYPE_RESERVED,
    45	};
    46	
    47	enum zbc_zone_cond {
    48		ZBC_ZONE_COND_NO_WP,
    49		ZBC_ZONE_COND_EMPTY,
    50		ZBC_ZONE_COND_IMP_OPEN,
    51		ZBC_ZONE_COND_EXP_OPEN,
    52		ZBC_ZONE_COND_CLOSED,
    53		ZBC_ZONE_COND_READONLY = 0xd,
    54		ZBC_ZONE_COND_FULL,
    55		ZBC_ZONE_COND_OFFLINE,
    56	};
    57	
    58	#define SD_ZBC_BUF_SIZE 131072
    59	
    60	#define sd_zbc_debug(sdkp, fmt, args...)			\
  > 61		pr_debug("%s %s [%s]: " fmt,				\
    62			 dev_driver_string(&(sdkp)->device->sdev_gendev), \
    63			 dev_name(&(sdkp)->device->sdev_gendev),	 \
    64			 (sdkp)->disk->disk_name, ## args)
    65	
    66	#define sd_zbc_debug_ratelimit(sdkp, fmt, args...)		\
    67		do {							\
    68			if (printk_ratelimit())				\
    69				sd_zbc_debug(sdkp, fmt, ## args);	\
    70		} while( 0 )
    71	
    72	#define sd_zbc_err(sdkp, fmt, args...)				\
  > 73		pr_err("%s %s [%s]: " fmt,				\
    74		       dev_driver_string(&(sdkp)->device->sdev_gendev),	\
    75		       dev_name(&(sdkp)->device->sdev_gendev),		\
    76		       (sdkp)->disk->disk_name, ## args)
    77	
    78	struct zbc_zone_work {
    79		struct work_struct 	zone_work;
    80		struct scsi_disk 	*sdkp;
    81		sector_t		sector;
    82		sector_t		nr_sects;
    83		bool 			init;
    84		unsigned int		nr_zones;
    85	};
    86	
    87	struct blk_zone *zbc_desc_to_zone(struct scsi_disk *sdkp, unsigned char *rec)
    88	{
    89		struct blk_zone *zone;
    90	
    91		zone = kzalloc(sizeof(struct blk_zone), GFP_KERNEL);
    92		if (!zone)
    93			return NULL;
    94	
    95		/* Zone type */
    96		switch(rec[0] & 0x0f) {
    97		case ZBC_ZONE_TYPE_CONV:
    98		case ZBC_ZONE_TYPE_SEQWRITE_REQ:
    99		case ZBC_ZONE_TYPE_SEQWRITE_PREF:
   100			zone->type = rec[0] & 0x0f;
   101			break;
   102		default:
   103			zone->type = BLK_ZONE_TYPE_UNKNOWN;
   104			break;
   105		}
   106	
   107		/* Zone condition */
   108		zone->cond = (rec[1] >> 4) & 0xf;
   109		if (rec[1] & 0x01)
   110			zone->reset = 1;
   111		if (rec[1] & 0x02)
   112			zone->non_seq = 1;
   113	
   114		/* Zone start sector and length */
   115		zone->len = logical_to_sectors(sdkp->device,
   116					       get_unaligned_be64(&rec[8]));
   117		zone->start = logical_to_sectors(sdkp->device,
   118						 get_unaligned_be64(&rec[16]));
   119	
   120		/* Zone write pointer */
   121		if (blk_zone_is_empty(zone) &&
   122		    zone->wp != zone->start)
   123			zone->wp = zone->start;
   124		else if (blk_zone_is_full(zone))
   125			zone->wp = zone->start + zone->len;
   126		else if (blk_zone_is_seq(zone))
   127			zone->wp = logical_to_sectors(sdkp->device,
   128						      get_unaligned_be64(&rec[24]));
   129		else
   130			zone->wp = (sector_t)-1;
   131	
   132		return zone;
   133	}
   134	
   135	static int zbc_parse_zones(struct scsi_disk *sdkp, unsigned char *buf,
   136				   unsigned int buf_len, sector_t *next_sector)
   137	{
   138		struct request_queue *q = sdkp->disk->queue;
   139		sector_t capacity = logical_to_sectors(sdkp->device, sdkp->capacity);
   140		unsigned char *rec = buf;
   141		unsigned int zone_len, list_length;
   142	
   143		/* Parse REPORT ZONES header */
   144		list_length = get_unaligned_be32(&buf[0]);
   145		rec = buf + 64;
   146		list_length += 64;
   147	
   148		if (list_length < buf_len)
   149			buf_len = list_length;
   150	
   151		/* Parse REPORT ZONES zone descriptors */
   152		*next_sector = capacity;
   153		while (rec < buf + buf_len) {
   154	
   155			struct blk_zone *new, *old;
   156	
   157			new = zbc_desc_to_zone(sdkp, rec);
   158			if (!new)
   159				return -ENOMEM;
   160	
   161			zone_len = new->len;
   162			*next_sector = new->start + zone_len;
   163	
   164			old = blk_insert_zone(q, new);
   165			if (old) {
   166				blk_lock_zone(old);
   167	
   168				/*
   169				 * Always update the zone state flags and the zone
   170				 * offline and read-only condition as the drive may
   171				 * change those independently of the commands being
   172				 * executed
   173				 */
   174				old->reset = new->reset;
   175				old->non_seq = new->non_seq;
   176				if (blk_zone_is_offline(new) ||
   177				    blk_zone_is_readonly(new))
   178					old->cond = new->cond;
   179	
   180				if (blk_zone_in_update(old)) {
   181					old->cond = new->cond;
   182					old->wp = new->wp;
   183					blk_clear_zone_update(old);
   184				}
   185	
   186				blk_unlock_zone(old);
   187	
   188				kfree(new);
   189			}
   190	
   191			rec += 64;
   192	
   193		}
   194	
   195		return 0;
   196	}
   197	
   198	/**
   199	 * sd_zbc_report_zones - Issue a REPORT ZONES scsi command
   200	 * @sdkp: SCSI disk to which the command should be send
   201	 * @buffer: response buffer
   202	 * @bufflen: length of @buffer
   203	 * @start_sector: logical sector for the zone information should be reported
   204	 * @option: reporting option to be used
   205	 * @partial: flag to set the 'partial' bit for report zones command
   206	 */
   207	int sd_zbc_report_zones(struct scsi_disk *sdkp, unsigned char *buffer,
   208				int bufflen, sector_t start_sector,
   209				enum zbc_zone_reporting_options option, bool partial)
   210	{
   211		struct scsi_device *sdp = sdkp->device;
   212		const int timeout = sdp->request_queue->rq_timeout;
   213		struct scsi_sense_hdr sshdr;
   214		sector_t start_lba = sectors_to_logical(sdkp->device, start_sector);
   215		unsigned char cmd[16];
   216		int result;
   217	
   218		if (!scsi_device_online(sdp))
   219			return -ENODEV;
   220	
 > 221		sd_zbc_debug(sdkp, "REPORT ZONES lba %zu len %d\n",
   222			     start_lba, bufflen);
   223	
   224		memset(cmd, 0, 16);
   225		cmd[0] = ZBC_IN;
   226		cmd[1] = ZI_REPORT_ZONES;
   227		put_unaligned_be64(start_lba, &cmd[2]);
   228		put_unaligned_be32(bufflen, &cmd[10]);
   229		cmd[14] = (partial ? ZBC_REPORT_ZONE_PARTIAL : 0) | option;
   230		memset(buffer, 0, bufflen);
   231	
   232		result = scsi_execute_req(sdp, cmd, DMA_FROM_DEVICE,
   233					buffer, bufflen, &sshdr,
   234					timeout, SD_MAX_RETRIES, NULL);
   235	
   236		if (result) {
 > 237			sd_zbc_err(sdkp,
   238				   "REPORT ZONES lba %zu failed with %d/%d\n",
   239				   start_lba, host_byte(result), driver_byte(result));
   240			return -EIO;

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

Attachment: .config.gz
Description: application/gzip


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux