diff mbox series

i3c: master: no need to iterate master device twice

Message ID 20200214145853.24762-1-wsa+renesas@sang-engineering.com (mailing list archive)
State Mainlined
Commit de8964995c798fcf372980e5d819eec8cf3e41e1
Headers show
Series i3c: master: no need to iterate master device twice | expand

Commit Message

Wolfram Sang Feb. 14, 2020, 2:58 p.m. UTC
We already have the master device in a variable, reuse it.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---

Found while refactoring of_i2c_get_board_info() and checking its users.

 drivers/i3c/master.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Vitor Soares Feb. 17, 2020, 11:18 a.m. UTC | #1
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
Date: Fri, Feb 14, 2020 at 14:58:53

> We already have the master device in a variable, reuse it.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Acked-by: Vitor Soares <vitor.soares@synopsys.com>

Best regards,
Vitor 
Soares
Boris Brezillon Feb. 17, 2020, 11:29 a.m. UTC | #2
On Mon, 17 Feb 2020 10:43:49 +0000
Vitor Soares <Vitor.Soares@synopsys.com> wrote:

> ++Boris Brezillon,
> 
> Hi,
> 
> I didn't received the patch neither is in pachtwork I3C ML, it might be 
> held on the server.
> 
> @Boris Brezillon: Could you please check it?

Done.
Kieran Bingham Feb. 18, 2020, 12:38 a.m. UTC | #3
Hi Wolfram,

On 14/02/2020 14:58, Wolfram Sang wrote:
> We already have the master device in a variable, reuse it.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

> ---
> 
> Found while refactoring of_i2c_get_board_info() and checking its users.
> 
>  drivers/i3c/master.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
> index 7f8f896fa0c3..b56207bbed2b 100644
> --- a/drivers/i3c/master.c
> +++ b/drivers/i3c/master.c
> @@ -1953,7 +1953,7 @@ of_i3c_master_add_i2c_boardinfo(struct i3c_master_controller *master,
>  	 * DEFSLVS command.
>  	 */
>  	if (boardinfo->base.flags & I2C_CLIENT_TEN) {
> -		dev_err(&master->dev, "I2C device with 10 bit address not supported.");
> +		dev_err(dev, "I2C device with 10 bit address not supported.");
>  		return -ENOTSUPP;
>  	}
>  
>
diff mbox series

Patch

diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
index 7f8f896fa0c3..b56207bbed2b 100644
--- a/drivers/i3c/master.c
+++ b/drivers/i3c/master.c
@@ -1953,7 +1953,7 @@  of_i3c_master_add_i2c_boardinfo(struct i3c_master_controller *master,
 	 * DEFSLVS command.
 	 */
 	if (boardinfo->base.flags & I2C_CLIENT_TEN) {
-		dev_err(&master->dev, "I2C device with 10 bit address not supported.");
+		dev_err(dev, "I2C device with 10 bit address not supported.");
 		return -ENOTSUPP;
 	}