Thread (8 messages) 8 messages, 4 authors, 2018-05-14

[PATCH 00/21] i2c: make use of i2c_8bit_addr_from_msg

From: joe@perches.com (Joe Perches)
Date: 2018-05-14 16:12:09
Also in: linux-arm-msm, linux-aspeed, linux-i2c, linuxppc-dev, lkml, openbmc

On Mon, 2018-05-14 at 16:53 +0200, Peter Rosin wrote:
Hi!

The nice little inline i2c_8bit_addr_from_msg is not getting
enough use. This series improves the situation and drops a
bunch of lines in the process.
Perhaps the inline should test for I2C_M_REV_DIR_ADDR
as there is at least one use like

-               addr = msg->addr << 1;
-               if (flags & I2C_M_RD)
-                       addr |= 1;
+               addr = i2c_8bit_addr_from_msg(msg);
                if (flags & I2C_M_REV_DIR_ADDR)
                        addr ^= 1;

which look odd

Do any of these changes now no longer need
the temporary flags variable?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help