Re: [PATCH 1/5] devres: Move managed io function declarations into device.h

From: kbuild test robot
Date: Mon Jan 22 2018 - 05:09:37 EST


Hi Ladislav,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on next-20180119]
[also build test ERROR on v4.15-rc9]
[cannot apply to linus/master pci/next l2-mtd-boris/nand/next v4.15-rc8 v4.15-rc7 v4.15-rc6]
[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/Ladislav-Michl/Add-managed-ioremap-function-for-shared-resources/20180122-164512
config: i386-randconfig-a0-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 error/warnings (new ones prefixed by >>):

In file included from drivers/mfd/syscon.c:21:0:
include/linux/of_address.h: In function 'of_io_request_and_map':
>> include/linux/of_address.h:65:2: error: implicit declaration of function 'IOMEM_ERR_PTR' [-Werror=implicit-function-declaration]
return IOMEM_ERR_PTR(-EINVAL);
^
>> include/linux/of_address.h:65:2: warning: return makes pointer from integer without a cast
cc1: some warnings being treated as errors
--
In file included from drivers//fpga/altera-pr-ip-core.c:22:0:
>> include/linux/fpga/altera-pr-ip-core.h:26:28: warning: 'struct device' declared inside parameter list
int alt_pr_register(struct device *dev, void __iomem *reg_base);
^
>> include/linux/fpga/altera-pr-ip-core.h:26:28: warning: its scope is only this definition or declaration, which is probably not what you want
include/linux/fpga/altera-pr-ip-core.h:27:30: warning: 'struct device' declared inside parameter list
int alt_pr_unregister(struct device *dev);
^
>> drivers//fpga/altera-pr-ip-core.c:187:5: error: conflicting types for 'alt_pr_register'
int alt_pr_register(struct device *dev, void __iomem *reg_base)
^
In file included from drivers//fpga/altera-pr-ip-core.c:22:0:
include/linux/fpga/altera-pr-ip-core.h:26:5: note: previous declaration of 'alt_pr_register' was here
int alt_pr_register(struct device *dev, void __iomem *reg_base);
^
In file included from include/linux/linkage.h:7:0,
from include/linux/kernel.h:7,
from include/linux/delay.h:22,
from drivers//fpga/altera-pr-ip-core.c:21:
drivers//fpga/altera-pr-ip-core.c:206:19: error: conflicting types for 'alt_pr_register'
EXPORT_SYMBOL_GPL(alt_pr_register);
^
include/linux/export.h:65:21: note: in definition of macro '___EXPORT_SYMBOL'
extern typeof(sym) sym; \
^
drivers//fpga/altera-pr-ip-core.c:206:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(alt_pr_register);
^
In file included from drivers//fpga/altera-pr-ip-core.c:22:0:
include/linux/fpga/altera-pr-ip-core.h:26:5: note: previous declaration of 'alt_pr_register' was here
int alt_pr_register(struct device *dev, void __iomem *reg_base);
^
>> drivers//fpga/altera-pr-ip-core.c:208:5: error: conflicting types for 'alt_pr_unregister'
int alt_pr_unregister(struct device *dev)
^
In file included from drivers//fpga/altera-pr-ip-core.c:22:0:
include/linux/fpga/altera-pr-ip-core.h:27:5: note: previous declaration of 'alt_pr_unregister' was here
int alt_pr_unregister(struct device *dev);
^
In file included from include/linux/linkage.h:7:0,
from include/linux/kernel.h:7,
from include/linux/delay.h:22,
from drivers//fpga/altera-pr-ip-core.c:21:
drivers//fpga/altera-pr-ip-core.c:216:19: error: conflicting types for 'alt_pr_unregister'
EXPORT_SYMBOL_GPL(alt_pr_unregister);
^
include/linux/export.h:65:21: note: in definition of macro '___EXPORT_SYMBOL'
extern typeof(sym) sym; \
^
drivers//fpga/altera-pr-ip-core.c:216:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(alt_pr_unregister);
^
In file included from drivers//fpga/altera-pr-ip-core.c:22:0:
include/linux/fpga/altera-pr-ip-core.h:27:5: note: previous declaration of 'alt_pr_unregister' was here
int alt_pr_unregister(struct device *dev);
^
--
In file included from drivers/fpga/altera-pr-ip-core.c:22:0:
>> include/linux/fpga/altera-pr-ip-core.h:26:28: warning: 'struct device' declared inside parameter list
int alt_pr_register(struct device *dev, void __iomem *reg_base);
^
>> include/linux/fpga/altera-pr-ip-core.h:26:28: warning: its scope is only this definition or declaration, which is probably not what you want
include/linux/fpga/altera-pr-ip-core.h:27:30: warning: 'struct device' declared inside parameter list
int alt_pr_unregister(struct device *dev);
^
drivers/fpga/altera-pr-ip-core.c:187:5: error: conflicting types for 'alt_pr_register'
int alt_pr_register(struct device *dev, void __iomem *reg_base)
^
In file included from drivers/fpga/altera-pr-ip-core.c:22:0:
include/linux/fpga/altera-pr-ip-core.h:26:5: note: previous declaration of 'alt_pr_register' was here
int alt_pr_register(struct device *dev, void __iomem *reg_base);
^
In file included from include/linux/linkage.h:7:0,
from include/linux/kernel.h:7,
from include/linux/delay.h:22,
from drivers/fpga/altera-pr-ip-core.c:21:
drivers/fpga/altera-pr-ip-core.c:206:19: error: conflicting types for 'alt_pr_register'
EXPORT_SYMBOL_GPL(alt_pr_register);
^
include/linux/export.h:65:21: note: in definition of macro '___EXPORT_SYMBOL'
extern typeof(sym) sym; \
^
drivers/fpga/altera-pr-ip-core.c:206:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(alt_pr_register);
^
In file included from drivers/fpga/altera-pr-ip-core.c:22:0:
include/linux/fpga/altera-pr-ip-core.h:26:5: note: previous declaration of 'alt_pr_register' was here
int alt_pr_register(struct device *dev, void __iomem *reg_base);
^
drivers/fpga/altera-pr-ip-core.c:208:5: error: conflicting types for 'alt_pr_unregister'
int alt_pr_unregister(struct device *dev)
^
In file included from drivers/fpga/altera-pr-ip-core.c:22:0:
include/linux/fpga/altera-pr-ip-core.h:27:5: note: previous declaration of 'alt_pr_unregister' was here
int alt_pr_unregister(struct device *dev);
^
In file included from include/linux/linkage.h:7:0,
from include/linux/kernel.h:7,
from include/linux/delay.h:22,
from drivers/fpga/altera-pr-ip-core.c:21:
drivers/fpga/altera-pr-ip-core.c:216:19: error: conflicting types for 'alt_pr_unregister'
EXPORT_SYMBOL_GPL(alt_pr_unregister);
^
include/linux/export.h:65:21: note: in definition of macro '___EXPORT_SYMBOL'
extern typeof(sym) sym; \
^
drivers/fpga/altera-pr-ip-core.c:216:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(alt_pr_unregister);
^
In file included from drivers/fpga/altera-pr-ip-core.c:22:0:
include/linux/fpga/altera-pr-ip-core.h:27:5: note: previous declaration of 'alt_pr_unregister' was here
int alt_pr_unregister(struct device *dev);
^

vim +/IOMEM_ERR_PTR +65 include/linux/of_address.h

29b635c0 Andrew Murray 2013-05-16 24
29b635c0 Andrew Murray 2013-05-16 25 #define for_each_of_pci_range(parser, range) \
29b635c0 Andrew Murray 2013-05-16 26 for (; of_pci_range_parser_one(parser, range);)
29b635c0 Andrew Murray 2013-05-16 27
d0dfa16a Rob Herring 2013-09-16 28 /* Translate a DMA address from device space to CPU space */
d0dfa16a Rob Herring 2013-09-16 29 extern u64 of_translate_dma_address(struct device_node *dev,
d0dfa16a Rob Herring 2013-09-16 30 const __be32 *in_addr);
d0dfa16a Rob Herring 2013-09-16 31
a850a755 Grant Likely 2012-02-14 32 #ifdef CONFIG_OF_ADDRESS
0131d897 Sebastian Andrzej Siewior 2010-12-01 33 extern u64 of_translate_address(struct device_node *np, const __be32 *addr);
1f5bef30 Grant Likely 2010-06-08 34 extern int of_address_to_resource(struct device_node *dev, int index,
1f5bef30 Grant Likely 2010-06-08 35 struct resource *r);
90e33f62 Grant Likely 2011-07-05 36 extern struct device_node *of_find_matching_node_by_address(
90e33f62 Grant Likely 2011-07-05 37 struct device_node *from,
90e33f62 Grant Likely 2011-07-05 38 const struct of_device_id *matches,
90e33f62 Grant Likely 2011-07-05 39 u64 base_address);
6b884a8d Grant Likely 2010-06-08 40 extern void __iomem *of_iomap(struct device_node *device, int index);
fcd71d9c Sudip Mukherjee 2015-12-08 41 void __iomem *of_io_request_and_map(struct device_node *device,
fcd71d9c Sudip Mukherjee 2015-12-08 42 int index, const char *name);
6b884a8d Grant Likely 2010-06-08 43
22ae782f Grant Likely 2010-07-29 44 /* Extract an address from a device, returns the region size and
22ae782f Grant Likely 2010-07-29 45 * the address space flags too. The PCI version uses a BAR number
22ae782f Grant Likely 2010-07-29 46 * instead of an absolute index
22ae782f Grant Likely 2010-07-29 47 */
47b1e689 Kim Phillips 2012-10-08 48 extern const __be32 *of_get_address(struct device_node *dev, int index,
22ae782f Grant Likely 2010-07-29 49 u64 *size, unsigned int *flags);
22ae782f Grant Likely 2010-07-29 50
29b635c0 Andrew Murray 2013-05-16 51 extern int of_pci_range_parser_init(struct of_pci_range_parser *parser,
29b635c0 Andrew Murray 2013-05-16 52 struct device_node *node);
a060c210 Marc Gonzalez 2017-09-26 53 extern int of_pci_dma_range_parser_init(struct of_pci_range_parser *parser,
a060c210 Marc Gonzalez 2017-09-26 54 struct device_node *node);
29b635c0 Andrew Murray 2013-05-16 55 extern struct of_pci_range *of_pci_range_parser_one(
29b635c0 Andrew Murray 2013-05-16 56 struct of_pci_range_parser *parser,
29b635c0 Andrew Murray 2013-05-16 57 struct of_pci_range *range);
18308c94 Grygorii Strashko 2014-04-24 58 extern int of_dma_get_range(struct device_node *np, u64 *dma_addr,
18308c94 Grygorii Strashko 2014-04-24 59 u64 *paddr, u64 *size);
92ea637e Santosh Shilimkar 2014-04-24 60 extern bool of_dma_is_coherent(struct device_node *np);
a850a755 Grant Likely 2012-02-14 61 #else /* CONFIG_OF_ADDRESS */
fcd71d9c Sudip Mukherjee 2015-12-08 62 static inline void __iomem *of_io_request_and_map(struct device_node *device,
fcd71d9c Sudip Mukherjee 2015-12-08 63 int index, const char *name)
fcd71d9c Sudip Mukherjee 2015-12-08 64 {
fcd71d9c Sudip Mukherjee 2015-12-08 @65 return IOMEM_ERR_PTR(-EINVAL);
fcd71d9c Sudip Mukherjee 2015-12-08 66 }
b1d06b60 Guenter Roeck 2015-11-06 67

:::::: The code at line 65 was first introduced by commit
:::::: fcd71d9cc6e301bdbd71829b79e80168473ca609 of: fix declaration of of_io_request_and_map

:::::: TO: Sudip Mukherjee <sudipm.mukherjee@xxxxxxxxx>
:::::: CC: Rob Herring <robh@xxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip