Re: [PATCH net-next v4 2/2] mctp i2c: MCTP I2C binding driver

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

 



On Wed,  9 Feb 2022 18:31:21 +0800 Matt Johnston wrote:
> Provides MCTP network transport over an I2C bus, as specified in
> DMTF DSP0237. All messages between nodes are sent as SMBus Block Writes.
> 
> Each I2C bus to be used for MCTP is flagged in devicetree by a
> 'mctp-controller' property on the bus node. Each flagged bus gets a
> mctpi2cX net device created based on the bus number. A
> 'mctp-i2c-controller' I2C client needs to be added under the adapter. In
> an I2C mux situation the mctp-i2c-controller node must be attached only
> to the root I2C bus. The I2C client will handle incoming I2C slave block
> write data for subordinate busses as well as its own bus.
> 
> In configurations without devicetree a driver instance can be attached
> to a bus using the I2C slave new_device mechanism.
> 
> The MCTP core will hold/release the MCTP I2C device while responses
> are pending (a 6 second timeout or once a socket is closed, response
> received etc). While held the MCTP I2C driver will lock the I2C bus so
> that the correct I2C mux remains selected while responses are received.
> 
> (Ideally we would just lock the mux to keep the current bus selected for
> the response rather than a full I2C bus lock, but that isn't exposed in
> the I2C mux API)
> 
> Signed-off-by: Matt Johnston <matt@xxxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Jeremy Kerr <jk@xxxxxxxxxxxxxxxxxxxx>

drivers/net/mctp/mctp-i2c.c: In function ‘mctp_i2c_xmit’:
drivers/net/mctp/mctp-i2c.c:442:38: warning: format ‘%zu’ expects argument of type ‘size_t’, but argument 3 has type ‘int’ [-Wformat=]
  442 |                                      "Bad tx length %zu vs skb %u\n",
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro ‘dev_printk_index_wrap’
  110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
      |                              ^~~
include/linux/dev_printk.h:146:61: note: in expansion of macro ‘dev_fmt’
  146 |         dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__)
      |                                                             ^~~~~~~
include/linux/dev_printk.h:208:17: note: in expansion of macro ‘dev_warn’
  208 |                 dev_level(dev, fmt, ##__VA_ARGS__);                     \
      |                 ^~~~~~~~~
include/linux/dev_printk.h:220:9: note: in expansion of macro ‘dev_level_ratelimited’
  220 |         dev_level_ratelimited(dev_warn, dev, fmt, ##__VA_ARGS__)
      |         ^~~~~~~~~~~~~~~~~~~~~
drivers/net/mctp/mctp-i2c.c:441:17: note: in expansion of macro ‘dev_warn_ratelimited’
  441 |                 dev_warn_ratelimited(&midev->adapter->dev,
      |                 ^~~~~~~~~~~~~~~~~~~~
drivers/net/mctp/mctp-i2c.c:442:55: note: format string is defined here
  442 |                                      "Bad tx length %zu vs skb %u\n",
      |                                                     ~~^
      |                                                       |
      |                                                       long unsigned int
      |                                                     %u




[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux