Hi Elie, I love your patch! Perhaps something to improve: [auto build test WARNING on wsa/i2c/for-next] [also build test WARNING on v4.19 next-20181019] [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/Elie-Morisse/i2c-Add-PCI-and-platform-drivers-for-the-AMD-MP2-I2C-controller/20181024-013625 base: https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next config: i386-allyesconfig (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=i386 All warnings (new ones prefixed by >>): drivers/i2c/busses/i2c-amd-pci-mp2.c: In function 'amd_mp2_debugfs_read': >> drivers/i2c/busses/i2c-amd-pci-mp2.c:298:66: warning: comparison of distinct pointer types lacks a cast buf_size = min(count, 0x800ul); ^ vim +298 drivers/i2c/busses/i2c-amd-pci-mp2.c 285 286 static ssize_t amd_mp2_debugfs_read(struct file *filp, char __user *ubuf, 287 size_t count, loff_t *offp) 288 { 289 struct amd_mp2_dev *privdata; 290 void __iomem *mmio; 291 u8 *buf; 292 size_t buf_size; 293 ssize_t ret, off; 294 u32 v32; 295 296 privdata = filp->private_data; 297 mmio = privdata->mmio; > 298 buf_size = min(count, 0x800ul); 299 buf = kmalloc(buf_size, GFP_KERNEL); 300 301 if (!buf) 302 return -ENOMEM; 303 304 off = 0; 305 off += scnprintf(buf + off, buf_size - off, 306 "Mp2 Device Information:\n"); 307 308 off += scnprintf(buf + off, buf_size - off, 309 "========================\n"); 310 off += scnprintf(buf + off, buf_size - off, 311 "\tMP2 C2P Message Register Dump:\n\n"); 312 v32 = readl(privdata->mmio + AMD_C2P_MSG0); 313 off += scnprintf(buf + off, buf_size - off, 314 "AMD_C2P_MSG0 -\t\t\t%#06x\n", v32); 315 316 v32 = readl(privdata->mmio + AMD_C2P_MSG1); 317 off += scnprintf(buf + off, buf_size - off, 318 "AMD_C2P_MSG1 -\t\t\t%#06x\n", v32); 319 320 v32 = readl(privdata->mmio + AMD_C2P_MSG2); 321 off += scnprintf(buf + off, buf_size - off, 322 "AMD_C2P_MSG2 -\t\t\t%#06x\n", v32); 323 324 v32 = readl(privdata->mmio + AMD_C2P_MSG3); 325 off += scnprintf(buf + off, buf_size - off, 326 "AMD_C2P_MSG3 -\t\t\t%#06x\n", v32); 327 328 v32 = readl(privdata->mmio + AMD_C2P_MSG4); 329 off += scnprintf(buf + off, buf_size - off, 330 "AMD_C2P_MSG4 -\t\t\t%#06x\n", v32); 331 332 v32 = readl(privdata->mmio + AMD_C2P_MSG5); 333 off += scnprintf(buf + off, buf_size - off, 334 "AMD_C2P_MSG5 -\t\t\t%#06x\n", v32); 335 336 v32 = readl(privdata->mmio + AMD_C2P_MSG6); 337 off += scnprintf(buf + off, buf_size - off, 338 "AMD_C2P_MSG6 -\t\t\t%#06x\n", v32); 339 340 v32 = readl(privdata->mmio + AMD_C2P_MSG7); 341 off += scnprintf(buf + off, buf_size - off, 342 "AMD_C2P_MSG7 -\t\t\t%#06x\n", v32); 343 344 v32 = readl(privdata->mmio + AMD_C2P_MSG8); 345 off += scnprintf(buf + off, buf_size - off, 346 "AMD_C2P_MSG8 -\t\t\t%#06x\n", v32); 347 348 v32 = readl(privdata->mmio + AMD_C2P_MSG9); 349 off += scnprintf(buf + off, buf_size - off, 350 "AMD_C2P_MSG9 -\t\t\t%#06x\n", v32); 351 352 off += scnprintf(buf + off, buf_size - off, 353 "\n\tMP2 P2C Message Register Dump:\n\n"); 354 355 v32 = readl(privdata->mmio + AMD_P2C_MSG1); 356 off += scnprintf(buf + off, buf_size - off, 357 "AMD_P2C_MSG1 -\t\t\t%#06x\n", v32); 358 359 v32 = readl(privdata->mmio + AMD_P2C_MSG2); 360 off += scnprintf(buf + off, buf_size - off, 361 "AMD_P2C_MSG2 -\t\t\t%#06x\n", v32); 362 363 v32 = readl(privdata->mmio + AMD_P2C_MSG_INTEN); 364 off += scnprintf(buf + off, buf_size - off, 365 "AMD_P2C_MSG_INTEN -\t\t%#06x\n", v32); 366 367 v32 = readl(privdata->mmio + AMD_P2C_MSG_INTSTS); 368 off += scnprintf(buf + off, buf_size - off, 369 "AMD_P2C_MSG_INTSTS -\t\t%#06x\n", v32); 370 371 ret = simple_read_from_buffer(ubuf, count, offp, buf, off); 372 kfree(buf); 373 return ret; 374 } 375 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip