From patchwork Fri Aug 19 00:48:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 598468 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:4388:0:0:0:0 with SMTP id w8csp989983mae; Thu, 18 Aug 2022 17:49:06 -0700 (PDT) X-Google-Smtp-Source: AA6agR41+6fVXKwhE757/5T8ir4JyYkIKqxsJIPqohhcc/dp7KqSDfmZs4MhT/2zuiMl3t43O7lc X-Received: by 2002:ac2:4c41:0:b0:48b:3b16:1bd7 with SMTP id o1-20020ac24c41000000b0048b3b161bd7mr1561607lfk.562.1660870146361; Thu, 18 Aug 2022 17:49:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660870146; cv=none; d=google.com; s=arc-20160816; b=VB+T/h5tyvLxY4xP21p/rKZPQWEsMs8XKLr5pr9FKuH5L/Mwi47YfUNoVk9idsrk3X cHUVWoQdhsoWoJsPDtCY+SLETr+zyvYKClcJvQfOHvriRpSQGcq+SHtUvxfLn7DdQ67e VdiXqXknah5SDTgCrkjJWDwwaU4+i93lpl4D0UbJux2tGuGy3cYIwonPEGXcoz1RKhD+ fPJF5u04cSSzhSqslbsU/ogXwnawFA2T7xBT0b8kUnbHxUPqxg4IpHmdOePKZ4WhLUwc GxKTQtzr3C3n5FuxmY9D/HIyHy7YNY3N+aimeeUaXXtWGJyBVKFfWXPk8bi84NTtyyqX vf1g== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=9tA1c3xR3avSOHqwn6AIwGnhm1zsfYq9477119Y9bgo=; b=RfZ48UmaQ1xV1XYl5OfhV8hJCI1sRxU+8dWkntFb7C0Eg7cs8ovmniaPq6O/GST3P8 UGtHS6ZeQByLtARUp6QnK2PT9GNzzxnWSygoSbVDFgEOiSkSxugWdm1tiD79uqooauyF mH/2EiNq4Er7ujxV42Te7/DcpnBoZJfarhu9D8qRCrHbMet/TXV2Czq0D2Ku3/CKla5E sP2IH9xINsoCn6xgN5jhm3AmZKyyFDklVKtLRqK6bbfVYIQz/Jckhovv08Wim3dZombS 12HX20HK+GcouD1x1imjB7LksY98WqErPtR1Gh/AVvCHcNUHQon67X9ZrtyeGqlr4Xdm +BhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nWrKdCgQ; 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 y9-20020a05651c154900b0025e0c741607si1330715ljp.402.2022.08.18.17.49.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Aug 2022 17:49:06 -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=nWrKdCgQ; 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 8AA0D84834; Fri, 19 Aug 2022 02:49:01 +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="nWrKdCgQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 08E8184866; Fri, 19 Aug 2022 02:49:00 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) (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 7BD5A8456E for ; Fri, 19 Aug 2022 02:48:56 +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-x636.google.com with SMTP id x23so2862237pll.7 for ; Thu, 18 Aug 2022 17:48:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=9tA1c3xR3avSOHqwn6AIwGnhm1zsfYq9477119Y9bgo=; b=nWrKdCgQtz5qJSjGvPkbsj7qWy4cBKZ5bowp33c8CcXiFikf98SJEr5Y2tjAwQewIr HUxTApGeK1YP1PObDUmBl8x7bZK7xXYbY0rPbbdtzZYi/t/9HaD6VLO93NvJtzMBkfzs c7WPOJrHl1Wh3/hP3QjN68l7cETvoFkEQPQzrqHGMv1XshQhmctWh0Swf9d3OtsxeoQC +/0za6GT2mcSlJQlvu/p8eK6CHz1q68pPKFj7arO+DQJtDqSqymqVlmIk8prKXbizUJG +dQQDn51xlCUv2jaxgqIqGWpBYPPXlazTJM4Foa8w5DY0atcDMPXp1yiTv8qWiLLtsN5 KVfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc; bh=9tA1c3xR3avSOHqwn6AIwGnhm1zsfYq9477119Y9bgo=; b=qLuv8b1xgfFK7bzN9Hf47Eat4Ts7EhaRzZrBrWnjJaKEzaW2EZyT8TpsVRKCYx/79u dq9+nEMSpa4mnT+9+wrDRUQoR37VMfT20kVS6cgfj7JnPOTu1TThsdXuBQVCpGxyKo8K seUPnrutO+4rloQJlX/xifly88bePjTjBaCA6qgffDkT670c2DPbXTzLCmEwX1MEIRsu 4eWlobvR+HETT8FUv0cw2Ss/0riNgexXYx7WkyfrV7121NmnFVOE4HIdBKNDBMIf+83a jURqLQg0Zs2lIrVJiN44BLxS/cW4xOZtR2YKKWGJQwSQS3bRVRiavIayfLppz5vMq3/T UboQ== X-Gm-Message-State: ACgBeo2xO1MyA0oaHcc+i2tubHk60D/492B7gI/FIk2rmscI+mikt+Xb 5EPGqmxVvkr5ORuSOldX9+9ekQ== X-Received: by 2002:a17:90b:1494:b0:1fa:c348:d7a1 with SMTP id js20-20020a17090b149400b001fac348d7a1mr5472157pjb.181.1660870134486; Thu, 18 Aug 2022 17:48:54 -0700 (PDT) Received: from localhost.localdomain ([2400:4050:c3e1:100:d8f6:519f:2123:6238]) by smtp.gmail.com with ESMTPSA id x3-20020a626303000000b0052dd7d0ad02sm2183384pfb.162.2022.08.18.17.48.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Aug 2022 17:48:53 -0700 (PDT) From: AKASHI Takahiro To: xypron.glpk@gmx.de, ilias.apalodimas@linaro.org Cc: sjg@chromium.org, u-boot@lists.denx.de, AKASHI Takahiro Subject: [PATCH] efi_loader: disk: remove unused field Date: Fri, 19 Aug 2022 09:48:30 +0900 Message-Id: <20220819004830.39710-1-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 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 The field, ifname, in efi_disk_obj is set but never used anywhere. Just remove it. Signed-off-by: AKASHI Takahiro Reviewed-by: Heinrich Schuchardt --- lib/efi_loader/efi_disk.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c index 1d700b2a6be3..7d9e973e5672 100644 --- a/lib/efi_loader/efi_disk.c +++ b/lib/efi_loader/efi_disk.c @@ -29,7 +29,6 @@ const efi_guid_t efi_system_partition_guid = PARTITION_SYSTEM_GUID; * * @header: EFI object header * @ops: EFI disk I/O protocol interface - * @ifname: interface name for block device * @dev_index: device index of block device * @media: block I/O media information * @dp: device path to the block device @@ -40,7 +39,6 @@ const efi_guid_t efi_system_partition_guid = PARTITION_SYSTEM_GUID; struct efi_disk_obj { struct efi_object header; struct efi_block_io ops; - const char *ifname; int dev_index; struct efi_block_io_media media; struct efi_device_path *dp; @@ -380,7 +378,6 @@ static int efi_fs_exists(struct blk_desc *desc, int part) * * @parent: parent handle * @dp_parent: parent device path - * @if_typename: interface name for block device * @desc: internal block device * @dev_index: device index for block device * @part_info: partition info @@ -391,7 +388,6 @@ static int efi_fs_exists(struct blk_desc *desc, int part) static efi_status_t efi_disk_add_dev( efi_handle_t parent, struct efi_device_path *dp_parent, - const char *if_typename, struct blk_desc *desc, int dev_index, struct disk_partition *part_info, @@ -476,7 +472,6 @@ static efi_status_t efi_disk_add_dev( return ret; } diskobj->ops = block_io_disk_template; - diskobj->ifname = if_typename; diskobj->dev_index = dev_index; /* Fill in EFI IO Media info (for read/write callbacks) */ @@ -534,15 +529,13 @@ static int efi_disk_create_raw(struct udevice *dev) { struct efi_disk_obj *disk; struct blk_desc *desc; - const char *if_typename; int diskid; efi_status_t ret; desc = dev_get_uclass_plat(dev); - if_typename = blk_get_if_type_name(desc->if_type); diskid = desc->devnum; - ret = efi_disk_add_dev(NULL, NULL, if_typename, desc, + ret = efi_disk_add_dev(NULL, NULL, desc, diskid, NULL, 0, &disk); if (ret != EFI_SUCCESS) { if (ret == EFI_NOT_READY) @@ -577,7 +570,6 @@ static int efi_disk_create_part(struct udevice *dev) { efi_handle_t parent; struct blk_desc *desc; - const char *if_typename; struct disk_part *part_data; struct disk_partition *info; unsigned int part; @@ -591,7 +583,6 @@ static int efi_disk_create_part(struct udevice *dev) return -1; desc = dev_get_uclass_plat(dev_get_parent(dev)); - if_typename = blk_get_if_type_name(desc->if_type); diskid = desc->devnum; part_data = dev_get_uclass_plat(dev); @@ -603,7 +594,7 @@ static int efi_disk_create_part(struct udevice *dev) return -1; dp_parent = (struct efi_device_path *)handler->protocol_interface; - ret = efi_disk_add_dev(parent, dp_parent, if_typename, desc, diskid, + ret = efi_disk_add_dev(parent, dp_parent, desc, diskid, info, part, &disk); if (ret != EFI_SUCCESS) { log_err("Adding partition for %s failed\n", dev->name);