2014-01-16 06:05:52

by Prabhakar

[permalink] [raw]
Subject: [PATCH] net: davinci_mdio: Fix sparse warning

From: "Lad, Prabhakar" <[email protected]>

This patch fixes following sparse warning
davinci_mdio.c:85:27: warning: symbol 'default_pdata' was not declared. Should it be static?
Also makes the default_pdata as a constant.

Signed-off-by: Lad, Prabhakar <[email protected]>
---
drivers/net/ethernet/ti/davinci_mdio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c
index 4ec9265..0cca9de 100644
--- a/drivers/net/ethernet/ti/davinci_mdio.c
+++ b/drivers/net/ethernet/ti/davinci_mdio.c
@@ -82,7 +82,7 @@ struct davinci_mdio_regs {
} user[0];
};

-struct mdio_platform_data default_pdata = {
+static const struct mdio_platform_data default_pdata = {
.bus_freq = DEF_OUT_FREQ,
};

--
1.7.9.5


2014-01-16 06:15:06

by Mugunthan V N

[permalink] [raw]
Subject: Re: [PATCH] net: davinci_mdio: Fix sparse warning

On Thursday 16 January 2014 11:35 AM, Prabhakar Lad wrote:
> From: "Lad, Prabhakar" <[email protected]>
>
> This patch fixes following sparse warning
> davinci_mdio.c:85:27: warning: symbol 'default_pdata' was not declared. Should it be static?
> Also makes the default_pdata as a constant.
>
> Signed-off-by: Lad, Prabhakar <[email protected]>
Acked-by: Mugunthan V N <[email protected]>

Regards
Mugunthan V N

2014-01-17 01:30:45

by David Miller

[permalink] [raw]
Subject: Re: [PATCH] net: davinci_mdio: Fix sparse warning

From: Prabhakar Lad <[email protected]>
Date: Thu, 16 Jan 2014 11:35:41 +0530

> From: "Lad, Prabhakar" <[email protected]>
>
> This patch fixes following sparse warning
> davinci_mdio.c:85:27: warning: symbol 'default_pdata' was not declared. Should it be static?
> Also makes the default_pdata as a constant.
>
> Signed-off-by: Lad, Prabhakar <[email protected]>

Applied.