Hi Elie, I love your patch! Yet something to improve: [auto build test ERROR on wsa/i2c/for-next] [also build test ERROR on v4.20 next-20181224] [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-drivers-for-the-AMD-PCIe-MP2-I2C-controller/20181223-034458 base: https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next config: i386-randconfig-x013-12261115 (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 errors (new ones prefixed by >>): drivers/i2c/busses/i2c-amd-mp2-plat.c: In function 'i2c_amd_probe': >> drivers/i2c/busses/i2c-amd-mp2-plat.c:294:17: error: 'struct amd_i2c_common' has no member named 'suspend' i2c_dev->common.suspend = &i2c_amd_suspend; ^ >> drivers/i2c/busses/i2c-amd-mp2-plat.c:294:29: error: 'i2c_amd_suspend' undeclared (first use in this function); did you mean 'i2c_amd_func'? i2c_dev->common.suspend = &i2c_amd_suspend; ^~~~~~~~~~~~~~~ i2c_amd_func drivers/i2c/busses/i2c-amd-mp2-plat.c:294:29: note: each undeclared identifier is reported only once for each function it appears in >> drivers/i2c/busses/i2c-amd-mp2-plat.c:295:18: error: 'struct amd_i2c_common' has no member named 'resume'; did you mean 'reqcmd'? i2c_dev->common.resume = &i2c_amd_resume; ^~~~~~ reqcmd >> drivers/i2c/busses/i2c-amd-mp2-plat.c:295:28: error: 'i2c_amd_resume' undeclared (first use in this function); did you mean 'i2c_amd_probe'? i2c_dev->common.resume = &i2c_amd_resume; ^~~~~~~~~~~~~~ i2c_amd_probe vim +294 drivers/i2c/busses/i2c-amd-mp2-plat.c 263 264 static int i2c_amd_probe(struct platform_device *pdev) 265 { 266 int ret; 267 struct amd_i2c_dev *i2c_dev; 268 acpi_handle handle = ACPI_HANDLE(&pdev->dev); 269 struct acpi_device *adev; 270 struct amd_mp2_dev *mp2_dev; 271 const char *uid; 272 273 if (acpi_bus_get_device(handle, &adev)) 274 return -ENODEV; 275 276 /* The ACPI namespace doesn't contain information about which MP2 PCI 277 * device an AMDI0011 ACPI device is related to, so assume that there's 278 * only one MP2 PCI device per system. 279 */ 280 mp2_dev = amd_mp2_find_device(); 281 if (!mp2_dev) 282 /* The MP2 PCI device might get probed later */ 283 return -EPROBE_DEFER; 284 285 i2c_dev = devm_kzalloc(&pdev->dev, sizeof(*i2c_dev), GFP_KERNEL); 286 if (!i2c_dev) 287 return -ENOMEM; 288 289 i2c_dev->common.mp2_dev = mp2_dev; 290 i2c_dev->pdev = pdev; 291 platform_set_drvdata(pdev, i2c_dev); 292 293 i2c_dev->common.cmd_completion = &i2c_amd_cmd_completion; > 294 i2c_dev->common.suspend = &i2c_amd_suspend; > 295 i2c_dev->common.resume = &i2c_amd_resume; 296 297 uid = adev->pnp.unique_id; 298 if (!uid) { 299 dev_err(&pdev->dev, "missing UID/bus id!\n"); 300 return -EINVAL; 301 } else if (strcmp(uid, "0") == 0) { 302 i2c_dev->common.bus_id = 0; 303 } else if (strcmp(uid, "1") == 0) { 304 i2c_dev->common.bus_id = 1; 305 } else { 306 dev_err(&pdev->dev, "incorrect UID/bus id \"%s\"!\n", uid); 307 return -EINVAL; 308 } 309 dev_dbg(&pdev->dev, "bus id is %u\n", i2c_dev->common.bus_id); 310 311 /* Register the adapter */ 312 amd_mp2_pm_runtime_get(mp2_dev); 313 314 i2c_dev->common.reqcmd = i2c_none; 315 if (amd_mp2_register_cb(&i2c_dev->common)) 316 return -EINVAL; 317 device_link_add(&i2c_dev->pdev->dev, &mp2_dev->pci_dev->dev, 318 DL_FLAG_AUTOREMOVE_CONSUMER); 319 320 i2c_dev->common.i2c_speed = i2c_amd_get_bus_speed(pdev); 321 322 /* Setup i2c adapter description */ 323 i2c_dev->adap.owner = THIS_MODULE; 324 i2c_dev->adap.algo = &i2c_amd_algorithm; 325 i2c_dev->adap.quirks = &amd_i2c_dev_quirks; 326 i2c_dev->adap.dev.parent = &pdev->dev; 327 i2c_dev->adap.algo_data = i2c_dev; 328 i2c_dev->adap.nr = pdev->id; 329 i2c_dev->adap.timeout = AMD_I2C_TIMEOUT; 330 ACPI_COMPANION_SET(&i2c_dev->adap.dev, ACPI_COMPANION(&pdev->dev)); 331 i2c_dev->adap.dev.of_node = pdev->dev.of_node; 332 snprintf(i2c_dev->adap.name, sizeof(i2c_dev->adap.name), 333 "AMD MP2 i2c bus %u", i2c_dev->common.bus_id); 334 i2c_set_adapdata(&i2c_dev->adap, i2c_dev); 335 336 init_completion(&i2c_dev->cmd_complete); 337 338 /* Enable the bus */ 339 if (i2c_amd_enable_set(i2c_dev, true)) 340 dev_err(&pdev->dev, "initial bus enable failed\n"); 341 342 /* Attach to the i2c layer */ 343 ret = i2c_add_numbered_adapter(&i2c_dev->adap); 344 345 amd_mp2_pm_runtime_put(mp2_dev); 346 347 if (ret < 0) 348 dev_err(&pdev->dev, "i2c add adapter failed = %d\n", ret); 349 350 return ret; 351 } 352 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip