[PATCH] i2c: mxc_i2c: improve error message readability

From: Marc Ferland ferlandm@amotus.ca
Signed-off-by: Marc Ferland ferlandm@amotus.ca --- drivers/i2c/mxc_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c index 7609594bd0..d486dab043 100644 --- a/drivers/i2c/mxc_i2c.c +++ b/drivers/i2c/mxc_i2c.c @@ -954,7 +954,7 @@ static int mxc_i2c_probe(struct udevice *bus) !dm_gpio_is_valid(&i2c_bus->scl_gpio) || ret || ret2) { dev_err(bus, - "i2c bus %d at %lu, fail to request scl/sda gpio\n", + "i2c bus %d at 0x%2lx, fail to request scl/sda gpio\n", bus->seq, i2c_bus->base); return -EINVAL; }

Hi Marc,
On Sat, Dec 19, 2020 at 11:27 AM ferlandm@amotus.ca wrote:
From: Marc Ferland ferlandm@amotus.ca
Signed-off-by: Marc Ferland ferlandm@amotus.ca
drivers/i2c/mxc_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c index 7609594bd0..d486dab043 100644 --- a/drivers/i2c/mxc_i2c.c +++ b/drivers/i2c/mxc_i2c.c @@ -954,7 +954,7 @@ static int mxc_i2c_probe(struct udevice *bus) !dm_gpio_is_valid(&i2c_bus->scl_gpio) || ret || ret2) { dev_err(bus,
"i2c bus %d at %lu, fail to request scl/sda gpio\n",
"i2c bus %d at 0x%2lx, fail to request scl/sda gpio\n",
The change looks good.
I would suggest adding a commit message though.
Thanks

From: Marc Ferland ferlandm@amotus.ca
Use 0x%2lx to print the i2c bus base address in hexadecimal format instead of printing as an integer.
Signed-off-by: Marc Ferland ferlandm@amotus.ca --- Changes for v2: - Add commit message
drivers/i2c/mxc_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c index 7609594bd0..d486dab043 100644 --- a/drivers/i2c/mxc_i2c.c +++ b/drivers/i2c/mxc_i2c.c @@ -954,7 +954,7 @@ static int mxc_i2c_probe(struct udevice *bus) !dm_gpio_is_valid(&i2c_bus->scl_gpio) || ret || ret2) { dev_err(bus, - "i2c bus %d at %lu, fail to request scl/sda gpio\n", + "i2c bus %d at 0x%2lx, fail to request scl/sda gpio\n", bus->seq, i2c_bus->base); return -EINVAL; }

On Mon, Dec 21, 2020 at 5:19 PM ferlandm@amotus.ca wrote:
From: Marc Ferland ferlandm@amotus.ca
Use 0x%2lx to print the i2c bus base address in hexadecimal format instead of printing as an integer.
Signed-off-by: Marc Ferland ferlandm@amotus.ca
Changes for v2:
- Add commit message
Reviewed-by: Fabio Estevam festevam@gmail.com

From: Marc Ferland ferlandm@amotus.ca Use 0x%2lx to print the i2c bus base address in hexadecimal format instead of printing as an integer. Signed-off-by: Marc Ferland ferlandm@amotus.ca Reviewed-by: Fabio Estevam festevam@gmail.com
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic
participants (3)
-
Fabio Estevam
-
ferlandm@amotus.ca
-
sbabic@denx.de