lkml.org 
[lkml]   [2019]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectdrivers/ptp/ptp_clockmatrix.c:107: undefined reference to `i2c_transfer'
Hi Ingo,

It's probably a bug fix that unveils the link errors.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6794862a16ef41f753abd75c03a152836e4c8028
commit: 0bcd7762727dd8ba9b9b6f828e5a4cbd5da4f725 x86/iopl: Make 'struct tss_struct' constant size again
date: 2 weeks ago
config: i386-randconfig-b001-20191211 (attached as .config)
compiler: gcc-7 (Debian 7.5.0-1) 7.5.0
reproduce:
git checkout 0bcd7762727dd8ba9b9b6f828e5a4cbd5da4f725
# save the attached .config to linux build tree
make ARCH=i386

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

ld: drivers/ptp/ptp_clockmatrix.o: in function `idtcm_xfer':
>> drivers/ptp/ptp_clockmatrix.c:107: undefined reference to `i2c_transfer'
ld: drivers/ptp/ptp_clockmatrix.o: in function `idtcm_driver_init':
>> drivers/ptp/ptp_clockmatrix.c:1427: undefined reference to `i2c_register_driver'
ld: drivers/ptp/ptp_clockmatrix.o: in function `idtcm_driver_exit':
>> drivers/ptp/ptp_clockmatrix.c:1427: undefined reference to `i2c_del_driver'

vim +107 drivers/ptp/ptp_clockmatrix.c

3a6ba7dc779935 Vincent Cheng 2019-10-31 86
3a6ba7dc779935 Vincent Cheng 2019-10-31 87 static int idtcm_xfer(struct idtcm *idtcm,
3a6ba7dc779935 Vincent Cheng 2019-10-31 88 u8 regaddr,
3a6ba7dc779935 Vincent Cheng 2019-10-31 89 u8 *buf,
3a6ba7dc779935 Vincent Cheng 2019-10-31 90 u16 count,
3a6ba7dc779935 Vincent Cheng 2019-10-31 91 bool write)
3a6ba7dc779935 Vincent Cheng 2019-10-31 92 {
3a6ba7dc779935 Vincent Cheng 2019-10-31 93 struct i2c_client *client = idtcm->client;
3a6ba7dc779935 Vincent Cheng 2019-10-31 94 struct i2c_msg msg[2];
3a6ba7dc779935 Vincent Cheng 2019-10-31 95 int cnt;
3a6ba7dc779935 Vincent Cheng 2019-10-31 96
3a6ba7dc779935 Vincent Cheng 2019-10-31 97 msg[0].addr = client->addr;
3a6ba7dc779935 Vincent Cheng 2019-10-31 98 msg[0].flags = 0;
3a6ba7dc779935 Vincent Cheng 2019-10-31 99 msg[0].len = 1;
3a6ba7dc779935 Vincent Cheng 2019-10-31 100 msg[0].buf = &regaddr;
3a6ba7dc779935 Vincent Cheng 2019-10-31 101
3a6ba7dc779935 Vincent Cheng 2019-10-31 102 msg[1].addr = client->addr;
3a6ba7dc779935 Vincent Cheng 2019-10-31 103 msg[1].flags = write ? 0 : I2C_M_RD;
3a6ba7dc779935 Vincent Cheng 2019-10-31 104 msg[1].len = count;
3a6ba7dc779935 Vincent Cheng 2019-10-31 105 msg[1].buf = buf;
3a6ba7dc779935 Vincent Cheng 2019-10-31 106
3a6ba7dc779935 Vincent Cheng 2019-10-31 @107 cnt = i2c_transfer(client->adapter, msg, 2);
3a6ba7dc779935 Vincent Cheng 2019-10-31 108
3a6ba7dc779935 Vincent Cheng 2019-10-31 109 if (cnt < 0) {
3a6ba7dc779935 Vincent Cheng 2019-10-31 110 dev_err(&client->dev, "i2c_transfer returned %d\n", cnt);
3a6ba7dc779935 Vincent Cheng 2019-10-31 111 return cnt;
3a6ba7dc779935 Vincent Cheng 2019-10-31 112 } else if (cnt != 2) {
3a6ba7dc779935 Vincent Cheng 2019-10-31 113 dev_err(&client->dev,
3a6ba7dc779935 Vincent Cheng 2019-10-31 114 "i2c_transfer sent only %d of %d messages\n", cnt, 2);
3a6ba7dc779935 Vincent Cheng 2019-10-31 115 return -EIO;
3a6ba7dc779935 Vincent Cheng 2019-10-31 116 }
3a6ba7dc779935 Vincent Cheng 2019-10-31 117
3a6ba7dc779935 Vincent Cheng 2019-10-31 118 return 0;
3a6ba7dc779935 Vincent Cheng 2019-10-31 119 }
3a6ba7dc779935 Vincent Cheng 2019-10-31 120

:::::: The code at line 107 was first introduced by commit
:::::: 3a6ba7dc7799355557938fbdc15a558236011429 ptp: Add a ptp clock driver for IDT ClockMatrix.

:::::: TO: Vincent Cheng <vincent.cheng.xh@renesas.com>
:::::: CC: David S. Miller <davem@davemloft.net>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2019-12-11 12:50    [W:0.027 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site