From patchwork Fri Oct 1 05:02:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 515001 Delivered-To: patch@linaro.org Received: by 2002:a02:606e:0:0:0:0:0 with SMTP id d46csp453289jaf; Thu, 30 Sep 2021 22:07:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJknI1N9iBhghmIXxtby7O3bAbGkBvGBwmUx+Ew2jD8cU9+uz/4H48As9SuSH0x6noX1NY X-Received: by 2002:a17:906:b098:: with SMTP id x24mr4092299ejy.88.1633064858999; Thu, 30 Sep 2021 22:07:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633064858; cv=none; d=google.com; s=arc-20160816; b=FgyPhbWAgZ4zmeEH0bwPfJawxQ8MCF10jPS4OE/e61+Ss+XQ4R01wUn6EEG1uCUnlO 5ldL8HBtPzBDRBx+eLKNohLkppTzzxReZzGptDvDqvxQW828hRjNc7+wdEpTCgrN6e0X oBviFqxJWWBK39mh+6+GcvYI8sYYgN8/cAPD72P4SvUqC/AN4M5PnCKQ+RbrLdGvnVXx GH16d7JY3AKVmS2uLPp8iT7S+fDnqMTRZJjiGnW1XEHmRtsZuPgcK51abtiWxeKC00Dm wX/cNml/G2xpk3ykq8OLG+mDp3saeAglwPRcPwiIuhWEfpS80y3OehFr0q72959F6z2s DSug== 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=ALd1Bo/oezH6n9wtDr5hC1G32WDLZSTvunO0qTGJ23wuLXJWVeJDJSmqwLbGw1r6WB EaWKip6LM/Z0Mnh6DLuNKrYNDrHhHezDES7cvCE83Q+YuyxLSNO6zzfxshv0+jfOEHbN Xk6n985DLMg7Q/6CnCRO/Td9WkVHGrCCx+CCi+HR/qbzz8CbxSO65AwzRlpXCa0K0BY0 ljkhBffRYBkekAx8OsHot2rVn2xRdQjaoNieymywBzSjv+tIVGgSWgOgY8QRs2V/PXX0 XvwrCtd1dcQbjnBAP0buxnp8kogPUaForp/glUo2cfw9uw2g5WZyswMpSjrlUYImzcrv P26Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uK706xGZ; 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 kl17si5954040ejc.507.2021.09.30.22.07.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Sep 2021 22:07:38 -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=uK706xGZ; 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 9378F83426; Fri, 1 Oct 2021 07:04:42 +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="uK706xGZ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6791C832C7; Fri, 1 Oct 2021 07:04:22 +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-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) (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 83A7783328 for ; Fri, 1 Oct 2021 07:04:11 +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-pl1-x633.google.com with SMTP id t11so5526432plq.11 for ; Thu, 30 Sep 2021 22:04:11 -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=uK706xGZ/ocHsVYlQ+r1ICRmaNF3JsjWjkpHysFjOgiLi6DviiJjkK/INHpA6l7418 T9poLEZ5xD7/96iSu/PuWJKEN1RNfsltYaN9FGtYZgmA0B3wtyH4qIZZLVkoUXT5jHZ0 Vqv+tGT7II6Ulx08d/YgsYD1l5FVd6ZZZ2ihTBeOhzBnFoZI8ary7pAbzcNx+TzSOUuA ZG9hVHZopv1ZtoZNuuENR/KHsunCvi2r7HFYVKlmaZbnSaoe7sHipWerzf6GDoUQaJgL UIqvmmzD3KUYsFchsDQtF0Z46eqE1Wh9/D5ja+mkTHmSvKw39gtLwYYDb6fKi7oB0mZB qevA== 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=zAYHAmHkoXEJLYuYUNyoMSWHa53Y2MNAx0dTRAXWuzqZ5EBzNg4BejMIqNYxM+icwJ 6R7J5yG7QGf8/Y2jgdLGcCVxP8FHNKucUst4JRpk6bntk5UDHrO4D96i8EB7pUONMNfU th8VU+FLUhTz2/QFKd7Lktd16XMClk1D/kitujfa5+ypy9amrtfAoKvXo4X6UDRxBWLQ qgGFOHtvdsXOm+hBnt7Npab2GaT6GYkuj3bIdagxuSQSpiI8Q/vpF+LwLXxK0Q9W4MGy X/r0wyGvQem6EVuHL+3ti6p+ESTfRFsezhDwuQieSc9j0KkKnbprFUtM9XU6Oh3iWPBn +1jA== X-Gm-Message-State: AOAM530JMJYNJ6C5zP/KRBOPF8AQgXg81ySgaZTxL6WtTw632weQ/UTt SDD8IR8XdHdfo7C2lRWWO970ww== X-Received: by 2002:a17:90a:1b2a:: with SMTP id q39mr10874630pjq.219.1633064649496; Thu, 30 Sep 2021 22:04:09 -0700 (PDT) Received: from localhost.localdomain (122-100-26-52m5.mineo.jp. [122.100.26.52]) by smtp.gmail.com with ESMTPSA id z8sm4615113pgc.53.2021.09.30.22.04.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Sep 2021 22:04:09 -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: [RFC 12/22] efi_loader: remove !CONFIG_BLK code from efi_disk Date: Fri, 1 Oct 2021 14:02:08 +0900 Message-Id: <20211001050228.55183-25-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211001050228.55183-1-takahiro.akashi@linaro.org> References: <20211001050228.55183-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;