From patchwork Mon Oct 4 03:44:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 515141 Delivered-To: patch@linaro.org Received: by 2002:ac0:890a:0:0:0:0:0 with SMTP id 10csp1062471imy; Sun, 3 Oct 2021 20:47:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyDRB4+bycbwJP9rOmxo7jOZ3B4vdv0Nn0EurcgzKTMGfR4RT8F11+Bhs1aFADZvxV63JGc X-Received: by 2002:a05:6402:35cb:: with SMTP id z11mr6086454edc.252.1633319255575; Sun, 03 Oct 2021 20:47:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633319255; cv=none; d=google.com; s=arc-20160816; b=zGeL85xbv9vh1igfeoH60ttZ802ZTT8WkupLJ+N6Onzsxg9jzNa7pXolpLtwfH2rgs HUGVvfDkbKPKN4wnWaOaff4p9G4DjsRFDjoaKuN/mqqqPN9lG5bTSkXHP1TZlDQbNuIC XiWypDV72DVRaV4IabpPFhSoHFgfrq6j+hFm+0W0ptGTGf95hObSG0C9hQ2viGk/3jFW we/SYRWm8GIsZ6F3M4Fsj8g+JWfnDwYQhQiYnglugfDAtpZ4WIbyLNP2uiRDLtZ64WeE XdgaUrnUuabAwuoHbqNfs7Lq3o6zCMEWLAv0pAbQ8LL0X2CbWGCsqtfsY1GPfaKe2JZU XJqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Hiq0GPfOIkgEsC+7jlW39Y8NMVcrrhfZ+hZNCMT5yrc=; b=NBcjsNBd6sAO7YdoHzIA0MQWh10hyfjBhj47B2md3mXSvZvBdy7ex9icMrABE/hV7f AIDTv/oJFM6KoSpyz/lk+zUZMrz57wh60VlrcR86x+Udsjl7cysPNVe5aqWAGORXfSsO vs8+b5CsjR0L2JvAFDWBV/xsfPpdoTfO5JZFVG8HzaHxtlJYNkYFzBe3jIP6f8cI2jX6 y+/i6S7Lu4TMUhrOCVmKRVBiszPYS45xbiSVKXoQlS75x6o7gkpwh13dg7LXujrOAadF Oi5Sznkvqu7dib/WBvmHFLzWb1drESSjCwisCTYlpEbbJu0BPxvFBfuX76ePyHaTa/Vu 6Wvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="QD/wvH5B"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id i1si15664148ejo.756.2021.10.03.20.47.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Oct 2021 20:47:35 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="QD/wvH5B"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DE48E83581; Mon, 4 Oct 2021 05:46:29 +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="QD/wvH5B"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CE20D83577; Mon, 4 Oct 2021 05:46:16 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) (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 BE9308352E for ; Mon, 4 Oct 2021 05:46:03 +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=takahiro.akashi@linaro.org Received: by mail-pg1-x52d.google.com with SMTP id 133so15274771pgb.1 for ; Sun, 03 Oct 2021 20:46:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Hiq0GPfOIkgEsC+7jlW39Y8NMVcrrhfZ+hZNCMT5yrc=; b=QD/wvH5BfGqS+Y0F0+ArxNHAIFQu3SIoDN5ay8AZAp809s/f75pUPGXe6SRyR/FwZf jxx8euNbkF2WFv30Be0G4n41pxXPHXOcHFK58p4VIsst5c7ALqb6vzNrAtvfVYVeTGke YqcXxf8fq67CwwjZBgCWxxGCLok0+TGI6/2OQln2ywEXKtR5hGXtNhZ+PLhSmNUVlRPZ GkEREnMSuPnH43jsuo70mGlr7eidIz7vBF3IeuG7IdN6F8vCgHQpK1v6iMYZEXcQ2JXf IklVqorFLpd0odemsKvudsGry+sm1rMgnk+hiKeOSehS2ZErcEVx4LrNvio/7u+gwBiL +moA== 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=Hiq0GPfOIkgEsC+7jlW39Y8NMVcrrhfZ+hZNCMT5yrc=; b=xkEtrQSZobcaL+z7jyVSPmAEZVyaZXEsUhRyOHUoc9SHFHmbR/qHhbKbDr+MM/hIcv /sTRv8hO+HA+JrwtoFE0s69iK/DPXLSI5YtZ5767EGGDDcaUMbhOgyPAGRcuYyWSPzJy qZaZ8bLd4/ZsYb1QSNY3+BBcH/GCC6Ecwk2QH2y4l5Pt2PFS/8P2eS+1i0/QOdh0Q9Hg M/RQMKAVI23x97RmWMUu+gk38pEQk0CaMxl9oRUym+kzfwd9Y+JiW5ggQ1NObnDdhfl4 nkTzzQXBY5lvttWpdOuEftuPkzI1CMnmxtBsuFcExs4hLZpOPR0azJ6TZzzEEZve6Xyo Mn8Q== X-Gm-Message-State: AOAM53015k0piIdkO86w/BtbXt+QbV8hWUJMdBFltGkrt5U4X/+MGOZO SpyNSD6jmqOUdTo7hd9q3KxB5g== X-Received: by 2002:a63:7d05:: with SMTP id y5mr9046142pgc.80.1633319162010; Sun, 03 Oct 2021 20:46:02 -0700 (PDT) Received: from localhost.localdomain (61-205-96-147m5.grp4.mineo.jp. [61.205.96.147]) by smtp.gmail.com with ESMTPSA id a11sm11863515pgj.75.2021.10.03.20.45.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Oct 2021 20:46:01 -0700 (PDT) From: AKASHI Takahiro To: xypron.glpk@gmx.de, agraf@csgraf.de, sjg@chromium.org, ilias.apalodimas@linaro.org Cc: u-boot@lists.denx.de, AKASHI Takahiro Subject: [resent RFC 13/22] efi_loader: remove !CONFIG_BLK code from efi_disk Date: Mon, 4 Oct 2021 12:44:21 +0900 Message-Id: <20211004034430.41355-14-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211004034430.41355-1-takahiro.akashi@linaro.org> References: <20211004034430.41355-1-takahiro.akashi@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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 The change in this patch will probably have been covered by other guy's patch. Signed-off-by: AKASHI Takahiro --- lib/efi_loader/efi_disk.c | 49 --------------------------------------- 1 file changed, 49 deletions(-) -- 2.33.0 diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c index dfa6f898d586..cd5528046251 100644 --- a/lib/efi_loader/efi_disk.c +++ b/lib/efi_loader/efi_disk.c @@ -552,7 +552,6 @@ efi_status_t efi_disk_register(void) struct efi_disk_obj *disk; int disks = 0; efi_status_t ret; -#ifdef CONFIG_BLK struct udevice *dev; for (uclass_first_device_check(UCLASS_BLK, &dev); dev; @@ -580,54 +579,6 @@ efi_status_t efi_disk_register(void) &disk->header, desc, if_typename, desc->devnum, dev->name); } -#else - int i, if_type; - - /* Search for all available disk devices */ - for (if_type = 0; if_type < IF_TYPE_COUNT; if_type++) { - const struct blk_driver *cur_drvr; - const char *if_typename; - - cur_drvr = blk_driver_lookup_type(if_type); - if (!cur_drvr) - continue; - - if_typename = cur_drvr->if_typename; - log_info("Scanning disks on %s...\n", if_typename); - for (i = 0; i < 4; i++) { - struct blk_desc *desc; - char devname[32] = { 0 }; /* dp->str is u16[32] long */ - - desc = blk_get_devnum_by_type(if_type, i); - if (!desc) - continue; - if (desc->type == DEV_TYPE_UNKNOWN) - continue; - - snprintf(devname, sizeof(devname), "%s%d", - if_typename, i); - - /* Add block device for the full device */ - ret = efi_disk_add_dev(NULL, NULL, if_typename, desc, - i, NULL, 0, &disk); - if (ret == EFI_NOT_READY) { - log_notice("Disk %s not ready\n", devname); - continue; - } - if (ret) { - log_err("ERROR: failure to add disk device %s, r = %lu\n", - devname, ret & ~EFI_ERROR_MASK); - return ret; - } - disks++; - - /* Partitions show up as block devices in EFI */ - disks += efi_disk_create_partitions - (&disk->header, desc, - if_typename, i, devname); - } - } -#endif log_info("Found %d disks\n", disks); return EFI_SUCCESS;