Re: [PATCH v14 1/5] lib/xbitmap: Introduce xbitmap

From: kbuild test robot
Date: Sat Aug 19 2017 - 16:31:11 EST


Hi Matthew,

[auto build test WARNING on linus/master]
[also build test WARNING on v4.13-rc5 next-20170817]
[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/Wei-Wang/lib-xbitmap-Introduce-xbitmap/20170820-035516
config: i386-tinyconfig (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 >>):

lib/xbitmap.c: In function 'xb_test_bit':
>> lib/xbitmap.c:153:26: warning: passing argument 1 of 'xb_bit_ops' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
return (bool)xb_bit_ops(xb, bit, XB_TEST);
^~
lib/xbitmap.c:23:12: note: expected 'struct xb *' but argument is of type 'const struct xb *'
static int xb_bit_ops(struct xb *xb, unsigned long bit, enum xb_ops ops)
^~~~~~~~~~

vim +153 lib/xbitmap.c

142
143 /**
144 * xb_test_bit - test a bit in the xbitmap
145 * @xb: the xbitmap tree used to record the bit
146 * @bit: index of the bit to set
147 *
148 * This function is used to test a bit in the xbitmap.
149 * Returns: 1 if the bit is set, or 0 otherwise.
150 */
151 bool xb_test_bit(const struct xb *xb, unsigned long bit)
152 {
> 153 return (bool)xb_bit_ops(xb, bit, XB_TEST);
154 }
155 EXPORT_SYMBOL(xb_test_bit);
156

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

Attachment: .config.gz
Description: application/gzip