[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c83bb5ddf36b419c4c01e20384c7b532c9a48cd4.camel@perches.com>
Date: Mon, 14 May 2018 09:11:57 -0700
From: Joe Perches <joe@...ches.com>
To: Peter Rosin <peda@...ntia.se>, linux-kernel@...r.kernel.org
Cc: Brendan Higgins <brendanhiggins@...gle.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Joel Stanley <joel@....id.au>,
Andrew Jeffery <andrew@...id.au>,
Guenter Roeck <linux@...ck-us.net>,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
Peter Korsgaard <jacmet@...site.dk>,
Andy Gross <andy.gross@...aro.org>,
David Brown <david.brown@...aro.org>,
Linus Walleij <linus.walleij@...aro.org>,
linux-i2c@...r.kernel.org, openbmc@...ts.ozlabs.org,
linux-arm-kernel@...ts.infradead.org,
linux-aspeed@...ts.ozlabs.org, linuxppc-dev@...ts.ozlabs.org,
linux-arm-msm@...r.kernel.org, linux-soc@...r.kernel.org
Subject: Re: [PATCH 00/21] i2c: make use of i2c_8bit_addr_from_msg
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?
Powered by blists - more mailing lists