* [PATCH net-next] net: sxgbe: fix sparse warnings about static declaration
@ 2014-03-28 17:57 Byungho An
2014-03-28 18:43 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Byungho An @ 2014-03-28 17:57 UTC (permalink / raw)
To: netdev, linux-samsung-soc
Cc: 'David Miller', 'kbuild test robot',
'Girish K S', 'Siva Reddy',
'Vipul Pandya'
From: Byungho An <bh74.an@samsung.com>
This fixes followings:
sparse warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c:197:5:
sparse: symbol 'sxgbe_platform_freeze' was not declared. Should it be static?
>> drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c:204:5:
sparse: symbol 'sxgbe_platform_restore' was not declared. Should it be static?
>> drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c:228:24:
sparse: symbol 'sxgbe_platform_driver' was not declared. Should it be static?
>> drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c:1795:6:
sparse: symbol 'sxgbe_get_ops' was not declared. Should it be static?
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Byungho An <bh74.an@samsung.com>
---
drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c | 2 +-
drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c b/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c
index 1869d4c6..ee1fd3c 100644
--- a/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c
+++ b/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c
@@ -2013,7 +2013,7 @@ static const struct net_device_ops sxgbe_netdev_ops = {
};
/* Get the hardware ops */
-void sxgbe_get_ops(struct sxgbe_ops * const ops_ptr)
+static void sxgbe_get_ops(struct sxgbe_ops * const ops_ptr)
{
ops_ptr->mac = sxgbe_get_core_ops();
ops_ptr->desc = sxgbe_get_desc_ops();
diff --git a/drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c b/drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c
index 94c2cd7..b147d46 100644
--- a/drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c
+++ b/drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c
@@ -200,14 +200,14 @@ static int sxgbe_platform_resume(struct device *dev)
return sxgbe_resume(ndev);
}
-int sxgbe_platform_freeze(struct device *dev)
+static int sxgbe_platform_freeze(struct device *dev)
{
struct net_device *ndev = dev_get_drvdata(dev);
return sxgbe_freeze(ndev);
}
-int sxgbe_platform_restore(struct device *dev)
+static int sxgbe_platform_restore(struct device *dev)
{
struct net_device *ndev = dev_get_drvdata(dev);
@@ -231,7 +231,7 @@ static const struct of_device_id sxgbe_dt_ids[] = {
};
MODULE_DEVICE_TABLE(of, sxgbe_dt_ids);
-struct platform_driver sxgbe_platform_driver = {
+static struct platform_driver sxgbe_platform_driver = {
.probe = sxgbe_platform_probe,
.remove = sxgbe_platform_remove,
.driver = {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH net-next] net: sxgbe: fix sparse warnings about static declaration
2014-03-28 17:57 [PATCH net-next] net: sxgbe: fix sparse warnings about static declaration Byungho An
@ 2014-03-28 18:43 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-03-28 18:43 UTC (permalink / raw)
To: bh74.an
Cc: netdev, linux-samsung-soc, fengguang.wu, ks.giri, siva.kallam,
vipul.pandya
From: Byungho An <bh74.an@samsung.com>
Date: Fri, 28 Mar 2014 10:57:36 -0700
> From: Byungho An <bh74.an@samsung.com>
>
> This fixes followings:
>
> sparse warnings: (new ones prefixed by >>)
>
>>> drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c:197:5:
> sparse: symbol 'sxgbe_platform_freeze' was not declared. Should it be static?
>>> drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c:204:5:
> sparse: symbol 'sxgbe_platform_restore' was not declared. Should it be static?
>>> drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c:228:24:
> sparse: symbol 'sxgbe_platform_driver' was not declared. Should it be static?
>
>>> drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c:1795:6:
> sparse: symbol 'sxgbe_get_ops' was not declared. Should it be static?
>
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Signed-off-by: Byungho An <bh74.an@samsung.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-03-28 18:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-28 17:57 [PATCH net-next] net: sxgbe: fix sparse warnings about static declaration Byungho An
2014-03-28 18:43 ` David Miller
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).