Re: [PATCH v4 1/1] mfd: Add I2C based System Configuaration (SYSCON) access

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Lee,

I love your patch! Yet something to improve:

[auto build test ERROR on ljones-mfd/for-mfd-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use  as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Lee-Jones/mfd-Add-I2C-based-System-Configuaration-SYSCON-access/20200622-155310
base:   https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git for-mfd-next
config: riscv-randconfig-r035-20200705 (attached as .config)
compiler: riscv32-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   riscv32-linux-ld: arch/riscv/kernel/sbi.o: in function `sbi_power_off':
   arch/riscv/kernel/sbi.c:544: undefined reference to `sbi_shutdown'
   riscv32-linux-ld: drivers/base/regmap/regmap-i2c.o: in function `regmap_smbus_byte_reg_read':
>> drivers/base/regmap/regmap-i2c.c:25: undefined reference to `i2c_smbus_read_byte_data'
   riscv32-linux-ld: drivers/base/regmap/regmap-i2c.o: in function `regmap_smbus_byte_reg_write':
>> drivers/base/regmap/regmap-i2c.c:43: undefined reference to `i2c_smbus_write_byte_data'
   riscv32-linux-ld: drivers/base/regmap/regmap-i2c.o: in function `regmap_smbus_word_reg_read':
>> drivers/base/regmap/regmap-i2c.c:61: undefined reference to `i2c_smbus_read_word_data'
   riscv32-linux-ld: drivers/base/regmap/regmap-i2c.o: in function `i2c_smbus_read_word_swapped':
>> include/linux/i2c.h:159: undefined reference to `i2c_smbus_read_word_data'
   riscv32-linux-ld: drivers/base/regmap/regmap-i2c.o: in function `i2c_smbus_write_word_swapped':
>> include/linux/i2c.h:168: undefined reference to `i2c_smbus_write_word_data'
   riscv32-linux-ld: drivers/base/regmap/regmap-i2c.o: in function `regmap_smbus_word_reg_write':
>> drivers/base/regmap/regmap-i2c.c:79: undefined reference to `i2c_smbus_write_word_data'
   riscv32-linux-ld: drivers/base/regmap/regmap-i2c.o: in function `regmap_i2c_smbus_i2c_read':
>> drivers/base/regmap/regmap-i2c.c:233: undefined reference to `i2c_smbus_read_i2c_block_data'
   riscv32-linux-ld: drivers/base/regmap/regmap-i2c.o: in function `regmap_i2c_smbus_i2c_write':
>> drivers/base/regmap/regmap-i2c.c:218: undefined reference to `i2c_smbus_write_i2c_block_data'
   riscv32-linux-ld: drivers/base/regmap/regmap-i2c.o: in function `regmap_i2c_read':
>> drivers/base/regmap/regmap-i2c.c:191: undefined reference to `i2c_transfer'
   riscv32-linux-ld: drivers/base/regmap/regmap-i2c.o: in function `i2c_master_send':
>> include/linux/i2c.h:105: undefined reference to `i2c_transfer_buffer_flags'
   riscv32-linux-ld: drivers/base/regmap/regmap-i2c.o: in function `regmap_i2c_gather_write':
   drivers/base/regmap/regmap-i2c.c:161: undefined reference to `i2c_transfer'

vim +159 include/linux/i2c.h

ba98645c7d5464 Wolfram Sang     2017-11-04   93  
8a91732b3b3345 Wolfram Sang     2017-11-04   94  /**
8a91732b3b3345 Wolfram Sang     2017-11-04   95   * i2c_master_send - issue a single I2C message in master transmit mode
8a91732b3b3345 Wolfram Sang     2017-11-04   96   * @client: Handle to slave device
8a91732b3b3345 Wolfram Sang     2017-11-04   97   * @buf: Data that will be written to the slave
8a91732b3b3345 Wolfram Sang     2017-11-04   98   * @count: How many bytes to write, must be less than 64k since msg.len is u16
8a91732b3b3345 Wolfram Sang     2017-11-04   99   *
8a91732b3b3345 Wolfram Sang     2017-11-04  100   * Returns negative errno, or else the number of bytes written.
8a91732b3b3345 Wolfram Sang     2017-11-04  101   */
8a91732b3b3345 Wolfram Sang     2017-11-04  102  static inline int i2c_master_send(const struct i2c_client *client,
8a91732b3b3345 Wolfram Sang     2017-11-04  103  				  const char *buf, int count)
8a91732b3b3345 Wolfram Sang     2017-11-04  104  {
8a91732b3b3345 Wolfram Sang     2017-11-04 @105  	return i2c_transfer_buffer_flags(client, (char *)buf, count, 0);
8a91732b3b3345 Wolfram Sang     2017-11-04  106  };
^1da177e4c3f41 Linus Torvalds   2005-04-16  107  
ba98645c7d5464 Wolfram Sang     2017-11-04  108  /**
ba98645c7d5464 Wolfram Sang     2017-11-04  109   * i2c_master_send_dmasafe - issue a single I2C message in master transmit mode
ba98645c7d5464 Wolfram Sang     2017-11-04  110   *			     using a DMA safe buffer
ba98645c7d5464 Wolfram Sang     2017-11-04  111   * @client: Handle to slave device
ba98645c7d5464 Wolfram Sang     2017-11-04  112   * @buf: Data that will be written to the slave, must be safe to use with DMA
ba98645c7d5464 Wolfram Sang     2017-11-04  113   * @count: How many bytes to write, must be less than 64k since msg.len is u16
ba98645c7d5464 Wolfram Sang     2017-11-04  114   *
ba98645c7d5464 Wolfram Sang     2017-11-04  115   * Returns negative errno, or else the number of bytes written.
ba98645c7d5464 Wolfram Sang     2017-11-04  116   */
ba98645c7d5464 Wolfram Sang     2017-11-04  117  static inline int i2c_master_send_dmasafe(const struct i2c_client *client,
ba98645c7d5464 Wolfram Sang     2017-11-04  118  					  const char *buf, int count)
ba98645c7d5464 Wolfram Sang     2017-11-04  119  {
ba98645c7d5464 Wolfram Sang     2017-11-04  120  	return i2c_transfer_buffer_flags(client, (char *)buf, count,
ba98645c7d5464 Wolfram Sang     2017-11-04  121  					 I2C_M_DMA_SAFE);
ba98645c7d5464 Wolfram Sang     2017-11-04  122  };
ba98645c7d5464 Wolfram Sang     2017-11-04  123  
^1da177e4c3f41 Linus Torvalds   2005-04-16  124  /* Transfer num messages.
^1da177e4c3f41 Linus Torvalds   2005-04-16  125   */
c807da539e8276 Luca Ceresoli    2019-12-04  126  int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num);
b37d2a3a75cb0e Jean Delvare     2012-06-29  127  /* Unlocked flavor */
c807da539e8276 Luca Ceresoli    2019-12-04  128  int __i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num);
^1da177e4c3f41 Linus Torvalds   2005-04-16  129  
^1da177e4c3f41 Linus Torvalds   2005-04-16  130  /* This is the very generalized SMBus access routine. You probably do not
^1da177e4c3f41 Linus Torvalds   2005-04-16  131     want to use this, though; one of the functions below may be much easier,
^1da177e4c3f41 Linus Torvalds   2005-04-16  132     and probably just as fast.
^1da177e4c3f41 Linus Torvalds   2005-04-16  133     Note that we use i2c_adapter here, because you do not need a specific
^1da177e4c3f41 Linus Torvalds   2005-04-16  134     smbus adapter to call this function. */
63453b59e41173 Peter Rosin      2018-06-20  135  s32 i2c_smbus_xfer(struct i2c_adapter *adapter, u16 addr,
3ae70deef0a5cc Jean Delvare     2008-10-22  136  		   unsigned short flags, char read_write, u8 command,
63453b59e41173 Peter Rosin      2018-06-20  137  		   int protocol, union i2c_smbus_data *data);
63453b59e41173 Peter Rosin      2018-06-20  138  
63453b59e41173 Peter Rosin      2018-06-20  139  /* Unlocked flavor */
63453b59e41173 Peter Rosin      2018-06-20  140  s32 __i2c_smbus_xfer(struct i2c_adapter *adapter, u16 addr,
63453b59e41173 Peter Rosin      2018-06-20  141  		     unsigned short flags, char read_write, u8 command,
63453b59e41173 Peter Rosin      2018-06-20  142  		     int protocol, union i2c_smbus_data *data);
^1da177e4c3f41 Linus Torvalds   2005-04-16  143  
^1da177e4c3f41 Linus Torvalds   2005-04-16  144  /* Now follow the 'nice' access routines. These also document the calling
ae7193f7fa3e17 Jean Delvare     2008-07-14  145     conventions of i2c_smbus_xfer. */
^1da177e4c3f41 Linus Torvalds   2005-04-16  146  
c807da539e8276 Luca Ceresoli    2019-12-04  147  s32 i2c_smbus_read_byte(const struct i2c_client *client);
c807da539e8276 Luca Ceresoli    2019-12-04  148  s32 i2c_smbus_write_byte(const struct i2c_client *client, u8 value);
c807da539e8276 Luca Ceresoli    2019-12-04  149  s32 i2c_smbus_read_byte_data(const struct i2c_client *client, u8 command);
c807da539e8276 Luca Ceresoli    2019-12-04  150  s32 i2c_smbus_write_byte_data(const struct i2c_client *client,
^1da177e4c3f41 Linus Torvalds   2005-04-16  151  			      u8 command, u8 value);
c807da539e8276 Luca Ceresoli    2019-12-04  152  s32 i2c_smbus_read_word_data(const struct i2c_client *client, u8 command);
c807da539e8276 Luca Ceresoli    2019-12-04  153  s32 i2c_smbus_write_word_data(const struct i2c_client *client,
^1da177e4c3f41 Linus Torvalds   2005-04-16  154  			      u8 command, u16 value);
06a67848c6681a Jonathan Cameron 2011-10-30  155  
06a67848c6681a Jonathan Cameron 2011-10-30  156  static inline s32
06a67848c6681a Jonathan Cameron 2011-10-30  157  i2c_smbus_read_word_swapped(const struct i2c_client *client, u8 command)
06a67848c6681a Jonathan Cameron 2011-10-30  158  {
06a67848c6681a Jonathan Cameron 2011-10-30 @159  	s32 value = i2c_smbus_read_word_data(client, command);
06a67848c6681a Jonathan Cameron 2011-10-30  160  
06a67848c6681a Jonathan Cameron 2011-10-30  161  	return (value < 0) ? value : swab16(value);
06a67848c6681a Jonathan Cameron 2011-10-30  162  }
06a67848c6681a Jonathan Cameron 2011-10-30  163  
06a67848c6681a Jonathan Cameron 2011-10-30  164  static inline s32
06a67848c6681a Jonathan Cameron 2011-10-30  165  i2c_smbus_write_word_swapped(const struct i2c_client *client,
06a67848c6681a Jonathan Cameron 2011-10-30  166  			     u8 command, u16 value)
06a67848c6681a Jonathan Cameron 2011-10-30  167  {
06a67848c6681a Jonathan Cameron 2011-10-30 @168  	return i2c_smbus_write_word_data(client, command, swab16(value));
06a67848c6681a Jonathan Cameron 2011-10-30  169  }
06a67848c6681a Jonathan Cameron 2011-10-30  170  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux