Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1473213 > unrolled thread

[PATCH] phy: mark tegra_xusb_lane_lookup_function() static

Started byBaoyou Xie <baoyou.xie@linaro.org>
First post2016-08-31 11:10 +0200
Last post2016-09-01 13:40 +0200
Articles 4 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] phy: mark tegra_xusb_lane_lookup_function() static Baoyou Xie <baoyou.xie@linaro.org> - 2016-08-31 11:10 +0200
    Re: [PATCH] phy: mark tegra_xusb_lane_lookup_function() static Arnd Bergmann <arnd@arndb.de> - 2016-08-31 12:10 +0200
      Re: [PATCH] phy: mark tegra_xusb_lane_lookup_function() static Kishon Vijay Abraham I <kishon@ti.com> - 2016-09-02 14:20 +0200
    Re: [PATCH] phy: mark tegra_xusb_lane_lookup_function() static Thierry Reding <thierry.reding@gmail.com> - 2016-09-01 13:40 +0200

#1473213 — [PATCH] phy: mark tegra_xusb_lane_lookup_function() static

FromBaoyou Xie <baoyou.xie@linaro.org>
Date2016-08-31 11:10 +0200
Subject[PATCH] phy: mark tegra_xusb_lane_lookup_function() static
Message-ID<sc9GV-uN-15@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1473244

FromArnd Bergmann <arnd@arndb.de>
Date2016-08-31 12:10 +0200
Message-ID<scaD0-13d-7@gated-at.bofh.it>
In reply to#1473213
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

[toc] | [prev] | [next] | [standalone]


#1475088

FromKishon Vijay Abraham I <kishon@ti.com>
Date2016-09-02 14:20 +0200
Message-ID<scVBT-7O6-1@gated-at.bofh.it>
In reply to#1473244
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

[toc] | [prev] | [next] | [standalone]


#1474336

FromThierry Reding <thierry.reding@gmail.com>
Date2016-09-01 13:40 +0200
Message-ID<scyvD-1dR-5@gated-at.bofh.it>
In reply to#1473213

[Multipart message — attachments visible in raw view] — view raw

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>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web