From: Lu Baolu <baolu.lu@linux.intel.com>
To: Qian Cai <cai@lca.pw>, jroedel@suse.de
Cc: baolu.lu@linux.intel.com, dwmw2@infradead.org,
eric.auger@redhat.com, iommu@lists.linux-foundation.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iommu/intel: remove an unused variable "length"
Date: Tue, 18 Jun 2019 10:25:09 +0800 [thread overview]
Message-ID: <5405235e-50a2-cfbb-3f3d-af7cbefce183@linux.intel.com> (raw)
In-Reply-To: <20190617132027.1960-1-cai@lca.pw>
Hi,
On 6/17/19 9:20 PM, Qian Cai wrote:
> The linux-next commit "iommu/vt-d: Duplicate iommu_resv_region objects
> per device list" [1] left out an unused variable,
>
> drivers/iommu/intel-iommu.c: In function 'dmar_parse_one_rmrr':
> drivers/iommu/intel-iommu.c:4014:9: warning: variable 'length' set but
> not used [-Wunused-but-set-variable]
>
> [1] https://lore.kernel.org/patchwork/patch/1083073/
>
> Signed-off-by: Qian Cai <cai@lca.pw>
With regard to the subject, we normally use "iommu/vt-d: ".
Best regards,
Baolu
> ---
> drivers/iommu/intel-iommu.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
> index 478ac186570b..d86d4ee5cc78 100644
> --- a/drivers/iommu/intel-iommu.c
> +++ b/drivers/iommu/intel-iommu.c
> @@ -4011,7 +4011,6 @@ int __init dmar_parse_one_rmrr(struct acpi_dmar_header *header, void *arg)
> {
> struct acpi_dmar_reserved_memory *rmrr;
> struct dmar_rmrr_unit *rmrru;
> - size_t length;
>
> rmrru = kzalloc(sizeof(*rmrru), GFP_KERNEL);
> if (!rmrru)
> @@ -4022,8 +4021,6 @@ int __init dmar_parse_one_rmrr(struct acpi_dmar_header *header, void *arg)
> rmrru->base_address = rmrr->base_address;
> rmrru->end_address = rmrr->end_address;
>
> - length = rmrr->end_address - rmrr->base_address + 1;
> -
> rmrru->devices = dmar_alloc_dev_scope((void *)(rmrr + 1),
> ((void *)rmrr) + rmrr->header.length,
> &rmrru->devices_cnt);
>
next prev parent reply other threads:[~2019-06-18 2:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-17 13:20 [PATCH] iommu/intel: remove an unused variable "length" Qian Cai
2019-06-17 13:53 ` Auger Eric
2019-06-18 2:25 ` Lu Baolu [this message]
2019-06-18 15:30 ` Joerg Roedel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5405235e-50a2-cfbb-3f3d-af7cbefce183@linux.intel.com \
--to=baolu.lu@linux.intel.com \
--cc=cai@lca.pw \
--cc=dwmw2@infradead.org \
--cc=eric.auger@redhat.com \
--cc=iommu@lists.linux-foundation.org \
--cc=jroedel@suse.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox