From patchwork Fri Oct 1 05:02:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 515003 Delivered-To: patch@linaro.org Received: by 2002:a02:606e:0:0:0:0:0 with SMTP id d46csp453474jaf; Thu, 30 Sep 2021 22:07:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyo/vlIr+iMvWS+IKIgNwXVwjD7IXDpOhBf8ZJ7NVHCceuA9+lQ2cKCXK8fHZn5d6C6F0gw X-Received: by 2002:a17:906:3054:: with SMTP id d20mr3878136ejd.294.1633064878181; Thu, 30 Sep 2021 22:07:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633064878; cv=none; d=google.com; s=arc-20160816; b=lCTapSNCuHfEQvGiJWQloHUZT3f3/Mp+1gBgO6RqZ8No93udMQAeoMQXJGhkALAqTW K8I1H/KzOdxE288LiEAnKGP15/vFYEzBw9g4+GBJOMh5q8iCvBVmKFH228ya0YA9Z/3W bnEF3toe+O5GAR8TBpTarwpTMnx79liREFUOnp/IaSCAhpF/9NYYlHTou7Bn7g2gS9E1 hjDzePjSja5XvSMTZ4C+pN1ag47nIkM18mqf5R0h84zVUImzXMxdK4utzkS1EU0/c1ii pg/dzjdyMXoHd1HwzlfqdqDZy9p6+f42K3iPkJERP3jlhvrozS7vvwwm19aAdPCZhgNO 08Wg== 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=tHXXNjsNg2SKqnnv7yI1LOMiAdZG0e5haaTuMxKmHUBBeLvgO7duMYJYSpxIJri1MD FbRXn9e0Z5NaxUUE2XP03nCURDPTlynHps96mSr82kVzBGBIKBnDqjjPdjd6wWPKSJeK GtCRWK9+cBzvKSbQYF3yH3hMHwkyK2ihU/ENK6NcdtNqbOUKZbwXTyqWZmhtb7KrT3Dx K9oNZsbSFxOnwWWs0H3XN62OZO+3wyTb82sDbkIWBIxPYoUxKk+hSIKjvgvw7mxjPm37 Bj+iSY8L4JXmAl5FpX/fZuOuSaBMqkONDGeJOFaYdWRkjBKfCjtJ3pwjuWWJFW213ZYX f28Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="vYrvJoo/"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id f4si6092155ejl.218.2021.09.30.22.07.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Sep 2021 22:07:58 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="vYrvJoo/"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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 A8B798343C; Fri, 1 Oct 2021 07:04:51 +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="vYrvJoo/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 279BE8331D; Fri, 1 Oct 2021 07:04:30 +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-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) (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 3EA6483305 for ; Fri, 1 Oct 2021 07:04:19 +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-x530.google.com with SMTP id m21so8305410pgu.13 for ; Thu, 30 Sep 2021 22:04:19 -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=vYrvJoo/70zdriLJ2g3Q0M0L73dZLVnhhbnZyZBGP3EfrTOk6bwqx6qywkE3r7rxEo UQ5Qb279GZ4NxuubOP6iLBOtskw1S4nAAmCnlxPubob1fj+gjm7RMqTWrGacr6icP9AK KCknXUqdZVaWpXN1D1aiJLHRF0xzLl+RKxixnmOfpQHcQVtt86bYZWE7rBcEMmc17Abr IMp45hypy9/ohs6iT13iQVl3CwgLIKYXKGUPebNL3Yh1x7KNTJIw9XMcU9PJYYCeLx5h Vko6tswAKDmOUGYSC286Jnycc1YOqjGb08tqXjacEkFSIwEG+Kpz4jOtGdhjAUrmwuP0 1xiw== 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=5WvV5q8bwBoN5bi/KQexuG5y+TpNI9Cso9W/YIxHRzs4LLOsDIU+xCgAvuPbMQPsHA LBV6vO8mamwH+SewJ2V6eHvBwD9vBfcjHWwskVfUAmv+ubfwgFAtG2ujVfQQh6iFCM3Q Uwf1vMKx6I7m5jnlTltKz306YN1l47EcJ4qU4S0jq9fWdORIM21bURoikXrcAgR4L4fO pDjtkHc9KfUXgBB+QIDnAIow5FAwV2Ie5DW66rn3Eb1t8PcRXgt9bTKofVOBzfozzCPJ rN/mImK/2Po7AL5U240qZWK1l5gKdDfVV9I8HaBfXtV2pIVIgGZRCReZ/dP9NJSNSNVG ylHQ== X-Gm-Message-State: AOAM530irZbBSNVHBN309+gyzAT2UFjbMKxfMlXMp/A9DO59yXkyj17O VDy/PwIwJfrpY4XBz45up+8bqw== X-Received: by 2002:a65:62d1:: with SMTP id m17mr8129010pgv.370.1633064657477; Thu, 30 Sep 2021 22:04:17 -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.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Sep 2021 22:04:17 -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 13/22] efi_loader: remove !CONFIG_BLK code from efi_disk Date: Fri, 1 Oct 2021 14:02:10 +0900 Message-Id: <20211001050228.55183-27-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 Reviewed-by: Simon Glass 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;