Linux-EDAC Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] EDAC, xgene: remove set but not used 'address'
@ 2020-04-09  8:52 Jason Yan
  2020-04-09  9:10 ` Robert Richter
  0 siblings, 1 reply; 4+ messages in thread
From: Jason Yan @ 2020-04-09  8:52 UTC (permalink / raw)
  To: khuong, bp, mchehab, tony.luck, james.morse, rrichter,
	linux-edac, linux-kernel
  Cc: Jason Yan

Fix the following gcc warning:

drivers/edac/xgene_edac.c:1486:7: warning: variable ‘address’ set but
not used [-Wunused-but-set-variable]
   u32 address;
       ^~~~~~~

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
 drivers/edac/xgene_edac.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/edac/xgene_edac.c b/drivers/edac/xgene_edac.c
index e4a1032ba0b5..e5e0fbdeca29 100644
--- a/drivers/edac/xgene_edac.c
+++ b/drivers/edac/xgene_edac.c
@@ -1483,13 +1483,11 @@ static void xgene_edac_rb_report(struct edac_device_ctl_info *edac_dev)
 		return;
 	if (reg & STICKYERR_MASK) {
 		bool write;
-		u32 address;
 
 		dev_err(edac_dev->dev, "IOB bus access error(s)\n");
 		if (regmap_read(ctx->edac->rb_map, RBEIR, &reg))
 			return;
 		write = reg & WRITE_ACCESS_MASK ? 1 : 0;
-		address = RBERRADDR_RD(reg);
 		if (reg & AGENT_OFFLINE_ERR_MASK)
 			dev_err(edac_dev->dev,
 				"IOB bus %s access to offline agent error\n",
-- 
2.17.2


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

* Re: [PATCH] EDAC, xgene: remove set but not used 'address'
  2020-04-09  8:52 [PATCH] EDAC, xgene: remove set but not used 'address' Jason Yan
@ 2020-04-09  9:10 ` Robert Richter
  2020-04-09  9:15   ` Jason Yan
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Richter @ 2020-04-09  9:10 UTC (permalink / raw)
  To: Jason Yan
  Cc: khuong, bp, mchehab, tony.luck, james.morse, linux-edac, linux-kernel

On 09.04.20 16:52:37, Jason Yan wrote:
> Fix the following gcc warning:
> 
> drivers/edac/xgene_edac.c:1486:7: warning: variable ‘address’ set but
> not used [-Wunused-but-set-variable]
>    u32 address;
>        ^~~~~~~
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>
> ---
>  drivers/edac/xgene_edac.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/edac/xgene_edac.c b/drivers/edac/xgene_edac.c
> index e4a1032ba0b5..e5e0fbdeca29 100644
> --- a/drivers/edac/xgene_edac.c
> +++ b/drivers/edac/xgene_edac.c
> @@ -1483,13 +1483,11 @@ static void xgene_edac_rb_report(struct edac_device_ctl_info *edac_dev)
>  		return;
>  	if (reg & STICKYERR_MASK) {
>  		bool write;
> -		u32 address;
>  
>  		dev_err(edac_dev->dev, "IOB bus access error(s)\n");
>  		if (regmap_read(ctx->edac->rb_map, RBEIR, &reg))
>  			return;
>  		write = reg & WRITE_ACCESS_MASK ? 1 : 0;
> -		address = RBERRADDR_RD(reg);

Please also remove that unused macro.

Thanks,

-Robert

>  		if (reg & AGENT_OFFLINE_ERR_MASK)
>  			dev_err(edac_dev->dev,
>  				"IOB bus %s access to offline agent error\n",
> -- 
> 2.17.2
> 

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

* Re: [PATCH] EDAC, xgene: remove set but not used 'address'
  2020-04-09  9:10 ` Robert Richter
