public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* sound/soc/codecs/rl6347a.c:66:8: error: implicit declaration of function 'i2c_master_send'
@ 2015-11-17 11:07 kbuild test robot
  2015-11-17 16:47 ` Vinod Koul
  0 siblings, 1 reply; 2+ messages in thread
From: kbuild test robot @ 2015-11-17 11:07 UTC (permalink / raw)
  To: Omair M Abdullah
  Cc: kbuild-all, linux-kernel, Mark Brown, Jeeja KP, Vinod Koul

[-- Attachment #1: Type: text/plain, Size: 5556 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   8005c49d9aea74d382f474ce11afbbc7d7130bec
commit: 624729fd51871bfbddb647764f180126789a29ee ASoC: Intel: Skylake - Add Skylake RT286 I2S machine driver
date:   4 weeks ago
config: x86_64-randconfig-s5-11171804 (attached as .config)
reproduce:
        git checkout 624729fd51871bfbddb647764f180126789a29ee
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All error/warnings (new ones prefixed by >>):

   sound/soc/codecs/rl6347a.c: In function 'rl6347a_hw_write':
>> sound/soc/codecs/rl6347a.c:66:8: error: implicit declaration of function 'i2c_master_send' [-Werror=implicit-function-declaration]
     ret = i2c_master_send(client, data, 4);
           ^
   sound/soc/codecs/rl6347a.c: In function 'rl6347a_hw_read':
>> sound/soc/codecs/rl6347a.c:114:8: error: implicit declaration of function 'i2c_transfer' [-Werror=implicit-function-declaration]
     ret = i2c_transfer(client->adapter, xfer, 2);
           ^
   cc1: some warnings being treated as errors
--
>> sound/soc/codecs/rt286.c:1269:1: warning: data definition has no type or storage class
    module_i2c_driver(rt286_i2c_driver);
    ^
>> sound/soc/codecs/rt286.c:1269:1: error: type defaults to 'int' in declaration of 'module_i2c_driver' [-Werror=implicit-int]
>> sound/soc/codecs/rt286.c:1269:1: warning: parameter names (without types) in function declaration
>> sound/soc/codecs/rt286.c:1259:26: warning: 'rt286_i2c_driver' defined but not used [-Wunused-variable]
    static struct i2c_driver rt286_i2c_driver = {
                             ^
   cc1: some warnings being treated as errors

vim +/i2c_master_send +66 sound/soc/codecs/rl6347a.c

bc08f96b Oder Chiou 2015-06-12   60  	 * 12 bit VID: value should be 0
bc08f96b Oder Chiou 2015-06-12   61  	 * So we use an OR operator to handle it rather than use if condition.
bc08f96b Oder Chiou 2015-06-12   62  	 */
bc08f96b Oder Chiou 2015-06-12   63  	data[2] = ((reg >> 8) & 0xff) | ((value >> 8) & 0xff);
bc08f96b Oder Chiou 2015-06-12   64  	data[3] = value & 0xff;
bc08f96b Oder Chiou 2015-06-12   65  
bc08f96b Oder Chiou 2015-06-12  @66  	ret = i2c_master_send(client, data, 4);
bc08f96b Oder Chiou 2015-06-12   67  
bc08f96b Oder Chiou 2015-06-12   68  	if (ret == 4)
bc08f96b Oder Chiou 2015-06-12   69  		return 0;
bc08f96b Oder Chiou 2015-06-12   70  	else
bc08f96b Oder Chiou 2015-06-12   71  		pr_err("ret=%d\n", ret);
bc08f96b Oder Chiou 2015-06-12   72  	if (ret < 0)
bc08f96b Oder Chiou 2015-06-12   73  		return ret;
bc08f96b Oder Chiou 2015-06-12   74  	else
bc08f96b Oder Chiou 2015-06-12   75  		return -EIO;
bc08f96b Oder Chiou 2015-06-12   76  }
bc08f96b Oder Chiou 2015-06-12   77  EXPORT_SYMBOL_GPL(rl6347a_hw_write);
bc08f96b Oder Chiou 2015-06-12   78  
bc08f96b Oder Chiou 2015-06-12   79  int rl6347a_hw_read(void *context, unsigned int reg, unsigned int *value)
bc08f96b Oder Chiou 2015-06-12   80  {
bc08f96b Oder Chiou 2015-06-12   81  	struct i2c_client *client = context;
bc08f96b Oder Chiou 2015-06-12   82  	struct i2c_msg xfer[2];
bc08f96b Oder Chiou 2015-06-12   83  	int ret;
bc08f96b Oder Chiou 2015-06-12   84  	__be32 be_reg;
bc08f96b Oder Chiou 2015-06-12   85  	unsigned int index, vid, buf = 0x0;
bc08f96b Oder Chiou 2015-06-12   86  
bc08f96b Oder Chiou 2015-06-12   87  	/* handle index registers */
bc08f96b Oder Chiou 2015-06-12   88  	if (reg <= 0xff) {
bc08f96b Oder Chiou 2015-06-12   89  		rl6347a_hw_write(client, RL6347A_COEF_INDEX, reg);
bc08f96b Oder Chiou 2015-06-12   90  		reg = RL6347A_PROC_COEF;
bc08f96b Oder Chiou 2015-06-12   91  	}
bc08f96b Oder Chiou 2015-06-12   92  
bc08f96b Oder Chiou 2015-06-12   93  	reg = reg | 0x80000;
bc08f96b Oder Chiou 2015-06-12   94  	vid = (reg >> 8) & 0xfff;
bc08f96b Oder Chiou 2015-06-12   95  
bc08f96b Oder Chiou 2015-06-12   96  	if (AC_VERB_GET_AMP_GAIN_MUTE == (vid & 0xf00)) {
bc08f96b Oder Chiou 2015-06-12   97  		index = (reg >> 8) & 0xf;
bc08f96b Oder Chiou 2015-06-12   98  		reg = (reg & ~0xf0f) | index;
bc08f96b Oder Chiou 2015-06-12   99  	}
bc08f96b Oder Chiou 2015-06-12  100  	be_reg = cpu_to_be32(reg);
bc08f96b Oder Chiou 2015-06-12  101  
bc08f96b Oder Chiou 2015-06-12  102  	/* Write register */
bc08f96b Oder Chiou 2015-06-12  103  	xfer[0].addr = client->addr;
bc08f96b Oder Chiou 2015-06-12  104  	xfer[0].flags = 0;
bc08f96b Oder Chiou 2015-06-12  105  	xfer[0].len = 4;
bc08f96b Oder Chiou 2015-06-12  106  	xfer[0].buf = (u8 *)&be_reg;
bc08f96b Oder Chiou 2015-06-12  107  
bc08f96b Oder Chiou 2015-06-12  108  	/* Read data */
bc08f96b Oder Chiou 2015-06-12  109  	xfer[1].addr = client->addr;
bc08f96b Oder Chiou 2015-06-12  110  	xfer[1].flags = I2C_M_RD;
bc08f96b Oder Chiou 2015-06-12  111  	xfer[1].len = 4;
bc08f96b Oder Chiou 2015-06-12  112  	xfer[1].buf = (u8 *)&buf;
bc08f96b Oder Chiou 2015-06-12  113  
bc08f96b Oder Chiou 2015-06-12 @114  	ret = i2c_transfer(client->adapter, xfer, 2);
bc08f96b Oder Chiou 2015-06-12  115  	if (ret < 0)
bc08f96b Oder Chiou 2015-06-12  116  		return ret;
bc08f96b Oder Chiou 2015-06-12  117  	else if (ret != 2)

:::::: The code at line 66 was first introduced by commit
:::::: bc08f96b5fa783132c278d7a48a1c18feca5813f ASoC: rt286: Add RL6347A class device shared support for RT286

:::::: TO: Oder Chiou <oder_chiou@realtek.com>
:::::: CC: Mark Brown <broonie@kernel.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 18598 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-17 16:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-17 11:07 sound/soc/codecs/rl6347a.c:66:8: error: implicit declaration of function 'i2c_master_send' kbuild test robot
2015-11-17 16:47 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox