Re: [PATCH v4 1/2] lib: devres: add a helper function for ioremap_uc

From: kbuild test robot
Date: Mon Oct 14 2019 - 14:47:11 EST


Hi Tuowen,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[cannot apply to v5.4-rc3 next-20191014]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url: https://github.com/0day-ci/linux/commits/Tuowen-Zhao/lib-devres-add-a-helper-function-for-ioremap_uc/20191015-000416
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=sparc64

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

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

lib/devres.c: In function '__devm_ioremap':
>> lib/devres.c:44:10: error: implicit declaration of function 'ioremap_uc'; did you mean 'ioremap_wc'? [-Werror=implicit-function-declaration]
addr = ioremap_uc(offset, size);
^~~~~~~~~~
ioremap_wc
>> lib/devres.c:44:8: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
addr = ioremap_uc(offset, size);
^
cc1: some warnings being treated as errors

vim +44 lib/devres.c

25
26 static void __iomem *__devm_ioremap(struct device *dev, resource_size_t offset,
27 resource_size_t size,
28 enum devm_ioremap_type type)
29 {
30 void __iomem **ptr, *addr = NULL;
31
32 ptr = devres_alloc(devm_ioremap_release, sizeof(*ptr), GFP_KERNEL);
33 if (!ptr)
34 return NULL;
35
36 switch (type) {
37 case DEVM_IOREMAP:
38 addr = ioremap(offset, size);
39 break;
40 case DEVM_IOREMAP_NC:
41 addr = ioremap_nocache(offset, size);
42 break;
43 case DEVM_IOREMAP_UC:
> 44 addr = ioremap_uc(offset, size);
45 break;
46 case DEVM_IOREMAP_WC:
47 addr = ioremap_wc(offset, size);
48 break;
49 }
50
51 if (addr) {
52 *ptr = addr;
53 devres_add(dev, ptr);
54 } else
55 devres_free(ptr);
56
57 return addr;
58 }
59

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

Attachment: .config.gz
Description: application/gzip