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 B4629C433F5 for ; Tue, 3 May 2022 06:12:42 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4840483D91; Tue, 3 May 2022 08:12:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1651558360; bh=pBEAuefLQflTGkB3w9OVYmsvWaq0ZmBkTk36q2E+MNU=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=uJ3ET7nYAx3TrGjBImPUGuq6XGOWWTkdAf/mOdME1xU9X2tJEwDge+0SwtqkAMy2D MMuOVaY5bvFQhPsKubckJK95wZ9Bp99D4y9fKdknHYUXdDfukGHfbiHWlcUnV+RWLT HK0JqkAsOOVVAy1ldNMIvQhIofPePWp02lRTMtTDu21khiJs4Qj1ubPvWws05V+LTU OKNksmeoAIrSWqVIG6VQMr3iSLC5JJkP/K+mbi/yrTvt4je+VkWeHV7x7n4rs5BfJa dlQUsoq01Ovl0GJa1siv8b8WpjkgVtemKTRk6fOU+o4dLaK9g8sHS13TUHpt/T5sO/ gLW3MFcmffAKw== Received: by phobos.denx.de (Postfix, from userid 109) id 0DE9F83D91; Tue, 3 May 2022 08:12:39 +0200 (CEST) Received: from mout-u-204.mailbox.org (mout-u-204.mailbox.org [91.198.250.253]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3CCF883A1E for ; Tue, 3 May 2022 08:12:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sr@denx.de Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-204.mailbox.org (Postfix) with ESMTPS id 4KsqPb5wGCz9sWr; Tue, 3 May 2022 08:12:35 +0200 (CEST) Message-ID: <87e33e59-8a0d-224c-e733-106096308bdd@denx.de> Date: Tue, 3 May 2022 08:12:31 +0200 MIME-Version: 1.0 Subject: Re: [PATCH 03/12] cmd: tlv_eeprom: do_tlv_eeprom: stop using non-api read_eeprom function Content-Language: en-US To: Josua Mayer , u-boot@lists.denx.de Cc: Simon Glass , Sven Auhagen References: <20220502141838.15912-1-josua@solid-run.com> <20220502141838.15912-4-josua@solid-run.com> From: Stefan Roese In-Reply-To: <20220502141838.15912-4-josua@solid-run.com> Content-Type: text/plain; charset=UTF-8; format=flowed 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 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 Reviewed-by: Stefan Roese 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: sr@denx.de