From patchwork Mon Dec 25 04:43:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 758215 Delivered-To: patch@linaro.org Received: by 2002:a5d:67c6:0:b0:336:6142:bf13 with SMTP id n6csp2527630wrw; Sun, 24 Dec 2023 20:45:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IGhneQwjeERK/DgMkabPWrUkNa7IC18R2lPFVcI14RESY5KqoETAxCX4bK9TIQcvMbg3SPk X-Received: by 2002:a05:600c:2201:b0:40c:2d7e:6f72 with SMTP id z1-20020a05600c220100b0040c2d7e6f72mr2725879wml.118.1703479556704; Sun, 24 Dec 2023 20:45:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703479556; cv=none; d=google.com; s=arc-20160816; b=nw0FBUqDQBy6exNt6huFDABEa3eORh9qFkF2tRW9JmOkgSpsXuHkLAEccIyaZ0+DRZ 6RFuOJ4ZYK9jt0OLnifbBeX7Cw8RXRBMnyC+HZSj+nZaZ5SxzJkrzCTEkF6iizOpEdR8 KaERj5udUFLPRbEi2CtbH2uAKLEi3pLy8xFayvrZTsGAwUl8Ds5JWoiMSxHVeSaQ4FJB Vq4rdDiOI5hK2EuwqVOOah7VPTbpHn/RCCNJSkniCiEvek9+26GcztLIhzNo37uN+Jas vi64HszYOLl5bkbO9+XPPe1mCU66k1QludlQrv+qkiqBv1dNvLAadgB1qHdS5x0Yx9VN Iovw== 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=OOtwZXIJ0EGfMVXsfrD6wt75lYzzN7mvK9tS/JxaOqY=; fh=XwOfspvhog7otCudZV1ecvxibH3YToEgjgP70JntENo=; b=HEM3ilTGQAEsATGQ14cTqdftC9AYeM5FedVz8/SU0VCKOpjZrTAVuYeeFd91lpR0to BSe6bkAGc2vPxqXmXVFH21GFp2A5tabX3x0Zv2SDM2SHzINBh413UsU4T7Y71QmQS0oR /EIKko6lGvDjSg313XQyGKTG6N3syHcUZVdiAJqUk8LLaLNcNNdn8INSnID3iWLk8+bK 2m381cmbr31Wj1nLkY2YYS9XuH6+o8mnJ8NjLsMrEkVhssVBS2jE34YVSzMPK2NAjAkz Q70av6r+mMTYQgBfL8p+vZHHHBNPqnmbjPyur4wWUIEtsEEKqsvxrIrWgFvAuWu2YSMz L5fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bgaXePCa; 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 x24-20020a05600c179800b0040c23709c55si6885183wmo.39.2023.12.24.20.45.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Dec 2023 20:45:56 -0800 (PST) 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=bgaXePCa; 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 44390877DA; Mon, 25 Dec 2023 05:45:48 +0100 (CET) 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="bgaXePCa"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 191E3877FC; Mon, 25 Dec 2023 05:45:47 +0100 (CET) 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-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) (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 DC01A877DA for ; Mon, 25 Dec 2023 05:45:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=masahisa.kojima@linaro.org Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1d408d0bb87so24809495ad.0 for ; Sun, 24 Dec 2023 20:45:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703479542; x=1704084342; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=OOtwZXIJ0EGfMVXsfrD6wt75lYzzN7mvK9tS/JxaOqY=; b=bgaXePCaB44BFno8Q3aAEIep9Me+SkgALeMbJNTup4xiKbJsj79GE394ZsYIE7aa5k Lhqcd9hBY2Wxgy6srcr60ULUB5T+PoK3TiLRgWxvhN9DIrXfFsYoNyU4HjeVdcdlJpQK dfz4O3QamJizDPdjv9FATVixcAegPlWAnHeZA63znxMtFi4SpQevo6jagBX0QwUqvv8G BneSuGJ8Ms9RNTs4bpd7qmEPvlysCk8IwuzjMFX7OT0SJzsMX0STbdnxtBa7j5WFh6k0 sB9Qlt1zngLo6Ij+geYVYPxwFjUhXs3klNHykhBCEZKM8aXJWoKHbkHcrgumS454F08n F+iQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703479542; x=1704084342; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OOtwZXIJ0EGfMVXsfrD6wt75lYzzN7mvK9tS/JxaOqY=; b=ZAmPhN8x9Yz9s3VrZQCG6Y71DDL3H1aURG7yZrAor9+75zIuze5KtMqc3UH9sx1jdu KErmekr8fumF3wX7xMKfp7SQeG8DKVya0bBoXnaFMTtvjeBJsc0mg2BecSbf8Ievk4lv z3qYEOnP3N0i8gccTZG/6sZOi0+985+INeT9jxBuMsAdJ1k95BkcYv7IxJb03jVhw88I mInvxpqbJ7ohyO+Tb1vnJHt4ufH7Y8o8XONbuZ7+LIMKgdr6BSR1XfIErFeyoWTJanxO Aa07o4QQ4CO/E9EThpAF9vzE4k96XEefIVmgLO60wtG43GpBfeLO/ea3ZJIjhzYMe1bu wEzA== X-Gm-Message-State: AOJu0Yx7h0GFO5JNvYJQxjc6XdzT9cgL3XYds94/UVXHTJOaE2LXc1XV sN0NSmK3heeeeuNkd3yAI/aq01dpH86m0V0T2AL0WtRtDGA= X-Received: by 2002:a17:902:ce85:b0:1d3:b3b7:5db0 with SMTP id f5-20020a170902ce8500b001d3b3b75db0mr6851253plg.4.1703479542408; Sun, 24 Dec 2023 20:45:42 -0800 (PST) Received: from localhost ([164.70.16.189]) by smtp.gmail.com with ESMTPSA id z3-20020a170902ee0300b001d3e3a86dccsm7285018plb.84.2023.12.24.20.45.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Dec 2023 20:45:41 -0800 (PST) From: Masahisa Kojima To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Takahiro Akashi , Masahisa Kojima Subject: [PATCH 1/3] efi_loader: remove unused members from struct efi_disk_obj Date: Mon, 25 Dec 2023 13:43:54 +0900 Message-Id: <20231225044356.626900-2-masahisa.kojima@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231225044356.626900-1-masahisa.kojima@linaro.org> References: <20231225044356.626900-1-masahisa.kojima@linaro.org> 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.8 at phobos.denx.de X-Virus-Status: Clean part and dev_index in struct efi_disk_obj are not used, let's remove it. This commit also removes the invalid structure comment for @dev, it does not exist. Signed-off-by: Masahisa Kojima Reviewed-by: Heinrich Schuchardt --- lib/efi_loader/efi_disk.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c index f0d76113b0..a2f8b531a3 100644 --- a/lib/efi_loader/efi_disk.c +++ b/lib/efi_loader/efi_disk.c @@ -32,20 +32,15 @@ const efi_guid_t efi_system_partition_guid = PARTITION_SYSTEM_GUID; * * @header: EFI object header * @ops: EFI disk I/O protocol interface - * @dev_index: device index of block device * @media: block I/O media information * @dp: device path to the block device - * @part: partition * @volume: simple file system protocol of the partition - * @dev: associated DM device */ struct efi_disk_obj { struct efi_object header; struct efi_block_io ops; - int dev_index; struct efi_block_io_media media; struct efi_device_path *dp; - unsigned int part; struct efi_simple_file_system_protocol *volume; }; @@ -383,7 +378,6 @@ static int efi_fs_exists(struct blk_desc *desc, int part) * @parent: parent handle * @dp_parent: parent device path * @desc: internal block device - * @dev_index: device index for block device * @part_info: partition info * @part: partition * @disk: pointer to receive the created handle @@ -394,7 +388,6 @@ static efi_status_t efi_disk_add_dev( efi_handle_t parent, struct efi_device_path *dp_parent, struct blk_desc *desc, - int dev_index, struct disk_partition *part_info, unsigned int part, struct efi_disk_obj **disk, @@ -456,7 +449,6 @@ static efi_status_t efi_disk_add_dev( diskobj->dp = efi_dp_from_part(desc, part); diskobj->media.last_block = desc->lba - 1; } - diskobj->part = part; /* * Install the device path and the block IO protocol. @@ -499,7 +491,6 @@ static efi_status_t efi_disk_add_dev( goto error; } diskobj->ops = block_io_disk_template; - diskobj->dev_index = dev_index; /* Fill in EFI IO Media info (for read/write callbacks) */ diskobj->media.removable_media = desc->removable; @@ -519,7 +510,7 @@ static efi_status_t efi_disk_add_dev( EFI_PRINT("BlockIO: part %u, present %d, logical %d, removable %d" ", last_block %llu\n", - diskobj->part, + part, diskobj->media.media_present, diskobj->media.logical_partition, diskobj->media.removable_media, @@ -566,7 +557,7 @@ static int efi_disk_create_raw(struct udevice *dev, efi_handle_t agent_handle) diskid = desc->devnum; ret = efi_disk_add_dev(NULL, NULL, desc, - diskid, NULL, 0, &disk, agent_handle); + NULL, 0, &disk, agent_handle); if (ret != EFI_SUCCESS) { if (ret == EFI_NOT_READY) { log_notice("Disk %s not ready\n", dev->name); @@ -627,7 +618,7 @@ static int efi_disk_create_part(struct udevice *dev, efi_handle_t agent_handle) return -1; dp_parent = (struct efi_device_path *)handler->protocol_interface; - ret = efi_disk_add_dev(parent, dp_parent, desc, diskid, + ret = efi_disk_add_dev(parent, dp_parent, desc, info, part, &disk, agent_handle); if (ret != EFI_SUCCESS) { log_err("Adding partition for %s failed\n", dev->name);