From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 542B5C433EF for ; Mon, 2 May 2022 14:19:28 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 622DE83F3E; Mon, 2 May 2022 16:19:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=solid-run.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=solid-run-com.20210112.gappssmtp.com header.i=@solid-run-com.20210112.gappssmtp.com header.b="gf9aD7x3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 68BB483E2B; Mon, 2 May 2022 16:18:55 +0200 (CEST) Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8121783DCA for ; Mon, 2 May 2022 16:18:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=solid-run.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=josua@solid-run.com Received: by mail-wm1-x330.google.com with SMTP id n126-20020a1c2784000000b0038e8af3e788so8532396wmn.1 for ; Mon, 02 May 2022 07:18:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=solid-run-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=R+Xq6j8xj8SUJtOPYP8uJ3Z1GfGTgPXg+SElUTKb+iY=; b=gf9aD7x3pJ5x5UgquPHAOT30Bx8lCfyThoud/AbRZpadogxxBd6h1OXXr1sfudWOxi hrE+3vuqZ8jeDSd2Lo2xQxUFP9eqVR8mWPEnElqP7yzjT9UmkB0b+Sb/pMvayayWqOvt 5kxIPgAX6pxg1ejDe0DY0G9Vahu0HzT/UbkFOQwIoOwUtSKzVlxAJ1IlzX4Nseba7AI6 EGAyF36/6BDhj7eIkDjOXu45NpcHDSIyecW3qkPcwrLjscywGQBCcf/jthHvgiXP7SQ8 L2TCOHVEOsOj3oLzy4fY333H1CRh3FTu+sLbJ8POHXTpQb2jcUukxn7dz/NoOshDa5a5 PkOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=R+Xq6j8xj8SUJtOPYP8uJ3Z1GfGTgPXg+SElUTKb+iY=; b=1zBK2Uv5JAsvOqLmcqGkFm97yjr3PwYFbvdm5WIJ5E8jRDozsipLcTRa8e6q4SgJu7 NqFlzN8N4os8FOH0BgicbLYdLJxNHIEg2jr5cwVCeIPw1KRDk3sjhNryTJjjl4Me1Wz1 oaUxdKnQ3SjahbZ4UfdJ4xjXbQoN1fqDOc82SeCjTxNScjfsEb0mIvLladU2+4WWWBkT k/HiH8mIzmEG80RAQMCpDsd4fKnnscRaBXFKQBFYYYXLEhyYigI4pPLYxeuZsq05ji7A ppFXKmh0BE3DXIY34Be0wX7ax8MicZryy1PkVs9tdLzEY9t7PlXa/L57Mw+Oz6LZOBSw 8/GQ== X-Gm-Message-State: AOAM530DC6JTrgYB9+ZBeVrXwSWw371vPWwkzbo/jTwtewy/44ZK0Fnc WcveLYprGwrhLgxN7mbW//6Swpm0uwr+BA== X-Google-Smtp-Source: ABdhPJxtOAOHj3jJWQa0MjTn6Gl70obt1ec/SkgiKUlq7DYbaAihXruc+/KB/Ut4BxqDkEIWDXk5IA== X-Received: by 2002:a7b:c8d6:0:b0:394:25ff:2de with SMTP id f22-20020a7bc8d6000000b0039425ff02demr12202370wml.154.1651501128912; Mon, 02 May 2022 07:18:48 -0700 (PDT) Received: from josua-work.lan (bzq-82-81-222-124.cablep.bezeqint.net. [82.81.222.124]) by smtp.gmail.com with ESMTPSA id t1-20020adfba41000000b0020c6fa5a797sm940035wrg.91.2022.05.02.07.18.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 07:18:48 -0700 (PDT) From: Josua Mayer To: u-boot@lists.denx.de Cc: Josua Mayer , Simon Glass , Sven Auhagen , Stefan Roese Subject: [PATCH 03/12] cmd: tlv_eeprom: do_tlv_eeprom: stop using non-api read_eeprom function Date: Mon, 2 May 2022 17:18:29 +0300 Message-Id: <20220502141838.15912-4-josua@solid-run.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220502141838.15912-1-josua@solid-run.com> References: <20220502141838.15912-1-josua@solid-run.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean IN the scope of do_tlv_eeprom, the error-checking provided by the read_eeprom function is not required. Instead use the API function read_tlv_eeprom. Signed-off-by: Josua Mayer --- 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; } -- 2.34.1