All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] iommu/amd: remove set but not used variable 'tag'
@ 2018-11-08  6:12 ` YueHaibing
  0 siblings, 0 replies; 19+ messages in thread
From: YueHaibing @ 2018-11-08  6:12 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: Yue Haibing, iommu, linux-kernel, kernel-janitors

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);




^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH -next] iommu/amd: remove set but not used variable 'tag'
@ 2018-11-08  6:12 ` YueHaibing
  0 siblings, 0 replies; 19+ messages in thread
From: YueHaibing @ 2018-11-08  6:12 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: Yue Haibing, iommu, linux-kernel, kernel-janitors

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);

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH -next] iommu/amd: remove set but not used variable 'tag'
@ 2018-11-08  6:12 ` YueHaibing
  0 siblings, 0 replies; 19+ messages in thread
From: YueHaibing @ 2018-11-08  6:12 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: Yue Haibing, iommu, linux-kernel, kernel-janitors

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);

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [PATCH -next] iommu/amd: remove set but not used variable 'tag'
  2018-11-08  6:12 ` YueHaibing
@ 2018-11-08  9:32   ` Joerg Roedel
  -1 siblings, 0 replies; 19+ messages in thread
From: Joerg Roedel @ 2018-11-08  9:32 UTC (permalink / raw)
  To: YueHaibing; +Cc: iommu, linux-kernel, kernel-janitors

On Thu, Nov 08, 2018 at 06:12:40AM +0000, YueHaibing wrote:
> -		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);

This looks like tag was just missed in the error message. It is better
to add it there instead of removing it.

Regards,

	Joerg

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH -next] iommu/amd: remove set but not used variable 'tag'
@ 2018-11-08  9:32   ` Joerg Roedel
  0 siblings, 0 replies; 19+ messages in thread
From: Joerg Roedel @ 2018-11-08  9:32 UTC (permalink / raw)
  To: YueHaibing; +Cc: iommu, linux-kernel, kernel-janitors

On Thu, Nov 08, 2018 at 06:12:40AM +0000, YueHaibing wrote:
> -		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);

This looks like tag was just missed in the error message. It is better
to add it there instead of removing it.

Regards,

	Joerg

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH -next] iommu/amd: remove set but not used variable 'tag'
  2018-11-08  9:32   ` Joerg Roedel
  (?)
@ 2018-11-08 11:12     ` YueHaibing
  -1 siblings, 0 replies; 19+ messages in thread
From: YueHaibing @ 2018-11-08 11:12 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: iommu, linux-kernel, kernel-janitors

On 2018/11/8 17:32, Joerg Roedel wrote:
> On Thu, Nov 08, 2018 at 06:12:40AM +0000, YueHaibing wrote:
>> -		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);
> 
> This looks like tag was just missed in the error message. It is better
> to add it there instead of removing it.

Ok, will post a new patch.

> 
> Regards,
> 
> 	Joerg
> 
> .
> 


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH -next] iommu/amd: remove set but not used variable 'tag'
@ 2018-11-08 11:12     ` YueHaibing
  0 siblings, 0 replies; 19+ messages in thread
From: YueHaibing @ 2018-11-08 11:12 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: iommu, linux-kernel, kernel-janitors

On 2018/11/8 17:32, Joerg Roedel wrote:
> On Thu, Nov 08, 2018 at 06:12:40AM +0000, YueHaibing wrote:
>> -		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);
> 
> This looks like tag was just missed in the error message. It is better
> to add it there instead of removing it.

Ok, will post a new patch.

> 
> Regards,
> 
> 	Joerg
> 
> .
> 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH -next] iommu/amd: remove set but not used variable 'tag'
@ 2018-11-08 11:12     ` YueHaibing
  0 siblings, 0 replies; 19+ messages in thread
From: YueHaibing @ 2018-11-08 11:12 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: iommu, linux-kernel, kernel-janitors

On 2018/11/8 17:32, Joerg Roedel wrote:
> On Thu, Nov 08, 2018 at 06:12:40AM +0000, YueHaibing wrote:
>> -		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);
> 
> This looks like tag was just missed in the error message. It is better
> to add it there instead of removing it.

Ok, will post a new patch.

> 
> Regards,
> 
> 	Joerg
> 
> .
> 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH -next] iommu/amd: Add missed 'tag' to error msg in iommu_print_event
  2018-11-08  6:12 ` YueHaibing
  (?)
@ 2018-11-08 11:57   ` YueHaibing
  -1 siblings, 0 replies; 19+ messages in thread
