lkml.org 
[lkml]   [2016]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectdrivers/mfd/syscon.c:67:9: error: implicit declaration of function 'ioremap'
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 0cbbc422d56668528f6efd1234fe908010284082
commit: 4fcd504edbf7c793325511c2df8dcd083958e28a power: reset: add reboot mode driver
date: 5 weeks ago
config: um-allyesconfig (attached as .config)
compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
git checkout 4fcd504edbf7c793325511c2df8dcd083958e28a
# save the attached .config to linux build tree
make ARCH=um

All errors (new ones prefixed by >>):

drivers/mfd/syscon.c: In function 'of_syscon_register':
>> drivers/mfd/syscon.c:67:9: error: implicit declaration of function 'ioremap' [-Werror=implicit-function-declaration]
base = ioremap(res.start, resource_size(&res));
^~~~~~~
drivers/mfd/syscon.c:67:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
base = ioremap(res.start, resource_size(&res));
^
>> drivers/mfd/syscon.c:109:2: error: implicit declaration of function 'iounmap' [-Werror=implicit-function-declaration]
iounmap(base);
^~~~~~~
cc1: some warnings being treated as errors

vim +/ioremap +67 drivers/mfd/syscon.c

bdb0066d Pankaj Dubey 2014-09-30 61
ca668f0e Philipp Zabel 2016-01-29 62 if (of_address_to_resource(np, 0, &res)) {
ca668f0e Philipp Zabel 2016-01-29 63 ret = -ENOMEM;
ca668f0e Philipp Zabel 2016-01-29 64 goto err_map;
ca668f0e Philipp Zabel 2016-01-29 65 }
ca668f0e Philipp Zabel 2016-01-29 66
ca668f0e Philipp Zabel 2016-01-29 @67 base = ioremap(res.start, resource_size(&res));
bdb0066d Pankaj Dubey 2014-09-30 68 if (!base) {
bdb0066d Pankaj Dubey 2014-09-30 69 ret = -ENOMEM;
bdb0066d Pankaj Dubey 2014-09-30 70 goto err_map;
bdb0066d Pankaj Dubey 2014-09-30 71 }
bdb0066d Pankaj Dubey 2014-09-30 72
bdb0066d Pankaj Dubey 2014-09-30 73 /* Parse the device's DT node for an endianness specification */
bdb0066d Pankaj Dubey 2014-09-30 74 if (of_property_read_bool(np, "big-endian"))
bdb0066d Pankaj Dubey 2014-09-30 75 syscon_config.val_format_endian = REGMAP_ENDIAN_BIG;
bdb0066d Pankaj Dubey 2014-09-30 76 else if (of_property_read_bool(np, "little-endian"))
bdb0066d Pankaj Dubey 2014-09-30 77 syscon_config.val_format_endian = REGMAP_ENDIAN_LITTLE;
bdb0066d Pankaj Dubey 2014-09-30 78
db2fb60c Damien Riegel 2015-11-30 79 /*
db2fb60c Damien Riegel 2015-11-30 80 * search for reg-io-width property in DT. If it is not provided,
db2fb60c Damien Riegel 2015-11-30 81 * default to 4 bytes. regmap_init_mmio will return an error if values
db2fb60c Damien Riegel 2015-11-30 82 * are invalid so there is no need to check them here.
db2fb60c Damien Riegel 2015-11-30 83 */
db2fb60c Damien Riegel 2015-11-30 84 ret = of_property_read_u32(np, "reg-io-width", &reg_io_width);
db2fb60c Damien Riegel 2015-11-30 85 if (ret)
db2fb60c Damien Riegel 2015-11-30 86 reg_io_width = 4;
db2fb60c Damien Riegel 2015-11-30 87
db2fb60c Damien Riegel 2015-11-30 88 syscon_config.reg_stride = reg_io_width;
db2fb60c Damien Riegel 2015-11-30 89 syscon_config.val_bits = reg_io_width * 8;
ca668f0e Philipp Zabel 2016-01-29 90 syscon_config.max_register = resource_size(&res) - reg_io_width;
db2fb60c Damien Riegel 2015-11-30 91
bdb0066d Pankaj Dubey 2014-09-30 92 regmap = regmap_init_mmio(NULL, base, &syscon_config);
bdb0066d Pankaj Dubey 2014-09-30 93 if (IS_ERR(regmap)) {
bdb0066d Pankaj Dubey 2014-09-30 94 pr_err("regmap init failed\n");
bdb0066d Pankaj Dubey 2014-09-30 95 ret = PTR_ERR(regmap);
bdb0066d Pankaj Dubey 2014-09-30 96 goto err_regmap;
bdb0066d Pankaj Dubey 2014-09-30 97 }
bdb0066d Pankaj Dubey 2014-09-30 98
bdb0066d Pankaj Dubey 2014-09-30 99 syscon->regmap = regmap;
bdb0066d Pankaj Dubey 2014-09-30 100 syscon->np = np;
bdb0066d Pankaj Dubey 2014-09-30 101
bdb0066d Pankaj Dubey 2014-09-30 102 spin_lock(&syscon_list_slock);
bdb0066d Pankaj Dubey 2014-09-30 103 list_add_tail(&syscon->list, &syscon_list);
bdb0066d Pankaj Dubey 2014-09-30 104 spin_unlock(&syscon_list_slock);
87d68730 Dong Aisheng 2012-09-05 105
bdb0066d Pankaj Dubey 2014-09-30 106 return syscon;
bdb0066d Pankaj Dubey 2014-09-30 107
bdb0066d Pankaj Dubey 2014-09-30 108 err_regmap:
bdb0066d Pankaj Dubey 2014-09-30 @109 iounmap(base);
bdb0066d Pankaj Dubey 2014-09-30 110 err_map:
bdb0066d Pankaj Dubey 2014-09-30 111 kfree(syscon);
bdb0066d Pankaj Dubey 2014-09-30 112 return ERR_PTR(ret);

:::::: The code at line 67 was first introduced by commit
:::::: ca668f0edfae65438c3f0a3ad5d3e59e3515915f mfd: syscon: Set regmap max_register in of_syscon_register

:::::: TO: Philipp Zabel <p.zabel@pengutronix.de>
:::::: CC: Lee Jones <lee.jones@linaro.org>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[unhandled content-type:application/octet-stream]
\
 
 \ /
  Last update: 2016-08-07 09:21    [W:0.032 / U:0.560 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site