mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Fam Zheng <famz@redhat.com>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	famz@redhat.com, linux-scsi@vger.kernel.org,
	Laurence Oberman <loberman@redhat.com>,
	"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
Subject: Re: [PATCH v2] sd: Consider max_xfer_blocks if opt_xfer_blocks is unusable
Date: Tue, 28 Mar 2017 15:14:04 +0800	[thread overview]
Message-ID: <201703281509.Y1dEOB2j%fengguang.wu@intel.com> (raw)
In-Reply-To: <20170328044126.10006-1-famz@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 3578 bytes --]

Hi Fam,

[auto build test WARNING on scsi/for-next]
[also build test WARNING on v4.11-rc4 next-20170327]
[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/Fam-Zheng/sd-Consider-max_xfer_blocks-if-opt_xfer_blocks-is-unusable/20170328-141853
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: x86_64-randconfig-x016-201713 (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 >>):

   In file included from include/linux/list.h:8:0,
                    from include/linux/module.h:9,
                    from drivers//scsi/sd.c:35:
   drivers//scsi/sd.c: In function 'sd_revalidate_disk':
   include/linux/kernel.h:755:16: warning: comparison of distinct pointer types lacks a cast
     (void) (&min1 == &min2);   \
                   ^
   include/linux/kernel.h:758:2: note: in expansion of macro '__min'
     __min(typeof(x), typeof(y),   \
     ^~~~~
>> include/linux/kernel.h:783:39: note: in expansion of macro 'min'
     __x == 0 ? __y : ((__y == 0) ? __x : min(__x, __y)); })
                                          ^~~
>> drivers//scsi/sd.c:2960:11: note: in expansion of macro 'min_not_zero'
     rw_max = min_not_zero(rw_max, logical_to_sectors(sdp, dev_max));
              ^~~~~~~~~~~~
--
   In file included from include/linux/list.h:8:0,
                    from include/linux/module.h:9,
                    from drivers/scsi/sd.c:35:
   drivers/scsi/sd.c: In function 'sd_revalidate_disk':
   include/linux/kernel.h:755:16: warning: comparison of distinct pointer types lacks a cast
     (void) (&min1 == &min2);   \
                   ^
   include/linux/kernel.h:758:2: note: in expansion of macro '__min'
     __min(typeof(x), typeof(y),   \
     ^~~~~
>> include/linux/kernel.h:783:39: note: in expansion of macro 'min'
     __x == 0 ? __y : ((__y == 0) ? __x : min(__x, __y)); })
                                          ^~~
   drivers/scsi/sd.c:2960:11: note: in expansion of macro 'min_not_zero'
     rw_max = min_not_zero(rw_max, logical_to_sectors(sdp, dev_max));
              ^~~~~~~~~~~~

vim +/min_not_zero +2960 drivers//scsi/sd.c

  2944		dev_max = min_not_zero(dev_max, sdkp->max_xfer_blocks);
  2945		q->limits.max_dev_sectors = logical_to_sectors(sdp, dev_max);
  2946	
  2947		/*
  2948		 * Use the device's preferred I/O size for reads and writes
  2949		 * unless the reported value is unreasonably small, large, or
  2950		 * garbage.
  2951		 */
  2952		if (sdkp->opt_xfer_blocks &&
  2953		    sdkp->opt_xfer_blocks <= dev_max &&
  2954		    sdkp->opt_xfer_blocks <= SD_DEF_XFER_BLOCKS &&
  2955		    logical_to_bytes(sdp, sdkp->opt_xfer_blocks) >= PAGE_SIZE) {
  2956			q->limits.io_opt = logical_to_bytes(sdp, sdkp->opt_xfer_blocks);
  2957			rw_max = logical_to_sectors(sdp, sdkp->opt_xfer_blocks);
  2958		} else
  2959			rw_max = BLK_DEF_MAX_SECTORS;
> 2960		rw_max = min_not_zero(rw_max, logical_to_sectors(sdp, dev_max));
  2961	
  2962		/* Combine with controller limits */
  2963		q->limits.max_sectors = min(rw_max, queue_max_hw_sectors(q));
  2964	
  2965		set_capacity(disk, logical_to_sectors(sdp, sdkp->capacity));
  2966		sd_config_write_same(sdkp);
  2967		kfree(buffer);
  2968	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28375 bytes --]

  reply	other threads:[~2017-03-28  7:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-28  4:41 Fam Zheng
2017-03-28  7:14 ` kbuild test robot [this message]
2017-03-30  2:37 ` Martin K. Petersen
2017-03-30  4:13   ` Fam Zheng
2017-03-30 15:30     ` Martin K. Petersen
2017-03-31  4:05       ` Fam Zheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201703281509.Y1dEOB2j%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=famz@redhat.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=loberman@redhat.com \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®