* [PATCH] staging: ks7010: declare private functions static
@ 2016-07-25 19:22 Nicholas Mc Guire
2016-07-25 21:04 ` Wolfram Sang
0 siblings, 1 reply; 6+ messages in thread
From: Nicholas Mc Guire @ 2016-07-25 19:22 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Wolfram Sang, devel, linux-kernel, Nicholas Mc Guire
Private functions in ks_hostif.c can be declared static.
Fixes: 13a9930d15b4 ("staging: ks7010: add driver from Nanonote extra-repository")
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
---
Found by sparse
The build of ks_hostif.o generated the following sparse warnings:
CHECK drivers/staging/ks7010/ks_hostif.c
drivers/staging/ks7010/ks_hostif.c:72:6: warning: symbol
'ks_wlan_hw_wakeup_task' was not declared. Should it be static?
drivers/staging/ks7010/ks_hostif.c:1512:6: warning: symbol
'hostif_infrastructure_set2_request' was not declared. Should it be static?
As both functions reported are private to this file it seems reasonable
to declare them static.
Compile tested with: x86_64_defconfig + CONFIG_STAGING=y
CONFIG_MMC=m, CONFIG_KS7010=m
Patch is against 4.7-rc7 (localversion-next -next-20160725)
drivers/staging/ks7010/ks_hostif.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
index a8822fe..71b6ba2 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -69,7 +69,7 @@ inline u32 get_DWORD(struct ks_wlan_private *priv)
return data;
}
-void ks_wlan_hw_wakeup_task(struct work_struct *work)
+static void ks_wlan_hw_wakeup_task(struct work_struct *work)
{
struct ks_wlan_private *priv =
container_of(work, struct ks_wlan_private, ks_wlan_wakeup_task);
@@ -1505,7 +1505,7 @@ void hostif_infrastructure_set_request(struct ks_wlan_private *priv)
ks_wlan_hw_tx(priv, pp, hif_align_size(sizeof(*pp)), NULL, NULL, NULL);
}
-void hostif_infrastructure_set2_request(struct ks_wlan_private *priv)
+static void hostif_infrastructure_set2_request(struct ks_wlan_private *priv)
{
struct hostif_infrastructure_set2_request_t *pp;
uint16_t capability;
--
2.1.4
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] staging: ks7010: declare private functions static
2016-07-25 19:22 [PATCH] staging: ks7010: declare private functions static Nicholas Mc Guire
@ 2016-07-25 21:04 ` Wolfram Sang
2016-07-26 6:48 ` Nicholas Mc Guire
0 siblings, 1 reply; 6+ messages in thread
From: Wolfram Sang @ 2016-07-25 21:04 UTC (permalink / raw)
To: Nicholas Mc Guire; +Cc: Greg Kroah-Hartman, Wolfram Sang, devel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 473 bytes --]
On Mon, Jul 25, 2016 at 09:22:27PM +0200, Nicholas Mc Guire wrote:
> Private functions in ks_hostif.c can be declared static.
>
> Fixes: 13a9930d15b4 ("staging: ks7010: add driver from Nanonote extra-repository")
>
> Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Reviewed-by: Wolfram Sang <wsa@the-dreams.de>
drivers/staging/ks7010/ks7010_sdio.c and
drivers/staging/ks7010/ks_wlan_net.c have similar warnings in case you'd
like to fix those, too.)
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] staging: ks7010: declare private functions static
2016-07-25 21:04 ` Wolfram Sang
@ 2016-07-26 6:48 ` Nicholas Mc Guire
2016-07-26 6:51 ` Wolfram Sang
0 siblings, 1 reply; 6+ messages in thread
From: Nicholas Mc Guire @ 2016-07-26 6:48 UTC (permalink / raw)
To: Wolfram Sang
Cc: Nicholas Mc Guire, Greg Kroah-Hartman, Wolfram Sang, devel,
linux-kernel
On Mon, Jul 25, 2016 at 11:04:18PM +0200, Wolfram Sang wrote:
> On Mon, Jul 25, 2016 at 09:22:27PM +0200, Nicholas Mc Guire wrote:
> > Private functions in ks_hostif.c can be declared static.
> >
> > Fixes: 13a9930d15b4 ("staging: ks7010: add driver from Nanonote extra-repository")
> >
> > Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
>
> Reviewed-by: Wolfram Sang <wsa@the-dreams.de>
>
> drivers/staging/ks7010/ks7010_sdio.c and
> drivers/staging/ks7010/ks_wlan_net.c have similar warnings in case you'd
> like to fix those, too.)
>
the cases found regarding completion were:
./drivers/staging/ks7010/ks_hostif.c:80 treating signal case as success
./drivers/staging/ks7010/ks_wlan_net.c:109 treating signal case as success
./drivers/staging/ks7010/ks7010_sdio.c:901 treating signal case as success
./drivers/staging/ks7010/ks7010_sdio.c:929 treating signal case as success
./drivers/video/fbdev/exynos/exynos_mipi_dsi_common.c:383 treating signal case as success
./drivers/video/fbdev/exynos/exynos_mipi_dsi_common.c:247 treating signal case as success
will be going through all of them in the next days.
thx!
hofrat
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] staging: ks7010: declare private functions static
2016-07-26 6:48 ` Nicholas Mc Guire
@ 2016-07-26 6:51 ` Wolfram Sang
2016-07-26 6:54 ` Nicholas Mc Guire
0 siblings, 1 reply; 6+ messages in thread
From: Wolfram Sang @ 2016-07-26 6:51 UTC (permalink / raw)
To: Nicholas Mc Guire
Cc: Nicholas Mc Guire, Greg Kroah-Hartman, Wolfram Sang, devel,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1351 bytes --]
On Tue, Jul 26, 2016 at 06:48:00AM +0000, Nicholas Mc Guire wrote:
> On Mon, Jul 25, 2016 at 11:04:18PM +0200, Wolfram Sang wrote:
> > On Mon, Jul 25, 2016 at 09:22:27PM +0200, Nicholas Mc Guire wrote:
> > > Private functions in ks_hostif.c can be declared static.
> > >
> > > Fixes: 13a9930d15b4 ("staging: ks7010: add driver from Nanonote extra-repository")
> > >
> > > Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
> >
> > Reviewed-by: Wolfram Sang <wsa@the-dreams.de>
> >
> > drivers/staging/ks7010/ks7010_sdio.c and
> > drivers/staging/ks7010/ks_wlan_net.c have similar warnings in case you'd
> > like to fix those, too.)
> >
> the cases found regarding completion were:
> ./drivers/staging/ks7010/ks_hostif.c:80 treating signal case as success
> ./drivers/staging/ks7010/ks_wlan_net.c:109 treating signal case as success
> ./drivers/staging/ks7010/ks7010_sdio.c:901 treating signal case as success
> ./drivers/staging/ks7010/ks7010_sdio.c:929 treating signal case as success
> ./drivers/video/fbdev/exynos/exynos_mipi_dsi_common.c:383 treating signal case as success
> ./drivers/video/fbdev/exynos/exynos_mipi_dsi_common.c:247 treating signal case as success
>
> will be going through all of them in the next days.
Awesome, thanks!
I meant the "should it be static?" sparse warnings here, though :)
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] staging: ks7010: declare private functions static
2016-07-26 6:51 ` Wolfram Sang
@ 2016-07-26 6:54 ` Nicholas Mc Guire
0 siblings, 0 replies; 6+ messages in thread
From: Nicholas Mc Guire @ 2016-07-26 6:54 UTC (permalink / raw)
To: Wolfram Sang
Cc: Nicholas Mc Guire, Greg Kroah-Hartman, Wolfram Sang, devel,
linux-kernel
On Tue, Jul 26, 2016 at 08:51:14AM +0200, Wolfram Sang wrote:
> On Tue, Jul 26, 2016 at 06:48:00AM +0000, Nicholas Mc Guire wrote:
> > On Mon, Jul 25, 2016 at 11:04:18PM +0200, Wolfram Sang wrote:
> > > On Mon, Jul 25, 2016 at 09:22:27PM +0200, Nicholas Mc Guire wrote:
> > > > Private functions in ks_hostif.c can be declared static.
> > > >
> > > > Fixes: 13a9930d15b4 ("staging: ks7010: add driver from Nanonote extra-repository")
> > > >
> > > > Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
> > >
> > > Reviewed-by: Wolfram Sang <wsa@the-dreams.de>
> > >
> > > drivers/staging/ks7010/ks7010_sdio.c and
> > > drivers/staging/ks7010/ks_wlan_net.c have similar warnings in case you'd
> > > like to fix those, too.)
> > >
> > the cases found regarding completion were:
> > ./drivers/staging/ks7010/ks_hostif.c:80 treating signal case as success
> > ./drivers/staging/ks7010/ks_wlan_net.c:109 treating signal case as success
> > ./drivers/staging/ks7010/ks7010_sdio.c:901 treating signal case as success
> > ./drivers/staging/ks7010/ks7010_sdio.c:929 treating signal case as success
> > ./drivers/video/fbdev/exynos/exynos_mipi_dsi_common.c:383 treating signal case as success
> > ./drivers/video/fbdev/exynos/exynos_mipi_dsi_common.c:247 treating signal case as success
> >
> > will be going through all of them in the next days.
>
> Awesome, thanks!
>
> I meant the "should it be static?" sparse warnings here, though :)
>
well I do run sparse on all the cleanups and if that triggers
and it is sufficiently clear from context, patches will follow.
thx!
hofrat
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] staging: ks7010: declare private functions static
@ 2016-09-27 17:39 Sergio Paracuellos
0 siblings, 0 replies; 6+ messages in thread
From: Sergio Paracuellos @ 2016-09-27 17:39 UTC (permalink / raw)
To: gregkh
Cc: wsa, karniksayli1995, elfring, sudipm.mukherjee, bankarsandhya512,
devel, linux-kernel
Private functions in ks7010_sdio.c can be declared static.
Fixes sparse warnings 'was not declared. Should it be static?'.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
drivers/staging/ks7010/ks7010_sdio.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c
index b27e9b0..0884960 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -87,7 +87,7 @@ static int ks7010_sdio_write(struct ks_wlan_private *priv, unsigned int address,
return rc;
}
-void ks_wlan_hw_sleep_doze_request(struct ks_wlan_private *priv)
+static void ks_wlan_hw_sleep_doze_request(struct ks_wlan_private *priv)
{
unsigned char rw_data;
int retval;
@@ -117,7 +117,7 @@ void ks_wlan_hw_sleep_doze_request(struct ks_wlan_private *priv)
priv->sleep_mode = atomic_read(&priv->sleepstatus.status);
}
-void ks_wlan_hw_sleep_wakeup_request(struct ks_wlan_private *priv)
+static void ks_wlan_hw_sleep_wakeup_request(struct ks_wlan_private *priv)
{
unsigned char rw_data;
int retval;
@@ -169,7 +169,7 @@ void ks_wlan_hw_wakeup_request(struct ks_wlan_private *priv)
}
}
-int _ks_wlan_hw_power_save(struct ks_wlan_private *priv)
+static int _ks_wlan_hw_power_save(struct ks_wlan_private *priv)
{
unsigned char rw_data;
int retval;
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-09-27 17:39 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-25 19:22 [PATCH] staging: ks7010: declare private functions static Nicholas Mc Guire
2016-07-25 21:04 ` Wolfram Sang
2016-07-26 6:48 ` Nicholas Mc Guire
2016-07-26 6:51 ` Wolfram Sang
2016-07-26 6:54 ` Nicholas Mc Guire
-- strict thread matches above, loose matches on Subject: below --
2016-09-27 17:39 Sergio Paracuellos
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox