Re: [PATCH] IB: Move PCI dependency from root KConfig to HW's KConfigs

kbuild test robot
2017-06-27T18:48:43Z

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

Hi Yuval,

[auto build test WARNING on rdma/master]
[also build test WARNING on v4.12-rc7 next-20170627]
[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/Yuval-Shaia/IB-Move-PCI-dependency-from-root-KConfig-to-HW-s-KConfigs/20170626-185305
base: https://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma.git master
config: cris-allmodconfig (attached as .config)
compiler: cris-linux-gcc (GCC) 6.2.0
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=cris

All warnings (new ones prefixed by >>):

In file included from include/linux/list.h:8:0,
from include/linux/module.h:9,
from drivers/infiniband/ulp/srp/ib_srp.c:35:
drivers/infiniband/ulp/srp/ib_srp.c: In function 'srp_add_one':
include/linux/kernel.h:767:16: warning: comparison of distinct pointer types lacks a cast
(void) (&max1 == &max2); \
^
include/linux/kernel.h:770:2: note: in expansion of macro '__max'
__max(typeof(x), typeof(y), \
^~~~~
>> drivers/infiniband/ulp/srp/ib_srp.c:3595:19: note: in expansion of macro 'max'
mr_page_shift = max(12, ffs(attr->page_size_cap) - 1);
^~~

vim +/max +3595 drivers/infiniband/ulp/srp/ib_srp.c

f5358a172 Roland Dreier 2006-06-17 3579 struct srp_device *srp_dev;
042dd765b Bart Van Assche 2016-11-21 3580 struct ib_device_attr *attr = &device->attrs;
aef9ec39c Roland Dreier 2005-11-02 3581 struct srp_host *host;
4139032b4 Hal Rosenstock 2015-06-29 3582 int mr_page_shift, p;
52ede08f0 Bart Van Assche 2014-05-20 3583 u64 max_pages_per_mr;
5f071777f Christoph Hellwig 2016-09-05 3584 unsigned int flags = 0;
aef9ec39c Roland Dreier 2005-11-02 3585
249f06561 Bart Van Assche 2016-06-03 3586 srp_dev = kzalloc(sizeof(*srp_dev), GFP_KERNEL);
f5358a172 Roland Dreier 2006-06-17 3587 if (!srp_dev)
4a061b287 Or Gerlitz 2015-12-18 3588 return;
f5358a172 Roland Dreier 2006-06-17 3589
f5358a172 Roland Dreier 2006-06-17 3590 /*
f5358a172 Roland Dreier 2006-06-17 3591 * Use the smallest page size supported by the HCA, down to a
8f26c9ff9 David Dillow 2011-01-14 3592 * minimum of 4096 bytes. We're unlikely to build large sglists
8f26c9ff9 David Dillow 2011-01-14 3593 * out of smaller entries.
f5358a172 Roland Dreier 2006-06-17 3594 */
042dd765b Bart Van Assche 2016-11-21 @3595 mr_page_shift = max(12, ffs(attr->page_size_cap) - 1);
52ede08f0 Bart Van Assche 2014-05-20 3596 srp_dev->mr_page_size = 1 << mr_page_shift;
52ede08f0 Bart Van Assche 2014-05-20 3597 srp_dev->mr_page_mask = ~((u64) srp_dev->mr_page_size - 1);
042dd765b Bart Van Assche 2016-11-21 3598 max_pages_per_mr = attr->max_mr_size;
52ede08f0 Bart Van Assche 2014-05-20 3599 do_div(max_pages_per_mr, srp_dev->mr_page_size);
509c5f33f Bart Van Assche 2016-05-12 3600 pr_debug("%s: %llu / %u = %llu <> %u\n", __func__,
042dd765b Bart Van Assche 2016-11-21 3601 attr->max_mr_size, srp_dev->mr_page_size,
509c5f33f Bart Van Assche 2016-05-12 3602 max_pages_per_mr, SRP_MAX_PAGES_PER_MR);
52ede08f0 Bart Van Assche 2014-05-20 3603 srp_dev->max_pages_per_mr = min_t(u64, SRP_MAX_PAGES_PER_MR,

:::::: The code at line 3595 was first introduced by commit
:::::: 042dd765bdf401c0ccdeb16717b0c2a0b1405f18 IB/srp: Introduce a local variable in srp_add_one()

:::::: TO: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
:::::: CC: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

---
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: 42451 bytes --]