linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] phy: mark tegra_xusb_lane_lookup_function() static
@ 2016-08-31  9:05 Baoyou Xie
  2016-08-31 10:01 ` Arnd Bergmann
  2016-09-01 11:34 ` Thierry Reding
  0 siblings, 2 replies; 4+ messages in thread
From: Baoyou Xie @ 2016-08-31  9:05 UTC (permalink / raw)
  To: kishon, swarren, thierry.reding, gnurou
  Cc: linux-kernel, linux-tegra, arnd, baoyou.xie, xie.baoyou

We get 1 warning when building kernel with W=1:
drivers/phy/tegra/xusb.c:104:5: warning: no previous prototype for 'tegra_xusb_lane_lookup_function' [-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/phy/tegra/xusb.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/phy/tegra/xusb.c b/drivers/phy/tegra/xusb.c
index ec83dfd..0a372d9 100644
--- a/drivers/phy/tegra/xusb.c
+++ b/drivers/phy/tegra/xusb.c
@@ -101,7 +101,8 @@ tegra_xusb_pad_find_phy_node(struct tegra_xusb_pad *pad, unsigned int index)
 	return of_find_node_by_name(np, pad->soc->lanes[index].name);
 }
 
-int tegra_xusb_lane_lookup_function(struct tegra_xusb_lane *lane,
+static int
+tegra_xusb_lane_lookup_function(struct tegra_xusb_lane *lane,
 				    const char *function)
 {
 	unsigned int i;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] phy: mark tegra_xusb_lane_lookup_function() static
  2016-08-31  9:05 [PATCH] phy: mark tegra_xusb_lane_lookup_function() static Baoyou Xie
@ 2016-08-31 10:01 ` Arnd Bergmann
  2016-09-02 12:15   ` Kishon Vijay Abraham I
  2016-09-01 11:34 ` Thierry Reding
  1 sibling, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2016-08-31 10:01 UTC (permalink / raw)
  To: Baoyou Xie
  Cc: kishon, swarren, thierry.reding, gnurou, linux-kernel,
	linux-tegra, xie.baoyou

On Wednesday, August 31, 2016 5:05:19 PM CEST Baoyou Xie wrote:
> We get 1 warning when building kernel with W=1:
> drivers/phy/tegra/xusb.c:104:5: warning: no previous prototype for 'tegra_xusb_lane_lookup_function' [-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>
> 

Acked-by: Arnd Bergmann <arnd@arndb.de>

Same comment as for the other patch, it's better to use "phy: tegra: ..."
in the subject for clarity.

	Arnd

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] phy: mark tegra_xusb_lane_lookup_function() static
  2016-08-31  9:05 [PATCH] phy: mark tegra_xusb_lane_lookup_function() static Baoyou Xie
  2016-08-31 10:01 ` Arnd Bergmann
@ 2016-09-01 11:34 ` Thierry Reding
  1 sibling, 0 replies; 4+ messages in thread
From: Thierry Reding @ 2016-09-01 11:34 UTC (permalink / raw)
  To: Baoyou Xie
  Cc: kishon, swarren, gnurou, linux-kernel, linux-tegra, arnd, xie.baoyou

[-- Attachment #1: Type: text/plain, Size: 612 bytes --]

On Wed, Aug 31, 2016 at 05:05:19PM +0800, Baoyou Xie wrote:
> We get 1 warning when building kernel with W=1:
> drivers/phy/tegra/xusb.c:104:5: warning: no previous prototype for 'tegra_xusb_lane_lookup_function' [-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/phy/tegra/xusb.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Acked-by: Thierry Reding <treding@nvidia.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] phy: mark tegra_xusb_lane_lookup_function() static
  2016-08-31 10:01 ` Arnd Bergmann
@ 2016-09-02 12:15   ` Kishon Vijay Abraham I
  0 siblings, 0 replies; 4+ messages in thread
From: Kishon Vijay Abraham I @ 2016-09-02 12:15 UTC (permalink / raw)
  To: Arnd Bergmann, Baoyou Xie
  Cc: swarren, thierry.reding, gnurou, linux-kernel, linux-tegra, xie.baoyou

Hi,

On Wednesday 31 August 2016 03:31 PM, Arnd Bergmann wrote:
> On Wednesday, August 31, 2016 5:05:19 PM CEST Baoyou Xie wrote:
>> We get 1 warning when building kernel with W=1:
>> drivers/phy/tegra/xusb.c:104:5: warning: no previous prototype for 'tegra_xusb_lane_lookup_function' [-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>
>>
> 
> Acked-by: Arnd Bergmann <arnd@arndb.de>
> 
> Same comment as for the other patch, it's better to use "phy: tegra: ..."
> in the subject for clarity.

Fixed it myself and merged this and the other patch.

Thanks
Kishon

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-09-02 12:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-31  9:05 [PATCH] phy: mark tegra_xusb_lane_lookup_function() static Baoyou Xie
2016-08-31 10:01 ` Arnd Bergmann
2016-09-02 12:15   ` Kishon Vijay Abraham I
2016-09-01 11:34 ` Thierry Reding

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).