On 02.05.22 16:18, Josua Mayer wrote:
IN the scope of do_tlv_eeprom, the error-checking provided by the

Nitpicking: "In ..."

read_eeprom function is not required.
Instead use the API function read_tlv_eeprom.

Signed-off-by: Josua Mayer <jo...@solid-run.com>

Reviewed-by: Stefan Roese <s...@denx.de>

Thanks,
Stefan

---
  cmd/tlv_eeprom.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cmd/tlv_eeprom.c b/cmd/tlv_eeprom.c
index bfd4882e0d..00c5b5f840 100644
--- a/cmd/tlv_eeprom.c
+++ b/cmd/tlv_eeprom.c
@@ -431,7 +431,7 @@ int do_tlv_eeprom(struct cmd_tbl *cmdtp, int flag, int 
argc, char *const argv[])
        // If no arguments, read the EERPOM and display its contents
        if (argc == 1) {
                if (has_been_read != current_dev) {
-                       if (read_eeprom(current_dev, eeprom) == 0)
+                       if (read_tlv_eeprom(eeprom, 0, TLV_INFO_MAX_LEN, 
current_dev) == 0)
                                has_been_read = current_dev;
                }
                show_eeprom(current_dev, eeprom);
@@ -445,7 +445,7 @@ int do_tlv_eeprom(struct cmd_tbl *cmdtp, int flag, int 
argc, char *const argv[])
        // Read the EEPROM contents
        if (cmd == 'r') {
                has_been_read = -1;
-               if (read_eeprom(current_dev, eeprom) == 0) {
+               if (read_tlv_eeprom(eeprom, 0, TLV_INFO_MAX_LEN, current_dev) 
== 0) {
                        printf("EEPROM data loaded from device to memory.\n");
                        has_been_read = current_dev;
                }

Viele Grüße,
Stefan Roese

--
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: s...@denx.de

Reply via email to