[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202407112023.ixKkILn7-lkp@intel.com>
Date: Thu, 11 Jul 2024 21:02:06 +0800
From: kernel test robot <lkp@...el.com>
To: Jerome Brunet <jbrunet@...libre.com>,
Philipp Zabel <p.zabel@...gutronix.de>,
Stephen Boyd <sboyd@...nel.org>,
Neil Armstrong <neil.armstrong@...aro.org>
Cc: oe-kbuild-all@...ts.linux.dev, Jerome Brunet <jbrunet@...libre.com>,
Jan Dakinevich <jan.dakinevich@...utedevices.com>,
linux-kernel@...r.kernel.org, linux-amlogic@...ts.infradead.org,
linux-clk@...r.kernel.org
Subject: Re: [PATCH 7/8] reset: amlogic: add auxiliary reset driver support
Hi Jerome,
kernel test robot noticed the following build errors:
[auto build test ERROR on pza/reset/next]
[also build test ERROR on clk/clk-next linus/master v6.10-rc7 next-20240711]
[cannot apply to pza/imx-drm/next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Jerome-Brunet/reset-amlogic-convert-driver-to-regmap/20240711-055833
base: https://git.pengutronix.de/git/pza/linux reset/next
patch link: https://lore.kernel.org/r/20240710162526.2341399-8-jbrunet%40baylibre.com
patch subject: [PATCH 7/8] reset: amlogic: add auxiliary reset driver support
config: i386-buildonly-randconfig-005-20240711 (https://download.01.org/0day-ci/archive/20240711/202407112023.ixKkILn7-lkp@intel.com/config)
compiler: gcc-10 (Ubuntu 10.5.0-1ubuntu1) 10.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240711/202407112023.ixKkILn7-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202407112023.ixKkILn7-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from include/linux/device/driver.h:21,
from include/linux/device.h:32,
from include/linux/auxiliary_bus.h:11,
from drivers/reset/reset-meson.c:8:
include/linux/module.h:131:42: error: redefinition of '__inittest'
131 | static inline initcall_t __maybe_unused __inittest(void) \
| ^~~~~~~~~~
include/linux/device/driver.h:262:1: note: in expansion of macro 'module_init'
262 | module_init(__driver##_init); \
| ^~~~~~~~~~~
include/linux/auxiliary_bus.h:245:2: note: in expansion of macro 'module_driver'
245 | module_driver(__auxiliary_driver, auxiliary_driver_register, auxiliary_driver_unregister)
| ^~~~~~~~~~~~~
drivers/reset/reset-meson.c:272:1: note: in expansion of macro 'module_auxiliary_driver'
272 | module_auxiliary_driver(meson_reset_aux_driver);
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/module.h:131:42: note: previous definition of '__inittest' was here
131 | static inline initcall_t __maybe_unused __inittest(void) \
| ^~~~~~~~~~
include/linux/device/driver.h:262:1: note: in expansion of macro 'module_init'
262 | module_init(__driver##_init); \
| ^~~~~~~~~~~
include/linux/platform_device.h:303:2: note: in expansion of macro 'module_driver'
303 | module_driver(__platform_driver, platform_driver_register, \
| ^~~~~~~~~~~~~
drivers/reset/reset-meson.c:232:1: note: in expansion of macro 'module_platform_driver'
232 | module_platform_driver(meson_reset_pltf_driver);
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/module.h:133:6: error: redefinition of 'init_module'
133 | int init_module(void) __copy(initfn) \
| ^~~~~~~~~~~
include/linux/device/driver.h:262:1: note: in expansion of macro 'module_init'
262 | module_init(__driver##_init); \
| ^~~~~~~~~~~
include/linux/auxiliary_bus.h:245:2: note: in expansion of macro 'module_driver'
245 | module_driver(__auxiliary_driver, auxiliary_driver_register, auxiliary_driver_unregister)
| ^~~~~~~~~~~~~
drivers/reset/reset-meson.c:272:1: note: in expansion of macro 'module_auxiliary_driver'
272 | module_auxiliary_driver(meson_reset_aux_driver);
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/module.h:133:6: note: previous definition of 'init_module' was here
133 | int init_module(void) __copy(initfn) \
| ^~~~~~~~~~~
include/linux/device/driver.h:262:1: note: in expansion of macro 'module_init'
262 | module_init(__driver##_init); \
| ^~~~~~~~~~~
include/linux/platform_device.h:303:2: note: in expansion of macro 'module_driver'
303 | module_driver(__platform_driver, platform_driver_register, \
| ^~~~~~~~~~~~~
drivers/reset/reset-meson.c:232:1: note: in expansion of macro 'module_platform_driver'
232 | module_platform_driver(meson_reset_pltf_driver);
| ^~~~~~~~~~~~~~~~~~~~~~
>> include/linux/module.h:139:42: error: redefinition of '__exittest'
139 | static inline exitcall_t __maybe_unused __exittest(void) \
| ^~~~~~~~~~
include/linux/device/driver.h:267:1: note: in expansion of macro 'module_exit'
267 | module_exit(__driver##_exit);
| ^~~~~~~~~~~
include/linux/auxiliary_bus.h:245:2: note: in expansion of macro 'module_driver'
245 | module_driver(__auxiliary_driver, auxiliary_driver_register, auxiliary_driver_unregister)
| ^~~~~~~~~~~~~
drivers/reset/reset-meson.c:272:1: note: in expansion of macro 'module_auxiliary_driver'
272 | module_auxiliary_driver(meson_reset_aux_driver);
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/module.h:139:42: note: previous definition of '__exittest' was here
139 | static inline exitcall_t __maybe_unused __exittest(void) \
| ^~~~~~~~~~
include/linux/device/driver.h:267:1: note: in expansion of macro 'module_exit'
267 | module_exit(__driver##_exit);
| ^~~~~~~~~~~
include/linux/platform_device.h:303:2: note: in expansion of macro 'module_driver'
303 | module_driver(__platform_driver, platform_driver_register, \
| ^~~~~~~~~~~~~
drivers/reset/reset-meson.c:232:1: note: in expansion of macro 'module_platform_driver'
232 | module_platform_driver(meson_reset_pltf_driver);
| ^~~~~~~~~~~~~~~~~~~~~~
>> include/linux/module.h:141:7: error: redefinition of 'cleanup_module'
141 | void cleanup_module(void) __copy(exitfn) \
| ^~~~~~~~~~~~~~
include/linux/device/driver.h:267:1: note: in expansion of macro 'module_exit'
267 | module_exit(__driver##_exit);
| ^~~~~~~~~~~
include/linux/auxiliary_bus.h:245:2: note: in expansion of macro 'module_driver'
245 | module_driver(__auxiliary_driver, auxiliary_driver_register, auxiliary_driver_unregister)
| ^~~~~~~~~~~~~
drivers/reset/reset-meson.c:272:1: note: in expansion of macro 'module_auxiliary_driver'
272 | module_auxiliary_driver(meson_reset_aux_driver);
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/module.h:141:7: note: previous definition of 'cleanup_module' was here
141 | void cleanup_module(void) __copy(exitfn) \
| ^~~~~~~~~~~~~~
include/linux/device/driver.h:267:1: note: in expansion of macro 'module_exit'
267 | module_exit(__driver##_exit);
| ^~~~~~~~~~~
include/linux/platform_device.h:303:2: note: in expansion of macro 'module_driver'
303 | module_driver(__platform_driver, platform_driver_register, \
| ^~~~~~~~~~~~~
drivers/reset/reset-meson.c:232:1: note: in expansion of macro 'module_platform_driver'
232 | module_platform_driver(meson_reset_pltf_driver);
| ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/reset/reset-meson.c:292:5: error: redefinition of 'devm_meson_rst_aux_register'
292 | int devm_meson_rst_aux_register(struct device *dev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/reset/reset-meson.c:20:
include/soc/amlogic/meson-auxiliary-reset.h:15:19: note: previous definition of 'devm_meson_rst_aux_register' was here
15 | static inline int devm_meson_rst_aux_register(struct device *dev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/devm_meson_rst_aux_register +292 drivers/reset/reset-meson.c
224
225 static struct platform_driver meson_reset_pltf_driver = {
226 .probe = meson_reset_pltf_probe,
227 .driver = {
228 .name = "meson_reset",
229 .of_match_table = meson_reset_dt_ids,
230 },
231 };
> 232 module_platform_driver(meson_reset_pltf_driver);
233
234 static const struct meson_reset_param meson_g12a_audio_param = {
235 .reset_ops = &meson_reset_toggle_ops,
236 .reset_num = 26,
237 .level_offset = 0x24,
238 };
239
240 static const struct meson_reset_param meson_sm1_audio_param = {
241 .reset_ops = &meson_reset_toggle_ops,
242 .reset_num = 39,
243 .level_offset = 0x28,
244 };
245
246 static const struct auxiliary_device_id meson_reset_aux_ids[] = {
247 {
248 .name = "axg-audio-clkc.rst-g12a",
249 .driver_data = (kernel_ulong_t)&meson_g12a_audio_param,
250 }, {
251 .name = "axg-audio-clkc.rst-sm1",
252 .driver_data = (kernel_ulong_t)&meson_sm1_audio_param,
253 },
254 };
255 MODULE_DEVICE_TABLE(auxiliary, meson_reset_aux_ids);
256
257 static int meson_reset_aux_probe(struct auxiliary_device *adev,
258 const struct auxiliary_device_id *id)
259 {
260 const struct meson_reset_param *param =
261 (const struct meson_reset_param *)(id->driver_data);
262 struct meson_reset_adev *raux =
263 to_meson_reset_adev(adev);
264
265 return meson_reset_probe(&adev->dev, raux->map, param);
266 }
267
268 static struct auxiliary_driver meson_reset_aux_driver = {
269 .probe = meson_reset_aux_probe,
270 .id_table = meson_reset_aux_ids,
271 };
272 module_auxiliary_driver(meson_reset_aux_driver);
273
274 static void meson_rst_aux_release(struct device *dev)
275 {
276 struct auxiliary_device *adev = to_auxiliary_dev(dev);
277 struct meson_reset_adev *raux =
278 to_meson_reset_adev(adev);
279
280 ida_free(&meson_rst_aux_ida, adev->id);
281 kfree(raux);
282 }
283
284 static void meson_rst_aux_unregister_adev(void *_adev)
285 {
286 struct auxiliary_device *adev = _adev;
287
288 auxiliary_device_delete(adev);
289 auxiliary_device_uninit(adev);
290 }
291
> 292 int devm_meson_rst_aux_register(struct device *dev,
293 struct regmap *map,
294 const char *adev_name)
295 {
296 struct meson_reset_adev *raux;
297 struct auxiliary_device *adev;
298 int ret;
299
300 raux = kzalloc(sizeof(*raux), GFP_KERNEL);
301 if (!raux)
302 return -ENOMEM;
303
304 ret = ida_alloc(&meson_rst_aux_ida, GFP_KERNEL);
305 if (ret < 0)
306 goto raux_free;
307
308 raux->map = map;
309
310 adev = &raux->adev;
311 adev->id = ret;
312 adev->name = adev_name;
313 adev->dev.parent = dev;
314 adev->dev.release = meson_rst_aux_release;
315 device_set_of_node_from_dev(&adev->dev, dev);
316
317 ret = auxiliary_device_init(adev);
318 if (ret)
319 goto ida_free;
320
321 ret = __auxiliary_device_add(adev, dev->driver->name);
322 if (ret) {
323 auxiliary_device_uninit(adev);
324 return ret;
325 }
326
327 return devm_add_action_or_reset(dev, meson_rst_aux_unregister_adev,
328 adev);
329
330 ida_free:
331 ida_free(&meson_rst_aux_ida, adev->id);
332 raux_free:
333 kfree(raux);
334 return ret;
335
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists