* [PATCH] fix:memory:omap-gpmc:mark symbols static where possible
@ 2016-08-28 5:28 Baoyou Xie
2016-08-29 7:32 ` Roger Quadros
0 siblings, 1 reply; 2+ messages in thread
From: Baoyou Xie @ 2016-08-28 5:28 UTC (permalink / raw)
To: rogerq, tony; +Cc: linux-omap, linux-kernel, arnd, baoyou.xie, xie.baoyou
We get 1 warning when build kernel with W=1:
drivers/memory/omap-gpmc.c:354:14: warning: no previous prototype for 'gpmc_clk_ticks_to_ns' [-Wmissing-prototypes]
In fact, this function is only used in the file in which it is declared
and don't need a declaration, but can be made static.
so this patch marks it 'static'.
Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
---
drivers/memory/omap-gpmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
index 869c83f..f71cbf7 100644
--- a/drivers/memory/omap-gpmc.c
+++ b/drivers/memory/omap-gpmc.c
@@ -350,7 +350,7 @@ static unsigned int gpmc_ps_to_ticks(unsigned int time_ps)
return (time_ps + tick_ps - 1) / tick_ps;
}
-unsigned int gpmc_clk_ticks_to_ns(unsigned ticks, int cs,
+static unsigned int gpmc_clk_ticks_to_ns(unsigned int ticks, int cs,
enum gpmc_clk_domain cd)
{
return ticks * gpmc_get_clk_period(cs, cd) / 1000;
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fix:memory:omap-gpmc:mark symbols static where possible
2016-08-28 5:28 [PATCH] fix:memory:omap-gpmc:mark symbols static where possible Baoyou Xie
@ 2016-08-29 7:32 ` Roger Quadros
0 siblings, 0 replies; 2+ messages in thread
From: Roger Quadros @ 2016-08-29 7:32 UTC (permalink / raw)
To: Baoyou Xie, tony; +Cc: linux-omap, linux-kernel, arnd, xie.baoyou
Hi,
On 28/08/16 08:28, Baoyou Xie wrote:
> We get 1 warning when build kernel with W=1:
> drivers/memory/omap-gpmc.c:354:14: warning: no previous prototype for 'gpmc_clk_ticks_to_ns' [-Wmissing-prototypes]
>
> In fact, this function is only used in the file in which it is declared
> and don't need a declaration, but can be made static.
> so this patch marks it 'static'.
>
> Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
> ---
> drivers/memory/omap-gpmc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
> index 869c83f..f71cbf7 100644
> --- a/drivers/memory/omap-gpmc.c
> +++ b/drivers/memory/omap-gpmc.c
> @@ -350,7 +350,7 @@ static unsigned int gpmc_ps_to_ticks(unsigned int time_ps)
> return (time_ps + tick_ps - 1) / tick_ps;
> }
>
> -unsigned int gpmc_clk_ticks_to_ns(unsigned ticks, int cs,
> +static unsigned int gpmc_clk_ticks_to_ns(unsigned int ticks, int cs,
> enum gpmc_clk_domain cd)
> {
> return ticks * gpmc_get_clk_period(cs, cd) / 1000;
>
This patch fails checkpatch with following error
CHECK: Alignment should match open parenthesis
#28: FILE: drivers/memory/omap-gpmc.c:354:
+static unsigned int gpmc_clk_ticks_to_ns(unsigned int ticks, int cs,
enum gpmc_clk_domain cd)
Also IMO patch subject is better as
"memory: omap-gpmc: make gpmc_clk_ticks_to_ns() static"
I'll fix these issues myself this time. Thanks for the fix.
Picked for v4.9.
regards,
-roger
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-29 7:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-28 5:28 [PATCH] fix:memory:omap-gpmc:mark symbols static where possible Baoyou Xie
2016-08-29 7:32 ` Roger Quadros
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).