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 B2705C00140 for ; Wed, 24 Aug 2022 14:19:33 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 109ED80586; Wed, 24 Aug 2022 16:19:32 +0200 (CEST) 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="iwKcH+cP"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 132B8805DA; Wed, 24 Aug 2022 16:19:31 +0200 (CEST) Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) (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 AF7E6804CF for ; Wed, 24 Aug 2022 16:19:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-ed1-x535.google.com with SMTP id r4so22244187edi.8 for ; Wed, 24 Aug 2022 07:19:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc; bh=wTb8pz0tpdPu+Yg3cbYcIm/hfZHLlfLinCr95B2IyWg=; b=iwKcH+cPq3p4nmERP7Gk2ne3pEIwSVru5StEfa3sLNKfdkNJ3zhvqy1GbrjvRqYTGz 0pas/Xcr8BkyEXk0I9FQztTANZ1HnrvWiwNzIJQOCrhkeT0hAHtAmud5TorFY2n/fkku 0LAeaXSdPIq02TE55pWU5GDmTLPOgY69+L+a5mSQg70jJsNGjUHFCPhk9aQLymyNEKLz cW59kvrDO96RaMbuuempoD7PIyU21cSMYzDAOD1vo34Il68UANGz/wsIZiGAAAWEjnFH 8Bm6q3s1pdFEPtHBFlfKb9BjehCo8w4xJFoHfNx4vK8F6P5ueuwpK+IRs1cNwJr19Df5 OHfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc; bh=wTb8pz0tpdPu+Yg3cbYcIm/hfZHLlfLinCr95B2IyWg=; b=tPyNrH3G3eHOhj+zztvDyy/eWTwSjX7Cm46XTbYNZOczLphldCr8GXXngx8c0r5lCc ewV+INlxdUjYLMM7nbhw5OnUAza0AYqCHc4rC+0onQ4w0VeLZaHuYRTITR8AkUZm8T/4 iE52I2vLTnv9t0A3W6axB9noZqSLZ2T47OR16bmo/rkfiF9niR2P/0PVgJ6N1u8Z4kVN WpqHyDtusCdol81jHjt63B+ISZvRavNDtrlSBoj7M4HU/SAhc7x0G399+G3x8TMO7K7W e1JhaDIGrOTC2D2cEJlkDoinqeqVfnHN+cNdpnYnhf+V9o7tzqGTICzg9oSlFQWELxbf gl3w== X-Gm-Message-State: ACgBeo3O2oQFl7dY2+CqClapBvKp2Ygu+eW6J1WFUL9UiXnC4OJm82vf Zf8ECZLV5/qnFaQmS6vdhGUAhA== X-Google-Smtp-Source: AA6agR7C2lTebaJj4EoDaMXYwLe2RP4R66FXFXnrYz+f/wiYEPaqYGRhBxDpmIKftpwVq8Bq2mzVFg== X-Received: by 2002:aa7:cc05:0:b0:447:8654:7fa9 with SMTP id q5-20020aa7cc05000000b0044786547fa9mr2176543edt.298.1661350768286; Wed, 24 Aug 2022 07:19:28 -0700 (PDT) Received: from hades ([46.103.15.185]) by smtp.gmail.com with ESMTPSA id a24-20020a170906369800b00730979f568fsm1197813ejc.150.2022.08.24.07.19.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Aug 2022 07:19:27 -0700 (PDT) Date: Wed, 24 Aug 2022 17:19:24 +0300 From: Ilias Apalodimas To: Masahisa Kojima Cc: u-boot@lists.denx.de, Heinrich Schuchardt , Simon Glass , Takahiro Akashi , Mark Kettenis , Michal Simek , Ovidiu Panait , Ashok Reddy Soma , John Keeping , Chris Morgan , Artem Lapkin , Huang Jianan Subject: Re: [PATCH v13 1/9] eficonfig: menu-driven addition of UEFI boot option Message-ID: References: <20220824063740.5760-1-masahisa.kojima@linaro.org> <20220824063740.5760-2-masahisa.kojima@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220824063740.5760-2-masahisa.kojima@linaro.org> 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.6 at phobos.denx.de X-Virus-Status: Clean Kojima-san, [...] > + > +/** > + * eficonfig_init() - do required initialization for eficonfig command > + * > + * Return: status code > + */ > +static efi_status_t eficonfig_init(void) > +{ > + efi_status_t ret; You need to initialize ret here to something. > + static bool init; > + struct efi_handler *handler; > + > + if (!init) { > + ret = efi_search_protocol(efi_root, &efi_guid_text_input_protocol, &handler); > + if (ret != EFI_SUCCESS) > + return ret; > + > + ret = efi_protocol_open(handler, (void **)&cin, efi_root, NULL, > + EFI_OPEN_PROTOCOL_GET_PROTOCOL); > + if (ret != EFI_SUCCESS) > + return ret; > + } Because this code might never run > + > + init = true; > + > + return ret; > +} > + > +static const struct eficonfig_item maintenance_menu_items[] = { [...] Regards /Ilias