From: YueHaibing @ 2018-11-08 11:57 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: YueHaibing, iommu, linux-kernel, kernel-janitors

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 was introduced in
  e7f63ffc1bf1 ("iommu/amd: Update logging information for new event type")

seems just missed in the error message, add it as suggested by Joerg.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/iommu/amd_iommu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 1167ff0..872b76e 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -622,9 +622,9 @@ static void iommu_print_event(struct amd_iommu *iommu, void *__evt)
 		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",
+		dev_err(dev, "INVALID_PPR_REQUEST device=%02x:%02x.%x pasid=0x%05x address=0x%016llx flags=0x%04x tag=0x%08x]\n",
 			PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid),
-			pasid, address, flags);
+			pasid, address, flags, tag);
 		break;
 	default:
 		dev_err(dev, "UNKNOWN event[0]=0x%08x event[1]=0x%08x event[2]=0x%08x event[3]=0x%08x\n",






^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH -next] iommu/amd: Add missed 'tag' to error msg in iommu_print_event
@ 2018-11-08 11:57   ` YueHaibing
  0 siblings, 0 replies; 19+ messages in thread
From: YueHaibing @ 2018-11-08 11:57 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: YueHaibing, iommu, linux-kernel, kernel-janitors

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 was introduced in
  e7f63ffc1bf1 ("iommu/amd: Update logging information for new event type")

seems just missed in the error message, add it as suggested by Joerg.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/iommu/amd_iommu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 1167ff0..872b76e 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -622,9 +622,9 @@ static void iommu_print_event(struct amd_iommu *iommu, void *__evt)
 		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",
+		dev_err(dev, "INVALID_PPR_REQUEST device=%02x:%02x.%x pasid=0x%05x address=0x%016llx flags=0x%04x tag=0x%08x]\n",
 			PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid),
-			pasid, address, flags);
+			pasid, address, flags, tag);
 		break;
 	default:
 		dev_err(dev, "UNKNOWN event[0]=0x%08x event[1]=0x%08x event[2]=0x%08x event[3]=0x%08x\n",

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH -next] iommu/amd: Add missed 'tag' to error msg in iommu_print_event
@ 2018-11-08 11:57   ` YueHaibing
  0 siblings, 0 replies; 19+ messages in thread
From: YueHaibing @ 2018-11-08 11:57 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: YueHaibing, iommu, linux-kernel, kernel-janitors

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 was introduced in
  e7f63ffc1bf1 ("iommu/amd: Update logging information for new event type")

seems just missed in the error message, add it as suggested by Joerg.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/iommu/amd_iommu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 1167ff0..872b76e 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -622,9 +622,9 @@ static void iommu_print_event(struct amd_iommu *iommu, void *__evt)
 		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",
+		dev_err(dev, "INVALID_PPR_REQUEST device=%02x:%02x.%x pasid=0x%05x address=0x%016llx flags=0x%04x tag=0x%08x]\n",
 			PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid),
