diff mbox series

EDAC: remove defined but not used 'bridge_str'

Message ID 20200415085006.6732-1-yanaijie@huawei.com (mailing list archive)
State New, archived
Headers show
Series EDAC: remove defined but not used 'bridge_str' | expand

Commit Message

Jason Yan April 15, 2020, 8:50 a.m. UTC
Fix the following gcc warning:

drivers/edac/amd8131_edac.c:47:21: warning: ‘bridge_str’ defined but not
used [-Wunused-const-variable=]
 static char * const bridge_str[] = {
                     ^~~~~~~~~~

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

Comments

Robert Richter April 15, 2020, 9:19 p.m. UTC | #1
On 15.04.20 16:50:06, Jason Yan wrote:
> Fix the following gcc warning:
> 
> drivers/edac/amd8131_edac.c:47:21: warning: ‘bridge_str’ defined but not
> used [-Wunused-const-variable=]
>  static char * const bridge_str[] = {
>                      ^~~~~~~~~~
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>

Reviewed-by: Robert Richter <rrichter@marvell.com>
Borislav Petkov April 24, 2020, 7:31 a.m. UTC | #2
On Wed, Apr 15, 2020 at 04:50:06PM +0800, Jason Yan wrote:
> Fix the following gcc warning:
> 
> drivers/edac/amd8131_edac.c:47:21: warning: ‘bridge_str’ defined but not
> used [-Wunused-const-variable=]
>  static char * const bridge_str[] = {
>                      ^~~~~~~~~~
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>
> ---
>  drivers/edac/amd8131_edac.c | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/drivers/edac/amd8131_edac.c b/drivers/edac/amd8131_edac.c
> index 93c82bc17493..169353710982 100644
> --- a/drivers/edac/amd8131_edac.c
> +++ b/drivers/edac/amd8131_edac.c
> @@ -44,14 +44,6 @@ static void edac_pci_write_dword(struct pci_dev *dev, int reg, u32 val32)
>  			" PCI Access Write Error at 0x%x\n", reg);
>  }
>  
> -static char * const bridge_str[] = {
> -	[NORTH_A] = "NORTH A",
> -	[NORTH_B] = "NORTH B",
> -	[SOUTH_A] = "SOUTH A",
> -	[SOUTH_B] = "SOUTH B",
> -	[NO_BRIDGE] = "NO BRIDGE",
> -};
> -
>  /* Support up to two AMD8131 chipsets on a platform */
>  static struct amd8131_dev_info amd8131_devices[] = {
>  	{
> -- 

Applied, thanks.
diff mbox series

Patch

diff --git a/drivers/edac/amd8131_edac.c b/drivers/edac/amd8131_edac.c
index 93c82bc17493..169353710982 100644
--- a/drivers/edac/amd8131_edac.c
+++ b/drivers/edac/amd8131_edac.c
@@ -44,14 +44,6 @@  static void edac_pci_write_dword(struct pci_dev *dev, int reg, u32 val32)
 			" PCI Access Write Error at 0x%x\n", reg);
 }
 
-static char * const bridge_str[] = {
-	[NORTH_A] = "NORTH A",
-	[NORTH_B] = "NORTH B",
-	[SOUTH_A] = "SOUTH A",
-	[SOUTH_B] = "SOUTH B",
-	[NO_BRIDGE] = "NO BRIDGE",
-};
-
 /* Support up to two AMD8131 chipsets on a platform */
 static struct amd8131_dev_info amd8131_devices[] = {
 	{