Skip to contentSkip to conversation

cmd/eeprom.c: prepend 0x to hex numbers in output message format

PATCH New Rasmus Villemoes 4 participants 4 messages Dec 11, 2019 – Jan 10, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cmd/eeprom.c: prepend 0x to hex numbers in output message format

From: "Klaus H. Sorensen" <[email protected]>

If the numbers do not happen to contain any digits from [a-f], it's not clear that they are base 16.

---
 cmd/eeprom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
cmd/eeprom.c +1 -1
index 19953df082..23d9a21ab6 100644
@@ -307,7 +307,7 @@ static int eeprom_execute_command(enum eeprom_action action, int i2c_bus,
 {
 	int rcode = 0;
 	const char *const fmt =
-		"\nEEPROM @0x%lX %s: addr %08lx  off %04lx  count %ld ... ";
+		"\nEEPROM @0x%lX %s: addr 0x%08lx  off 0x%04lx  count %ld ... ";
 #ifdef CONFIG_CMD_EEPROM_LAYOUT
 	struct eeprom_layout layout;
 #endif
Signature · 1 line
2.23.0
#1 lore raw

PATCH 1/1 cmd/eeprom.c: prepend 0x to hex numbers in output message format

Quoted 22 lines · On Wed, 11 Dec 2019 11:18:29 +0000 Rasmus Villemoes…

From: "Klaus H. Sorensen" <[email protected]>

If the numbers do not happen to contain any digits from [a-f], it's not clear that they are base 16.

---
 cmd/eeprom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
cmd/eeprom.c +1 -1
index 19953df082..23d9a21ab6 100644
@@ -307,7 +307,7 @@ static int eeprom_execute_command(enum
 eeprom_action action, int i2c_bus, {
 	int rcode = 0;
 	const char *const fmt =
-		"\nEEPROM @0x%lX %s: addr %08lx  off %04lx  count
 %ld ... ";
+		"\nEEPROM @0x%lX %s: addr 0x%08lx  off 0x%04lx
Quoted 3 lines

count %ld ... "; #ifdef CONFIG_CMD_EEPROM_LAYOUT
struct eeprom_layout layout;
#endif

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20191211/a4bdfe03/attachment.sig>

#2 lore raw

PATCH 1/1 cmd/eeprom.c: prepend 0x to hex numbers in output message format

In reply to Rasmus Villemoes

Hello Rasmus,

Am 11.12.2019 um 12:18 schrieb Rasmus Villemoes:

Quoted 10 lines

From: "Klaus H. Sorensen" <[email protected]>

If the numbers do not happen to contain any digits from [a-f], it's not clear that they are base 16.

---
  cmd/eeprom.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks!

bye,
Heiko

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de
#3 lore raw

PATCH 1/1 cmd/eeprom.c: prepend 0x to hex numbers in output message format

In reply to Rasmus Villemoes
Quoted 9 lines · Rasmus Villemoes

From: "Klaus H. Sorensen" <[email protected]>

If the numbers do not happen to contain any digits from [a-f], it's not clear that they are base 16.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200110/90213712/attachment.sig>