@ 2020-04-09  9:15   ` Jason Yan
  0 siblings, 0 replies; 4+ messages in thread
From: Jason Yan @ 2020-04-09  9:15 UTC (permalink / raw)
  To: Robert Richter
  Cc: khuong, bp, mchehab, tony.luck, james.morse, linux-edac, linux-kernel



在 2020/4/9 17:10, Robert Richter 写道:
> On 09.04.20 16:52:37, Jason Yan wrote:
>> Fix the following gcc warning:
>>
>> drivers/edac/xgene_edac.c:1486:7: warning: variable ‘address’ set but
>> not used [-Wunused-but-set-variable]
>>     u32 address;
>>         ^~~~~~~
>>
>> Reported-by: Hulk Robot <hulkci@huawei.com>
>> Signed-off-by: Jason Yan <yanaijie@huawei.com>
>> ---
>>   drivers/edac/xgene_edac.c | 2 --
>>   1 file changed, 2 deletions(-)
>>
>> diff --git a/drivers/edac/xgene_edac.c b/drivers/edac/xgene_edac.c
>> index e4a1032ba0b5..e5e0fbdeca29 100644
>> --- a/drivers/edac/xgene_edac.c
>> +++ b/drivers/edac/xgene_edac.c
>> @@ -1483,13 +1483,11 @@ static void xgene_edac_rb_report(struct edac_device_ctl_info *edac_dev)
>>   		return;
>>   	if (reg & STICKYERR_MASK) {
>>   		bool write;
>> -		u32 address;
>>   
>>   		dev_err(edac_dev->dev, "IOB bus access error(s)\n");
>>   		if (regmap_read(ctx->edac->rb_map, RBEIR, &reg))
>>   			return;
>>   		write = reg & WRITE_ACCESS_MASK ? 1 : 0;
>> -		address = RBERRADDR_RD(reg);
> 
> Please also remove that unused macro.
> 

OK, thanks.

Jason

> Thanks,
> 
> -Robert
> 
>>   		if (reg & AGENT_OFFLINE_ERR_MASK)
>>   			dev_err(edac_dev->dev,
>>   				"IOB bus %s access to offline agent error\n",
>> -- 
>> 2.17.2
>>
> 


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

* [PATCH] EDAC, xgene: remove set but not used 'address'
@ 2020-04-09  9:19 Jason Yan
  0 siblings, 0 replies; 4+ messages in thread
From: Jason Yan @ 2020-04-09  9:19 UTC (permalink / raw)
  To: khuong, bp, mchehab, tony.luck, james.morse, rrichter,
	linux-edac, linux-kernel
  Cc: Jason Yan

Fix the following gcc warning:

drivers/edac/xgene_edac.c:1486:7: warning: variable ‘address’ set but
not used [-Wunused-but-set-variable]
   u32 address;
       ^~~~~~~
And remove the unused macro RBERRADDR_RD after that.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
 drivers/edac/xgene_edac.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/edac/xgene_edac.c b/drivers/edac/xgene_edac.c
index e4a1032ba0b5..1d2c27a00a4a 100644
--- a/drivers/edac/xgene_edac.c
+++ b/drivers/edac/xgene_edac.c
@@ -1349,7 +1349,6 @@ static int xgene_edac_l3_remove(struct xgene_edac_dev_ctx *l3)
 #define WORD_ALIGNED_ERR_MASK		BIT(28)
 #define PAGE_ACCESS_ERR_MASK		BIT(27)
 #define WRITE_ACCESS_MASK		BIT(26)
-#define RBERRADDR_RD(src)		((src) & 0x03FFFFFF)
 
 static const char * const soc_mem_err_v1[] = {
 	"10GbE0",
@@ -1483,13 +1482,11 @@ static void xgene_edac_rb_report(struct edac_device_ctl_info *edac_dev)
 		return;
 	if (reg & STICKYERR_MASK) {
 		bool write;
-		u32 address;
 
 		dev_err(edac_dev->dev, "IOB bus access error(s)\n");
 		if (regmap_read(ctx->edac->rb_map, RBEIR, &reg))
 			return;
 		write = reg & WRITE_ACCESS_MASK ? 1 : 0;
-		address = RBERRADDR_RD(reg);
 		if (reg & AGENT_OFFLINE_ERR_MASK)
 			dev_err(edac_dev->dev,
 				"IOB bus %s access to offline agent error\n",
-- 
2.17.2


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

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-09  8:52 [PATCH] EDAC, xgene: remove set but not used 'address' Jason Yan
2020-04-09  9:10 ` Robert Richter
2020-04-09  9:15   ` Jason Yan
2020-04-09  9:19 Jason Yan

Linux-EDAC Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-edac/0 linux-edac/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-edac linux-edac/ https://lore.kernel.org/linux-edac \
		linux-edac@vger.kernel.org
	public-inbox-index linux-edac

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-edac


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git