Re: [PATCH v2] net: macb: Added PCI wrapper for Platform Driver.

From: kbuild test robot
Date: Mon Dec 12 2016 - 09:51:27 EST


Hi Bartosz,

[auto build test ERROR on net-next/master]
[also build test ERROR on v4.9 next-20161209]
[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/Bartosz-Folta/net-macb-Added-PCI-wrapper-for-Platform-Driver/20161212-220228
config: alpha-allyesconfig (attached as .config)
compiler: alpha-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=alpha

All error/warnings (new ones prefixed by >>):

drivers/net/ethernet/cadence/macb_pci.c: In function 'macb_probe':
>> drivers/net/ethernet/cadence/macb_pci.c:78:19: error: implicit declaration of function 'clk_register_fixed_rate' [-Werror=implicit-function-declaration]
plat_data.pclk = clk_register_fixed_rate(&pdev->dev, "pclk", NULL, 0,
^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/cadence/macb_pci.c:78:17: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
plat_data.pclk = clk_register_fixed_rate(&pdev->dev, "pclk", NULL, 0,
^
drivers/net/ethernet/cadence/macb_pci.c:85:17: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
plat_data.hclk = clk_register_fixed_rate(&pdev->dev, "hclk", NULL, 0,
^
>> drivers/net/ethernet/cadence/macb_pci.c:116:2: error: implicit declaration of function 'clk_unregister' [-Werror=implicit-function-declaration]
clk_unregister(plat_data.hclk);
^~~~~~~~~~~~~~
cc1: some warnings being treated as errors

vim +/clk_register_fixed_rate +78 drivers/net/ethernet/cadence/macb_pci.c

72 (void *)(uintptr_t)pci_resource_start(pdev, 0));
73
74 /* set up macb platform data */
75 memset(&plat_data, 0, sizeof(plat_data));
76
77 /* initialize clocks */
> 78 plat_data.pclk = clk_register_fixed_rate(&pdev->dev, "pclk", NULL, 0,
79 GEM_PCLK_RATE);
80 if (IS_ERR(plat_data.pclk)) {
81 err = PTR_ERR(plat_data.pclk);
82 goto err_pclk_register;
83 }
84
85 plat_data.hclk = clk_register_fixed_rate(&pdev->dev, "hclk", NULL, 0,
86 GEM_HCLK_RATE);
87 if (IS_ERR(plat_data.hclk)) {
88 err = PTR_ERR(plat_data.hclk);
89 goto err_hclk_register;
90 }
91
92 /* set up platform device info */
93 memset(&plat_info, 0, sizeof(plat_info));
94 plat_info.parent = &pdev->dev;
95 plat_info.fwnode = pdev->dev.fwnode;
96 plat_info.name = PLAT_DRIVER_NAME;
97 plat_info.id = pdev->devfn;
98 plat_info.res = res;
99 plat_info.num_res = ARRAY_SIZE(res);
100 plat_info.data = &plat_data;
101 plat_info.size_data = sizeof(plat_data);
102 plat_info.dma_mask = DMA_BIT_MASK(32);
103
104 /* register platform device */
105 plat_dev = platform_device_register_full(&plat_info);
106 if (IS_ERR(plat_dev)) {
107 err = PTR_ERR(plat_dev);
108 goto err_plat_dev_register;
109 }
110
111 pci_set_drvdata(pdev, plat_dev);
112
113 return 0;
114
115 err_plat_dev_register:
> 116 clk_unregister(plat_data.hclk);
117
118 err_hclk_register:
119 clk_unregister(plat_data.pclk);

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

Attachment: .config.gz
Description: application/gzip