-			pasid, address, flags);
+			pasid, address, flags, tag);
 		break;
 	default:
 		dev_err(dev, "UNKNOWN event[0]=0x%08x event[1]=0x%08x event[2]=0x%08x event[3]=0x%08x\n",

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [PATCH -next] iommu/amd: Add missed 'tag' to error msg in iommu_print_event
  2018-11-08 11:57   ` YueHaibing
@ 2018-11-08 14:04     ` Joerg Roedel
  -1 siblings, 0 replies; 19+ messages in thread
From: Joerg Roedel @ 2018-11-08 14:04 UTC (permalink / raw)
  To: YueHaibing; +Cc: iommu, linux-kernel, kernel-janitors

On Thu, Nov 08, 2018 at 11:57:33AM +0000, YueHaibing wrote:
> -		dev_err(dev, "INVALID_PPR_REQUEST device=%02x:%02x.%x pasid=0x%05x address=0x%016llx flags=0x%04x]\n",
> +		dev_err(dev, "INVALID_PPR_REQUEST device=%02x:%02x.%x pasid=0x%05x address=0x%016llx flags=0x%04x tag=0x%08x]\n",

Changed the %08x to %03x, which is enough for a 10-bit value, and
applied it to x86/amd.

Thanks,

	Joerg

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH -next] iommu/amd: Add missed 'tag' to error msg in iommu_print_event
@ 2018-11-08 14:04     ` Joerg Roedel
  0 siblings, 0 replies; 19+ messages in thread
From: Joerg Roedel @ 2018-11-08 14:04 UTC (permalink / raw)
  To: YueHaibing; +Cc: iommu, linux-kernel, kernel-janitors

On Thu, Nov 08, 2018 at 11:57:33AM +0000, YueHaibing wrote:
> -		dev_err(dev, "INVALID_PPR_REQUEST device=%02x:%02x.%x pasid=0x%05x address=0x%016llx flags=0x%04x]\n",
> +		dev_err(dev, "INVALID_PPR_REQUEST device=%02x:%02x.%x pasid=0x%05x address=0x%016llx flags=0x%04x tag=0x%08x]\n",

Changed the %08x to %03x, which is enough for a 10-bit value, and
applied it to x86/amd.

Thanks,

	Joerg

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH -next] iommu/amd: Remove set but not used variable 'iommu'
  2018-11-08  6:12 ` YueHaibing
  (?)
@ 2020-05-08 13:40 ` YueHaibing
  -1 siblings, 0 replies; 19+ messages in thread
From: YueHaibing @ 2020-05-08 13:40 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: YueHaibing, iommu, linux-kernel, kernel-janitors

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

drivers/iommu/amd_iommu.c: In function 'amd_iommu_uninit_device':
drivers/iommu/amd_iommu.c:422:20: warning:
 variable 'iommu' set but not used [-Wunused-but-set-variable]

commit dce8d6964ebd ("iommu/amd: Convert to probe/release_device() call-backs")
involved this, remove it.

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

diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index fef3689ee535..2b8eb58d2bea 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -419,15 +419,12 @@ static void iommu_ignore_device(struct device *dev)
 static void amd_iommu_uninit_device(struct device *dev)
 {
 	struct iommu_dev_data *dev_data;
-	struct amd_iommu *iommu;
 	int devid;
 
 	devid = get_device_id(dev);
 	if (devid < 0)
 		return;
 
-	iommu = amd_iommu_rlookup_table[devid];
-
 	dev_data = search_dev_data(devid);
 	if (!dev_data)
 		return;




^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH -next] iommu/amd: Remove set but not used variable 'iommu'
@ 2020-05-08 13:40 ` YueHaibing
  0 siblings, 0 replies; 19+ messages in thread
From: YueHaibing @ 2020-05-08 13:40 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: kernel-janitors, iommu, YueHaibing, linux-kernel

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

drivers/iommu/amd_iommu.c: In function 'amd_iommu_uninit_device':
drivers/iommu/amd_iommu.c:422:20: warning:
 variable 'iommu' set but not used [-Wunused-but-set-variable]

commit dce8d6964ebd ("iommu/amd: Convert to probe/release_device() call-backs")
involved this, remove it.

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

diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index fef3689ee535..2b8eb58d2bea 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -419,15 +419,12 @@ static void iommu_ignore_device(struct device *dev)
 static void amd_iommu_uninit_device(struct device *dev)
 {
 	struct iommu_dev_data *dev_data;
-	struct amd_iommu *iommu;
 	int devid;
 
 	devid = get_device_id(dev);
 	if (devid < 0)
 		return;
 
-	iommu = amd_iommu_rlookup_table[devid];
-
 	dev_data = search_dev_data(devid);
 	if (!dev_data)
 		return;

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH -next] iommu/amd: Remove set but not used variable 'iommu'
@ 2020-05-08 13:40 ` YueHaibing
  0 siblings, 0 replies; 19+ messages in thread
From: YueHaibing @ 2020-05-08 13:40 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: kernel-janitors, iommu, YueHaibing, linux-kernel

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

drivers/iommu/amd_iommu.c: In function 'amd_iommu_uninit_device':
drivers/iommu/amd_iommu.c:422:20: warning:
 variable 'iommu' set but not used [-Wunused-but-set-variable]

commit dce8d6964ebd ("iommu/amd: Convert to probe/release_device() call-backs")
involved this, remove it.

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

diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index fef3689ee535..2b8eb58d2bea 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -419,15 +419,12 @@ static void iommu_ignore_device(struct device *dev)
 static void amd_iommu_uninit_device(struct device *dev)
 {
 	struct iommu_dev_data *dev_data;
-	struct amd_iommu *iommu;
 	int devid;
 
 	devid = get_device_id(dev);
 	if (devid < 0)
 		return;
 
-	iommu = amd_iommu_rlookup_table[devid];
-
 	dev_data = search_dev_data(devid);
 	if (!dev_data)
 		return;



_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [PATCH -next] iommu/amd: Remove set but not used variable 'iommu'
  2020-05-08 13:40 ` YueHaibing
  (?)
@ 2020-05-13  8:57   ` Joerg Roedel
  -1 siblings, 0 replies; 19+ messages in thread
From: Joerg Roedel @ 2020-05-13  8:57 UTC (permalink / raw)
  To: YueHaibing; +Cc: iommu, linux-kernel, kernel-janitors

On Fri, May 08, 2020 at 01:40:36PM +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/iommu/amd_iommu.c: In function 'amd_iommu_uninit_device':
> drivers/iommu/amd_iommu.c:422:20: warning:
>  variable 'iommu' set but not used [-Wunused-but-set-variable]
> 
> commit dce8d6964ebd ("iommu/amd: Convert to probe/release_device() call-backs")
> involved this, remove it.
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/iommu/amd_iommu.c | 3 ---
>  1 file changed, 3 deletions(-)

Thanks for the patch, but I already applied

	https://lore.kernel.org/r/20200509015645.3236-1-cai@lca.pw

Regards,

	Joerg


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH -next] iommu/amd: Remove set but not used variable 'iommu'
@ 2020-05-13  8:57   ` Joerg Roedel
  0 siblings, 0 replies; 19+ messages in thread
From: Joerg Roedel @ 2020-05-13  8:57 UTC (permalink / raw)
  To: YueHaibing; +Cc: iommu, kernel-janitors, linux-kernel

On Fri, May 08, 2020 at 01:40:36PM +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/iommu/amd_iommu.c: In function 'amd_iommu_uninit_device':
> drivers/iommu/amd_iommu.c:422:20: warning:
>  variable 'iommu' set but not used [-Wunused-but-set-variable]
> 
> commit dce8d6964ebd ("iommu/amd: Convert to probe/release_device() call-backs")
> involved this, remove it.
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/iommu/amd_iommu.c | 3 ---
>  1 file changed, 3 deletions(-)

Thanks for the patch, but I already applied

	https://lore.kernel.org/r/20200509015645.3236-1-cai@lca.pw

Regards,

	Joerg

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH -next] iommu/amd: Remove set but not used variable 'iommu'
@ 2020-05-13  8:57   ` Joerg Roedel
  0 siblings, 0 replies; 19+ messages in thread
From: Joerg Roedel @ 2020-05-13  8:57 UTC (permalink / raw)
  To: YueHaibing; +Cc: iommu, kernel-janitors, linux-kernel

On Fri, May 08, 2020 at 01:40:36PM +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/iommu/amd_iommu.c: In function 'amd_iommu_uninit_device':
> drivers/iommu/amd_iommu.c:422:20: warning:
>  variable 'iommu' set but not used [-Wunused-but-set-variable]
> 
> commit dce8d6964ebd ("iommu/amd: Convert to probe/release_device() call-backs")
> involved this, remove it.
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/iommu/amd_iommu.c | 3 ---
>  1 file changed, 3 deletions(-)

Thanks for the patch, but I already applied

	https://lore.kernel.org/r/20200509015645.3236-1-cai@lca.pw

Regards,

	Joerg

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2020-05-13  8:58 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-08 13:40 [PATCH -next] iommu/amd: Remove set but not used variable 'iommu' YueHaibing
2020-05-08 13:40 ` YueHaibing
2020-05-08 13:40 ` YueHaibing
2020-05-13  8:57 ` Joerg Roedel
2020-05-13  8:57   ` Joerg Roedel
2020-05-13  8:57   ` Joerg Roedel
  -- strict thread matches above, loose matches on Subject: below --
2018-11-08  6:12 [PATCH -next] iommu/amd: remove set but not used variable 'tag' YueHaibing
2018-11-08  6:12 ` YueHaibing
2018-11-08  6:12 ` YueHaibing
2018-11-08  9:32 ` Joerg Roedel
2018-11-08  9:32   ` Joerg Roedel
2018-11-08 11:12   ` YueHaibing
2018-11-08 11:12     ` YueHaibing
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 11:57   ` YueHaibing
2018-11-08 11:57   ` YueHaibing
2018-11-08 14:04   ` Joerg Roedel
2018-11-08 14:04     ` Joerg Roedel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.