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 D483BC433F5 for ; Mon, 17 Jan 2022 00:45:37 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A1EFD81E3E; Mon, 17 Jan 2022 01:45:34 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="m0iFBC4d"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E379882A71; Mon, 17 Jan 2022 01:45:32 +0100 (CET) Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) (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 5109981DCC for ; Mon, 17 Jan 2022 01:45:29 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pl1-x62d.google.com with SMTP id e8so5669462plh.8 for ; Sun, 16 Jan 2022 16:45:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=cf4jV0OmMwxto17cS4trBL4iWG0wEdIY7zz6Ng80tiM=; b=m0iFBC4dp/zH2f0RkyY3Jsum0IPhtmELz8ukw33+zBmnBAQ9z4BQSf8l01ui61NEVS 9lOAP3pW82UIY4E8EGUbw8VC5p4zMOMjIFL++HDav0QEAt+ELXv0NU6TSHf68/fe2CGm mbjgh3rjW1bFJIkokkUI6TllJUb4hnytlZwBdLZXFhzeTeyN6NbV8DkeRZLTaKIiudlp ioCNJ7EZi7s/ndGElVHQ/kX50m1kJ4CGPJ0uZIldd/6OdgG1aybJBRIUW3Ods0Mt+74F eRoQ1ulFSNtaXaiUQIlSjCC2YhwtzWf9BneAOFDiZsYMZWQxIBSExWwZWZQWoe+1BmNV 4qeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=cf4jV0OmMwxto17cS4trBL4iWG0wEdIY7zz6Ng80tiM=; b=tFo95E5WUJqevXWzfhmkNIuoEulN+4Ybt9K0Z+Q7XWnxi5JPnBu5tR0+oalewZK8YA 0vDZfpxbKU7/xfKbB98QAjWSEdLW9Spk/rw2aZS9XOiIsK7oOFtbsNyUbHxIQg1w8CG/ CL0gYzYmTbne8oQWtwuyqTKn2oEKY1pdZI1NAc7MprSYh/5Tg77QyFYahio4Av0KiyZH szYIpB5FOgNgj0D4rSdZpLa2LYIPLKaIljYK/ApX0CcY47xj3gwh5vM0ATWYfhadSyo1 OjxvvZePxBGVyBQsM0mufAgg5y5c3dijk1Xj/jliy2BH4i3ov8u0Xs2vKzmXzv4WJ/Fh rXYg== X-Gm-Message-State: AOAM533V8TmjdGJ1Y6qteoPSoXlQEU5KsxteVeQL0X0Zz+Am/l/XUmaV OtVXGgDJKOWojBXUjWbBSFdgqg== X-Google-Smtp-Source: ABdhPJxnLnmxYQ/deozjPDZVlQU6jdeCedyaePvucGziPwlaatAtzvdSrRoICn2HunjR4CkCuiCHsg== X-Received: by 2002:a17:90b:38c1:: with SMTP id nn1mr7911916pjb.224.1642380327482; Sun, 16 Jan 2022 16:45:27 -0800 (PST) Received: from laputa ([2400:4050:c3e1:100:d862:4b52:199a:dd27]) by smtp.gmail.com with ESMTPSA id c24sm9750999pgm.67.2022.01.16.16.45.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Jan 2022 16:45:26 -0800 (PST) Date: Mon, 17 Jan 2022 09:45:23 +0900 From: AKASHI Takahiro To: Heinrich Schuchardt Cc: u-boot@lists.denx.de, Alexander Graf Subject: Re: [PATCH] efidebug: avoid 'dfu_alt_info not defined' message Message-ID: <20220117004523.GA7045@laputa> Mail-Followup-To: AKASHI Takahiro , Heinrich Schuchardt , u-boot@lists.denx.de, Alexander Graf References: <20220115011821.87588-1-heinrich.schuchardt@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220115011821.87588-1-heinrich.schuchardt@canonical.com> 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.2 at phobos.denx.de X-Virus-Status: Clean On Sat, Jan 15, 2022 at 02:18:21AM +0100, Heinrich Schuchardt wrote: > If variable dfu_alt_info is not defined duplicate messages are displayed. > > => efidebug boot dump > Scanning disk mmc2.blk... > Scanning disk mmc1.blk... > Scanning disk mmc0.blk... > Found 3 disks > No EFI system partition > "dfu_alt_info" env variable not defined! > Probably dfu_alt_info not defined > "dfu_alt_info" env variable not defined! > Probably dfu_alt_info not defined > > Remove the 'Probably dfu_alt_info not defined' message. > Instead write a warning if the variable contains no entities. > > Signed-off-by: Heinrich Schuchardt > --- > lib/efi_loader/efi_firmware.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/lib/efi_loader/efi_firmware.c b/lib/efi_loader/efi_firmware.c > index a1b88dbfc2..519a47267c 100644 > --- a/lib/efi_loader/efi_firmware.c > +++ b/lib/efi_loader/efi_firmware.c > @@ -128,8 +128,11 @@ static efi_status_t efi_get_dfu_info( > size_t names_len, total_size; > int dfu_num, i; > u16 *name, *next; > + int ret; > > - dfu_init_env_entities(NULL, NULL); > + ret = dfu_init_env_entities(NULL, NULL); > + if (ret) > + return EFI_SUCCESS; Do you want to return EFI_SUCCESS here? It is mandatory that "dfu_alt_info" be defined so that the current FMP drivers should work. So if the variable is not defined, I think, efi_firmware_[fit|raw]_get_image_info() should fail. Even if it returns EFI_SUCCESS, descriptor_count should be set to zero. -Takahiro Akashi > names_len = 0; > dfu_num = 0; > @@ -138,7 +141,7 @@ static efi_status_t efi_get_dfu_info( > dfu_num++; > } > if (!dfu_num) { > - log_warning("Probably dfu_alt_info not defined\n"); > + log_warning("No entities in dfu_alt_info\n"); > *image_info_size = 0; > dfu_free_entities(); > > -- > 2.33.1 >