linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: YueHaibing <yuehaibing@huawei.com>
To: Joerg Roedel <joro@8bytes.org>
Cc: Yue Haibing <yuehaibing@huawei.com>,
	<iommu@lists.linux-foundation.org>,
	<linux-kernel@vger.kernel.org>, <kernel-janitors@vger.kernel.org>
Subject: [PATCH -next] iommu/amd: remove set but not used variable 'tag'
Date: Thu, 8 Nov 2018 06:12:40 +0000	[thread overview]
Message-ID: <1541657560-73681-1-git-send-email-yuehaibing@huawei.com> (raw)

From: Yue Haibing <yuehaibing@huawei.com>

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/iommu/amd_iommu.c: In function 'iommu_print_event':
drivers/iommu/amd_iommu.c:550:33: warning:
 variable 'tag' set but not used [-Wunused-but-set-variable]

It never used since introduction in
commit e7f63ffc1bf1 ("iommu/amd: Update logging information for new event type")

Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
---
 drivers/iommu/amd_iommu.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 4e04fff..58a7834 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -547,7 +547,7 @@ static void amd_iommu_report_page_fault(u16 devid, u16 domain_id,
 static void iommu_print_event(struct amd_iommu *iommu, void *__evt)
 {
 	struct device *dev = iommu->iommu.dev;
-	int type, devid, pasid, flags, tag;
+	int type, devid, pasid, flags;
 	volatile u32 *event = __evt;
 	int count = 0;
 	u64 address;
@@ -615,7 +615,6 @@ static void iommu_print_event(struct amd_iommu *iommu, void *__evt)
 	case EVENT_TYPE_INV_PPR_REQ:
 		pasid = ((event[0] >> 16) & 0xFFFF)
 			| ((event[1] << 6) & 0xF0000);
-		tag = event[1] & 0x03FF;
 		dev_err(dev, "INVALID_PPR_REQUEST device=%02x:%02x.%x pasid=0x%05x address=0x%016llx flags=0x%04x]\n",
 			PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid),
 			pasid, address, flags);




             reply	other threads:[~2018-11-08  6:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-08  6:12 YueHaibing [this message]
2018-11-08  9:32 ` [PATCH -next] iommu/amd: remove set but not used variable 'tag' Joerg Roedel
2018-11-08 11:12   ` YueHaibing
2018-11-08 11:57 ` [PATCH -next] iommu/amd: Add missed 'tag' to error msg in iommu_print_event YueHaibing
2018-11-08 14:04   ` 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=1541657560-73681-1-git-send-email-yuehaibing@huawei.com \
    --to=yuehaibing@huawei.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=kernel-janitors@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).