CC: [email protected] In-Reply-To: <a3187ff166bf4434362b92d91149a8e445c4ed0c.1586757922.git.baolin.wa...@gmail.com> References: <a3187ff166bf4434362b92d91149a8e445c4ed0c.1586757922.git.baolin.wa...@gmail.com> TO: Baolin Wang <[email protected]>
Hi Baolin, [FYI, it's a private test report for your RFC patch.] [auto build test WARNING on linus/master] [also build test WARNING on v5.7-rc1 next-20200413] [cannot apply to ljones-mfd/for-mfd-next regmap/for-next arm-soc/for-next] [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/Baolin-Wang/Add-new-reg_update_bits-support/20200413-143713 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 8f3d9f354286745c751374f5f1fcafee6b3f3136 reproduce: # apt-get install sparse # sparse version: make ARCH=x86_64 allmodconfig make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' :::::: branch date: 16 hours ago :::::: commit date: 16 hours ago If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot <[email protected]> sparse warnings: (new ones prefixed by >>) drivers/mfd/syscon.c:111:26: sparse: warning: incorrect type in argument 3 (different address spaces) >> drivers/mfd/syscon.c:111:26: sparse: expected void *bus_context >> drivers/mfd/syscon.c:111:26: sparse: got void [noderef] <asn:2> >> *[assigned] base # https://github.com/0day-ci/linux/commit/ff9a2d5184cbf0f5c4a40f77f56e383eec7ca306 git remote add linux-review https://github.com/0day-ci/linux git remote update linux-review git checkout ff9a2d5184cbf0f5c4a40f77f56e383eec7ca306 vim +111 drivers/mfd/syscon.c 87d687301f3807 Dong Aisheng 2012-09-05 43 39233b7c611248 Paul Cercueil 2019-07-24 44 static struct syscon *of_syscon_register(struct device_node *np, bool check_clk) 87d687301f3807 Dong Aisheng 2012-09-05 45 { a00406b71c5f08 Fabrice Gasnier 2018-12-12 46 struct clk *clk; bdb0066df96e74 Pankaj Dubey 2014-09-30 47 struct syscon *syscon; bdb0066df96e74 Pankaj Dubey 2014-09-30 48 struct regmap *regmap; bdb0066df96e74 Pankaj Dubey 2014-09-30 49 void __iomem *base; db2fb60cd35d2d Damien Riegel 2015-11-30 50 u32 reg_io_width; bdb0066df96e74 Pankaj Dubey 2014-09-30 51 int ret; bdb0066df96e74 Pankaj Dubey 2014-09-30 52 struct regmap_config syscon_config = syscon_regmap_config; ca668f0edfae65 Philipp Zabel 2016-01-29 53 struct resource res; bdb0066df96e74 Pankaj Dubey 2014-09-30 54 bdb0066df96e74 Pankaj Dubey 2014-09-30 55 syscon = kzalloc(sizeof(*syscon), GFP_KERNEL); bdb0066df96e74 Pankaj Dubey 2014-09-30 56 if (!syscon) bdb0066df96e74 Pankaj Dubey 2014-09-30 57 return ERR_PTR(-ENOMEM); bdb0066df96e74 Pankaj Dubey 2014-09-30 58 ca668f0edfae65 Philipp Zabel 2016-01-29 59 if (of_address_to_resource(np, 0, &res)) { ca668f0edfae65 Philipp Zabel 2016-01-29 60 ret = -ENOMEM; ca668f0edfae65 Philipp Zabel 2016-01-29 61 goto err_map; ca668f0edfae65 Philipp Zabel 2016-01-29 62 } ca668f0edfae65 Philipp Zabel 2016-01-29 63 ca668f0edfae65 Philipp Zabel 2016-01-29 64 base = ioremap(res.start, resource_size(&res)); bdb0066df96e74 Pankaj Dubey 2014-09-30 65 if (!base) { bdb0066df96e74 Pankaj Dubey 2014-09-30 66 ret = -ENOMEM; bdb0066df96e74 Pankaj Dubey 2014-09-30 67 goto err_map; bdb0066df96e74 Pankaj Dubey 2014-09-30 68 } bdb0066df96e74 Pankaj Dubey 2014-09-30 69 bdb0066df96e74 Pankaj Dubey 2014-09-30 70 /* Parse the device's DT node for an endianness specification */ bdb0066df96e74 Pankaj Dubey 2014-09-30 71 if (of_property_read_bool(np, "big-endian")) bdb0066df96e74 Pankaj Dubey 2014-09-30 72 syscon_config.val_format_endian = REGMAP_ENDIAN_BIG; bdb0066df96e74 Pankaj Dubey 2014-09-30 73 else if (of_property_read_bool(np, "little-endian")) bdb0066df96e74 Pankaj Dubey 2014-09-30 74 syscon_config.val_format_endian = REGMAP_ENDIAN_LITTLE; d29ccdb3f0e5dc Paul Burton 2016-10-14 75 else if (of_property_read_bool(np, "native-endian")) d29ccdb3f0e5dc Paul Burton 2016-10-14 76 syscon_config.val_format_endian = REGMAP_ENDIAN_NATIVE; bdb0066df96e74 Pankaj Dubey 2014-09-30 77 db2fb60cd35d2d Damien Riegel 2015-11-30 78 /* db2fb60cd35d2d Damien Riegel 2015-11-30 79 * search for reg-io-width property in DT. If it is not provided, db2fb60cd35d2d Damien Riegel 2015-11-30 80 * default to 4 bytes. regmap_init_mmio will return an error if values db2fb60cd35d2d Damien Riegel 2015-11-30 81 * are invalid so there is no need to check them here. db2fb60cd35d2d Damien Riegel 2015-11-30 82 */ db2fb60cd35d2d Damien Riegel 2015-11-30 83 ret = of_property_read_u32(np, "reg-io-width", ®_io_width); db2fb60cd35d2d Damien Riegel 2015-11-30 84 if (ret) db2fb60cd35d2d Damien Riegel 2015-11-30 85 reg_io_width = 4; db2fb60cd35d2d Damien Riegel 2015-11-30 86 3bafc09e779710 Baolin Wang 2017-12-25 87 ret = of_hwspin_lock_get_id(np, 0); 3bafc09e779710 Baolin Wang 2017-12-25 88 if (ret > 0 || (IS_ENABLED(CONFIG_HWSPINLOCK) && ret == 0)) { 3bafc09e779710 Baolin Wang 2017-12-25 89 syscon_config.use_hwlock = true; 3bafc09e779710 Baolin Wang 2017-12-25 90 syscon_config.hwlock_id = ret; 3bafc09e779710 Baolin Wang 2017-12-25 91 syscon_config.hwlock_mode = HWLOCK_IRQSTATE; 3bafc09e779710 Baolin Wang 2017-12-25 92 } else if (ret < 0) { 3bafc09e779710 Baolin Wang 2017-12-25 93 switch (ret) { 3bafc09e779710 Baolin Wang 2017-12-25 94 case -ENOENT: 3bafc09e779710 Baolin Wang 2017-12-25 95 /* Ignore missing hwlock, it's optional. */ 3bafc09e779710 Baolin Wang 2017-12-25 96 break; 3bafc09e779710 Baolin Wang 2017-12-25 97 default: 3bafc09e779710 Baolin Wang 2017-12-25 98 pr_err("Failed to retrieve valid hwlock: %d\n", ret); 3bafc09e779710 Baolin Wang 2017-12-25 99 /* fall-through */ 3bafc09e779710 Baolin Wang 2017-12-25 100 case -EPROBE_DEFER: 3bafc09e779710 Baolin Wang 2017-12-25 101 goto err_regmap; 3bafc09e779710 Baolin Wang 2017-12-25 102 } 3bafc09e779710 Baolin Wang 2017-12-25 103 } 3bafc09e779710 Baolin Wang 2017-12-25 104 408d1d570a6339 David Lechner 2018-01-23 105 syscon_config.name = of_node_full_name(np); db2fb60cd35d2d Damien Riegel 2015-11-30 106 syscon_config.reg_stride = reg_io_width; db2fb60cd35d2d Damien Riegel 2015-11-30 107 syscon_config.val_bits = reg_io_width * 8; ca668f0edfae65 Philipp Zabel 2016-01-29 108 syscon_config.max_register = resource_size(&res) - reg_io_width; db2fb60cd35d2d Damien Riegel 2015-11-30 109 ff9a2d5184cbf0 Baolin Wang 2020-04-13 110 if (syscon_phy_regmap_bus) ff9a2d5184cbf0 Baolin Wang 2020-04-13 @111 regmap = regmap_init(NULL, syscon_phy_regmap_bus, base, ff9a2d5184cbf0 Baolin Wang 2020-04-13 112 &syscon_config); ff9a2d5184cbf0 Baolin Wang 2020-04-13 113 else bdb0066df96e74 Pankaj Dubey 2014-09-30 114 regmap = regmap_init_mmio(NULL, base, &syscon_config); bdb0066df96e74 Pankaj Dubey 2014-09-30 115 if (IS_ERR(regmap)) { bdb0066df96e74 Pankaj Dubey 2014-09-30 116 pr_err("regmap init failed\n"); bdb0066df96e74 Pankaj Dubey 2014-09-30 117 ret = PTR_ERR(regmap); bdb0066df96e74 Pankaj Dubey 2014-09-30 118 goto err_regmap; bdb0066df96e74 Pankaj Dubey 2014-09-30 119 } bdb0066df96e74 Pankaj Dubey 2014-09-30 120 ff9a2d5184cbf0 Baolin Wang 2020-04-13 121 if (check_clk && !syscon_phy_regmap_bus) { a00406b71c5f08 Fabrice Gasnier 2018-12-12 122 clk = of_clk_get(np, 0); a00406b71c5f08 Fabrice Gasnier 2018-12-12 123 if (IS_ERR(clk)) { a00406b71c5f08 Fabrice Gasnier 2018-12-12 124 ret = PTR_ERR(clk); a00406b71c5f08 Fabrice Gasnier 2018-12-12 125 /* clock is optional */ a00406b71c5f08 Fabrice Gasnier 2018-12-12 126 if (ret != -ENOENT) a00406b71c5f08 Fabrice Gasnier 2018-12-12 127 goto err_clk; a00406b71c5f08 Fabrice Gasnier 2018-12-12 128 } else { a00406b71c5f08 Fabrice Gasnier 2018-12-12 129 ret = regmap_mmio_attach_clk(regmap, clk); a00406b71c5f08 Fabrice Gasnier 2018-12-12 130 if (ret) a00406b71c5f08 Fabrice Gasnier 2018-12-12 131 goto err_attach; a00406b71c5f08 Fabrice Gasnier 2018-12-12 132 } 39233b7c611248 Paul Cercueil 2019-07-24 133 } a00406b71c5f08 Fabrice Gasnier 2018-12-12 134 bdb0066df96e74 Pankaj Dubey 2014-09-30 135 syscon->regmap = regmap; bdb0066df96e74 Pankaj Dubey 2014-09-30 136 syscon->np = np; bdb0066df96e74 Pankaj Dubey 2014-09-30 137 bdb0066df96e74 Pankaj Dubey 2014-09-30 138 spin_lock(&syscon_list_slock); bdb0066df96e74 Pankaj Dubey 2014-09-30 139 list_add_tail(&syscon->list, &syscon_list); bdb0066df96e74 Pankaj Dubey 2014-09-30 140 spin_unlock(&syscon_list_slock); 87d687301f3807 Dong Aisheng 2012-09-05 141 bdb0066df96e74 Pankaj Dubey 2014-09-30 142 return syscon; bdb0066df96e74 Pankaj Dubey 2014-09-30 143 a00406b71c5f08 Fabrice Gasnier 2018-12-12 144 err_attach: a00406b71c5f08 Fabrice Gasnier 2018-12-12 145 if (!IS_ERR(clk)) a00406b71c5f08 Fabrice Gasnier 2018-12-12 146 clk_put(clk); a00406b71c5f08 Fabrice Gasnier 2018-12-12 147 err_clk: a00406b71c5f08 Fabrice Gasnier 2018-12-12 148 regmap_exit(regmap); bdb0066df96e74 Pankaj Dubey 2014-09-30 149 err_regmap: bdb0066df96e74 Pankaj Dubey 2014-09-30 150 iounmap(base); bdb0066df96e74 Pankaj Dubey 2014-09-30 151 err_map: bdb0066df96e74 Pankaj Dubey 2014-09-30 152 kfree(syscon); bdb0066df96e74 Pankaj Dubey 2014-09-30 153 return ERR_PTR(ret); 87d687301f3807 Dong Aisheng 2012-09-05 154 } 87d687301f3807 Dong Aisheng 2012-09-05 155 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected] _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
