From: kbuild test robot <lkp@intel.com>
To: Baolin Wang <baolin.wang7@gmail.com>,
lee.jones@linaro.org, arnd@arndb.de, broonie@kernel.org,
orsonzhai@gmail.com, zhang.lyra@gmail.com,
linux-kernel@vger.kernel.org
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
broonie@kernel.org, baolin.wang7@gmail.com, orsonzhai@gmail.com,
zhang.lyra@gmail.com
Subject: Re: [PATCH v2] mfd: syscon: Add Spreadtrum physical regmap bus support
Date: Tue, 21 Apr 2020 18:03:06 +0800 [thread overview]
Message-ID: <202004211716.IWGuUFlz%lkp@intel.com> (raw)
In-Reply-To: <328db39335b515b190b518445a777ee97751d393.1587173992.git.baolin.wang7@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 6001 bytes --]
Hi Baolin,
I love your patch! Yet something to improve:
[auto build test ERROR on ljones-mfd/for-mfd-next]
[also build test ERROR on arm-soc/for-next linus/master linux/master v5.7-rc2 next-20200420]
[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/mfd-syscon-Add-Spreadtrum-physical-regmap-bus-support/20200421-035442
base: https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git for-mfd-next
config: x86_64-randconfig-f002-20200421 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project a9b137f9ffba8cb25dfd7dd1fb613e8aac121b37)
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/mfd/syscon.c:182:31: error: use of undeclared identifier 'sprd_syscon_regmap_bus'
regmap = regmap_init(NULL, &sprd_syscon_regmap_bus, base,
^
>> drivers/mfd/syscon.c:182:10: error: assigning to 'struct regmap *' from incompatible type 'void'
regmap = regmap_init(NULL, &sprd_syscon_regmap_bus, base,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
vim +/sprd_syscon_regmap_bus +182 drivers/mfd/syscon.c
106
107 static struct syscon *of_syscon_register(struct device_node *np, bool check_clk)
108 {
109 struct clk *clk;
110 struct syscon *syscon;
111 struct regmap *regmap;
112 void __iomem *base;
113 u32 reg_io_width;
114 int ret;
115 struct regmap_config syscon_config = syscon_regmap_config;
116 struct resource res;
117 bool use_phy_regmap_bus = false;
118
119 syscon = kzalloc(sizeof(*syscon), GFP_KERNEL);
120 if (!syscon)
121 return ERR_PTR(-ENOMEM);
122
123 if (of_address_to_resource(np, 0, &res)) {
124 ret = -ENOMEM;
125 goto err_map;
126 }
127
128 base = ioremap(res.start, resource_size(&res));
129 if (!base) {
130 ret = -ENOMEM;
131 goto err_map;
132 }
133
134 /* Parse the device's DT node for an endianness specification */
135 if (of_property_read_bool(np, "big-endian"))
136 syscon_config.val_format_endian = REGMAP_ENDIAN_BIG;
137 else if (of_property_read_bool(np, "little-endian"))
138 syscon_config.val_format_endian = REGMAP_ENDIAN_LITTLE;
139 else if (of_property_read_bool(np, "native-endian"))
140 syscon_config.val_format_endian = REGMAP_ENDIAN_NATIVE;
141
142 /*
143 * search for reg-io-width property in DT. If it is not provided,
144 * default to 4 bytes. regmap_init_mmio will return an error if values
145 * are invalid so there is no need to check them here.
146 */
147 ret = of_property_read_u32(np, "reg-io-width", ®_io_width);
148 if (ret)
149 reg_io_width = 4;
150
151 ret = of_hwspin_lock_get_id(np, 0);
152 if (ret > 0 || (IS_ENABLED(CONFIG_HWSPINLOCK) && ret == 0)) {
153 syscon_config.use_hwlock = true;
154 syscon_config.hwlock_id = ret;
155 syscon_config.hwlock_mode = HWLOCK_IRQSTATE;
156 } else if (ret < 0) {
157 switch (ret) {
158 case -ENOENT:
159 /* Ignore missing hwlock, it's optional. */
160 break;
161 default:
162 pr_err("Failed to retrieve valid hwlock: %d\n", ret);
163 /* fall-through */
164 case -EPROBE_DEFER:
165 goto err_regmap;
166 }
167 }
168
169 syscon_config.name = of_node_full_name(np);
170 syscon_config.reg_stride = reg_io_width;
171 syscon_config.val_bits = reg_io_width * 8;
172 syscon_config.max_register = resource_size(&res) - reg_io_width;
173
174 /*
175 * The Spreadtrum syscon need register a real physical regmap bus
176 * with new atomic bits updating operation instead of using
177 * read-modify-write.
178 */
179 if (IS_ENABLED(CONFIG_ARCH_SPRD) &&
180 of_device_is_compatible(np, "sprd,atomic-syscon")) {
181 use_phy_regmap_bus = true;
> 182 regmap = regmap_init(NULL, &sprd_syscon_regmap_bus, base,
183 &syscon_config);
184 } else {
185 regmap = regmap_init_mmio(NULL, base, &syscon_config);
186 }
187 if (IS_ERR(regmap)) {
188 pr_err("regmap init failed\n");
189 ret = PTR_ERR(regmap);
190 goto err_regmap;
191 }
192
193 if (!use_phy_regmap_bus && check_clk) {
194 clk = of_clk_get(np, 0);
195 if (IS_ERR(clk)) {
196 ret = PTR_ERR(clk);
197 /* clock is optional */
198 if (ret != -ENOENT)
199 goto err_clk;
200 } else {
201 ret = regmap_mmio_attach_clk(regmap, clk);
202 if (ret)
203 goto err_attach;
204 }
205 }
206
207 syscon->regmap = regmap;
208 syscon->np = np;
209
210 spin_lock(&syscon_list_slock);
211 list_add_tail(&syscon->list, &syscon_list);
212 spin_unlock(&syscon_list_slock);
213
214 return syscon;
215
216 err_attach:
217 if (!IS_ERR(clk))
218 clk_put(clk);
219 err_clk:
220 regmap_exit(regmap);
221 err_regmap:
222 iounmap(base);
223 err_map:
224 kfree(syscon);
225 return ERR_PTR(ret);
226 }
227
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 30335 bytes --]
next prev parent reply other threads:[~2020-04-21 10:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-18 1:53 [PATCH v2] mfd: syscon: Add Spreadtrum physical regmap bus support Baolin Wang
2020-04-21 10:03 ` kbuild test robot [this message]
2020-04-21 13:26 ` Baolin Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202004211716.IWGuUFlz%lkp@intel.com \
--to=lkp@intel.com \
--cc=arnd@arndb.de \
--cc=baolin.wang7@gmail.com \
--cc=broonie@kernel.org \
--cc=clang-built-linux@googlegroups.com \
--cc=kbuild-all@lists.01.org \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=orsonzhai@gmail.com \
--cc=zhang.lyra@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox