[PATCH v2 2/2] i2c: Introduce i2c_str_read_write() and make use of it

Wolfram Sang wsa+renesas at sang-engineering.com
Wed Jul 6 06:06:42 PDT 2022


Hi Andy,

On Sun, Jul 03, 2022 at 06:42:32PM +0300, Andy Shevchenko wrote:
> str_read_write() returns a string literal "read" or "write" based
> on the value. It also allows to unify usage of a such in the kernel.
> 
> For i2c case introduce a wrapper that takes struct i2c_msg as parameter.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com>

To be honest, I don't think this series is very useful. Most of the
converted strings here are debug printouts which could rather be removed
because we have a tracepoint for i2c_transfer (which is the preferred
unification). The warnings printed on timeouts are plain wrong, because
timeouts can happen and need to be handled by the client driver. And the
change in the I2C core is not worth the hazzle IMHO.

Happy hacking,

   Wolfram
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20220706/e5a5d8f7/attachment.sig>


More information about the linux-arm-kernel mailing list