From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756637AbcH2Hcw (ORCPT ); Mon, 29 Aug 2016 03:32:52 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:60305 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750738AbcH2Hcu (ORCPT ); Mon, 29 Aug 2016 03:32:50 -0400 Subject: Re: [PATCH] fix:memory:omap-gpmc:mark symbols static where possible To: Baoyou Xie , References: <1472362095-15715-1-git-send-email-baoyou.xie@linaro.org> CC: , , , From: Roger Quadros Message-ID: Date: Mon, 29 Aug 2016 10:32:44 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1472362095-15715-1-git-send-email-baoyou.xie@linaro.org> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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