[alsa-devel] [PATCH 06/19] ASoC: wm8995: Convert to module_i2c/spi_driver()

kbuild test robot lkp at intel.com
Tue Nov 15 19:05:49 CET 2016


Hi Kuninori,

[auto build test WARNING on v4.9-rc5]
[cannot apply to asoc/for-next next-20161115]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Kuninori-Morimoto/ASoC-Convert-to-module_i2c-spi_driver/20161116-005820
config: s390-allmodconfig (attached as .config)
compiler: s390x-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=s390 

All warnings (new ones prefixed by >>):

   In file included from sound/soc/codecs/wm8995.c:15:0:
   include/linux/module.h:130:27: error: redefinition of '__inittest'
     static inline initcall_t __inittest(void)  \
                              ^
   include/linux/device.h:1353:1: note: in expansion of macro 'module_init'
    module_init(__driver##_init); \
    ^~~~~~~~~~~
   include/linux/i2c.h:751:2: note: in expansion of macro 'module_driver'
     module_driver(__i2c_driver, i2c_add_driver, \
     ^~~~~~~~~~~~~
>> sound/soc/codecs/wm8995.c:2308:1: note: in expansion of macro 'module_i2c_driver'
    module_i2c_driver(wm8995_i2c_driver);
    ^~~~~~~~~~~~~~~~~
   include/linux/module.h:130:27: note: previous definition of '__inittest' was here
     static inline initcall_t __inittest(void)  \
                              ^
   include/linux/device.h:1353:1: note: in expansion of macro 'module_init'
    module_init(__driver##_init); \
    ^~~~~~~~~~~
   include/linux/spi/spi.h:290:2: note: in expansion of macro 'module_driver'
     module_driver(__spi_driver, spi_register_driver, \
     ^~~~~~~~~~~~~
>> sound/soc/codecs/wm8995.c:2255:1: note: in expansion of macro 'module_spi_driver'
    module_spi_driver(wm8995_spi_driver);
    ^~~~~~~~~~~~~~~~~
   include/linux/module.h:132:6: error: redefinition of 'init_module'
     int init_module(void) __attribute__((alias(#initfn)));
         ^
   include/linux/device.h:1353:1: note: in expansion of macro 'module_init'
    module_init(__driver##_init); \
    ^~~~~~~~~~~
   include/linux/i2c.h:751:2: note: in expansion of macro 'module_driver'
     module_driver(__i2c_driver, i2c_add_driver, \
     ^~~~~~~~~~~~~
>> sound/soc/codecs/wm8995.c:2308:1: note: in expansion of macro 'module_i2c_driver'
    module_i2c_driver(wm8995_i2c_driver);
    ^~~~~~~~~~~~~~~~~
   include/linux/module.h:132:6: note: previous definition of 'init_module' was here
     int init_module(void) __attribute__((alias(#initfn)));
         ^
   include/linux/device.h:1353:1: note: in expansion of macro 'module_init'
    module_init(__driver##_init); \
    ^~~~~~~~~~~
   include/linux/spi/spi.h:290:2: note: in expansion of macro 'module_driver'
     module_driver(__spi_driver, spi_register_driver, \
     ^~~~~~~~~~~~~
>> sound/soc/codecs/wm8995.c:2255:1: note: in expansion of macro 'module_spi_driver'
    module_spi_driver(wm8995_spi_driver);
    ^~~~~~~~~~~~~~~~~
   include/linux/module.h:136:27: error: redefinition of '__exittest'
     static inline exitcall_t __exittest(void)  \
                              ^
   include/linux/device.h:1358:1: note: in expansion of macro 'module_exit'
    module_exit(__driver##_exit);
    ^~~~~~~~~~~
   include/linux/i2c.h:751:2: note: in expansion of macro 'module_driver'
     module_driver(__i2c_driver, i2c_add_driver, \
     ^~~~~~~~~~~~~
>> sound/soc/codecs/wm8995.c:2308:1: note: in expansion of macro 'module_i2c_driver'
    module_i2c_driver(wm8995_i2c_driver);
    ^~~~~~~~~~~~~~~~~
   include/linux/module.h:136:27: note: previous definition of '__exittest' was here
     static inline exitcall_t __exittest(void)  \
                              ^
   include/linux/device.h:1358:1: note: in expansion of macro 'module_exit'
    module_exit(__driver##_exit);
    ^~~~~~~~~~~
   include/linux/spi/spi.h:290:2: note: in expansion of macro 'module_driver'
     module_driver(__spi_driver, spi_register_driver, \
     ^~~~~~~~~~~~~
>> sound/soc/codecs/wm8995.c:2255:1: note: in expansion of macro 'module_spi_driver'
    module_spi_driver(wm8995_spi_driver);
    ^~~~~~~~~~~~~~~~~
   include/linux/module.h:138:7: error: redefinition of 'cleanup_module'
     void cleanup_module(void) __attribute__((alias(#exitfn)));
          ^
   include/linux/device.h:1358:1: note: in expansion of macro 'module_exit'
    module_exit(__driver##_exit);
    ^~~~~~~~~~~
   include/linux/i2c.h:751:2: note: in expansion of macro 'module_driver'
     module_driver(__i2c_driver, i2c_add_driver, \
     ^~~~~~~~~~~~~
>> sound/soc/codecs/wm8995.c:2308:1: note: in expansion of macro 'module_i2c_driver'
    module_i2c_driver(wm8995_i2c_driver);
    ^~~~~~~~~~~~~~~~~
   include/linux/module.h:138:7: note: previous definition of 'cleanup_module' was here
     void cleanup_module(void) __attribute__((alias(#exitfn)));
          ^
   include/linux/device.h:1358:1: note: in expansion of macro 'module_exit'
    module_exit(__driver##_exit);
    ^~~~~~~~~~~
   include/linux/spi/spi.h:290:2: note: in expansion of macro 'module_driver'
     module_driver(__spi_driver, spi_register_driver, \
     ^~~~~~~~~~~~~
>> sound/soc/codecs/wm8995.c:2255:1: note: in expansion of macro 'module_spi_driver'
    module_spi_driver(wm8995_spi_driver);
    ^~~~~~~~~~~~~~~~~

vim +/module_i2c_driver +2308 sound/soc/codecs/wm8995.c

  2249		.driver = {
  2250			.name = "wm8995",
  2251		},
  2252		.probe = wm8995_spi_probe,
  2253		.remove = wm8995_spi_remove
  2254	};
> 2255	module_spi_driver(wm8995_spi_driver);
  2256	#endif
  2257	
  2258	#if IS_ENABLED(CONFIG_I2C)
  2259	static int wm8995_i2c_probe(struct i2c_client *i2c,
  2260				    const struct i2c_device_id *id)
  2261	{
  2262		struct wm8995_priv *wm8995;
  2263		int ret;
  2264	
  2265		wm8995 = devm_kzalloc(&i2c->dev, sizeof(*wm8995), GFP_KERNEL);
  2266		if (!wm8995)
  2267			return -ENOMEM;
  2268	
  2269		i2c_set_clientdata(i2c, wm8995);
  2270	
  2271		wm8995->regmap = devm_regmap_init_i2c(i2c, &wm8995_regmap);
  2272		if (IS_ERR(wm8995->regmap)) {
  2273			ret = PTR_ERR(wm8995->regmap);
  2274			dev_err(&i2c->dev, "Failed to register regmap: %d\n", ret);
  2275			return ret;
  2276		}
  2277	
  2278		ret = snd_soc_register_codec(&i2c->dev,
  2279					     &soc_codec_dev_wm8995, wm8995_dai,
  2280					     ARRAY_SIZE(wm8995_dai));
  2281		if (ret < 0)
  2282			dev_err(&i2c->dev, "Failed to register CODEC: %d\n", ret);
  2283	
  2284		return ret;
  2285	}
  2286	
  2287	static int wm8995_i2c_remove(struct i2c_client *client)
  2288	{
  2289		snd_soc_unregister_codec(&client->dev);
  2290		return 0;
  2291	}
  2292	
  2293	static const struct i2c_device_id wm8995_i2c_id[] = {
  2294		{"wm8995", 0},
  2295		{}
  2296	};
  2297	
  2298	MODULE_DEVICE_TABLE(i2c, wm8995_i2c_id);
  2299	
  2300	static struct i2c_driver wm8995_i2c_driver = {
  2301		.driver = {
  2302			.name = "wm8995",
  2303		},
  2304		.probe = wm8995_i2c_probe,
  2305		.remove = wm8995_i2c_remove,
  2306		.id_table = wm8995_i2c_id
  2307	};
> 2308	module_i2c_driver(wm8995_i2c_driver);
  2309	#endif
  2310	
  2311	MODULE_DESCRIPTION("ASoC WM8995 driver");

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 43233 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20161116/dcde26cc/attachment-0001.bin>


More information about the Alsa-devel mailing list