Re: [PATCH v11 1/9] LIB: Introduce a generic PIO mapping method

From: kbuild test robot
Date: Sun Jan 21 2018 - 08:30:04 EST


Hi Zhichang,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.15-rc8 next-20180119]
[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/John-Garry/LPC-legacy-ISA-I-O-support/20180121-194832
config: i386-randconfig-a1-201803 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
# save the attached .config to linux build tree
make ARCH=i386

All warnings (new ones prefixed by >>):

lib/logic_pio.c: In function 'logic_pio_trans_hwaddr':
>> lib/logic_pio.c:175:3: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 2 has type 'resource_size_t' [-Wformat=]
pr_err("resource size 0x%llx cannot fit in IO range size 0x%llx\n",
^
lib/logic_pio.c:175:3: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'resource_size_t' [-Wformat=]

vim +175 lib/logic_pio.c

157
158 /*
159 * This function is generic for translating a hardware address to logical PIO.
160 * @hw_addr: the hardware address of host, can be CPU address or host-local
161 * address;
162 */
163 unsigned long
164 logic_pio_trans_hwaddr(struct fwnode_handle *fwnode, resource_size_t addr,
165 resource_size_t size)
166 {
167 struct logic_pio_hwaddr *range;
168
169 range = find_io_range_by_fwnode(fwnode);
170 if (!range || range->flags == PIO_CPU_MMIO) {
171 pr_err("range not found or invalid\n");
172 return -1;
173 }
174 if (range->size < size) {
> 175 pr_err("resource size 0x%llx cannot fit in IO range size 0x%llx\n",
176 size, range->size);
177 return -1;
178 }
179 return addr - range->hw_start + range->io_start;
180 }
181

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

Attachment: .config.gz
Description: application/gzip