Skip to contentSkip to conversation

i3c: master: use 'dev' variable in dev_err

PATCH In review Luca Ceresoli 2 participants 2 messages Feb 24, 2020 – Feb 26, 2020 I3C

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i3c: master: use 'dev' variable in dev_err

of_i3c_master_add_i2c_boardinfo() already has a handy 'dev' variable, use it and simplify code.

---
 drivers/i3c/master.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i3c/master.c +1 -1
index 7f8f896fa0c3..b56207bbed2b 100644
@@ -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;
 	}
 
Signature · 1 line
2.25.0
#1 lore raw

Hello Lucas,

Quoted 2 lines · On Mon, 24 Feb 2020 09:34:39 +0100 Luca Ceresoli <[email protected]> wrote:

of_i3c_master_add_i2c_boardinfo() already has a handy 'dev' variable, use it and simplify code.

I already applied a similar patch from Wolfram, but thanks for your contribution.

Regards,

Boris

Quoted 19 lines
---
 drivers/i3c/master.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i3c/master.c +1 -1
index 7f8f896fa0c3..b56207bbed2b 100644
@@ -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;
 	}