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


Groups > linux.kernel > #1471755 > unrolled thread

[PATCH] mISDN: mark symbols static where possible

Started byBaoyou Xie <baoyou.xie@linaro.org>
First post2016-08-29 14:10 +0200
Last post2016-08-29 14:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] mISDN: mark symbols static where possible Baoyou Xie <baoyou.xie@linaro.org> - 2016-08-29 14:10 +0200
    Re: [PATCH] mISDN: mark symbols static where possible Arnd Bergmann <arnd@arndb.de> - 2016-08-29 14:30 +0200

#1471755 — [PATCH] mISDN: mark symbols static where possible

FromBaoyou Xie <baoyou.xie@linaro.org>
Date2016-08-29 14:10 +0200
Subject[PATCH] mISDN: mark symbols static where possible
Message-ID<sbty1-77M-11@gated-at.bofh.it>
We get 1 warning when biuld kernel with W=1:
drivers/isdn/hardware/mISDN/w6692.c:851:6: warning: no previous prototype for 'initW6692' [-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/isdn/hardware/mISDN/w6692.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/isdn/hardware/mISDN/w6692.c b/drivers/isdn/hardware/mISDN/w6692.c
index 7416755..3b067ea 100644
--- a/drivers/isdn/hardware/mISDN/w6692.c
+++ b/drivers/isdn/hardware/mISDN/w6692.c
@@ -848,7 +848,7 @@ dbusy_timer_handler(struct dchannel *dch)
 	}
 }
 
-void initW6692(struct w6692_hw *card)
+static void initW6692(struct w6692_hw *card)
 {
 	u8	val;
 
-- 
2.7.4

[toc] | [next] | [standalone]


#1471779

FromArnd Bergmann <arnd@arndb.de>
Date2016-08-29 14:30 +0200
Message-ID<sbtRo-7g9-33@gated-at.bofh.it>
In reply to#1471755
On Monday 29 August 2016, Baoyou Xie wrote:
> We get 1 warning when biuld kernel with W=1:
> drivers/isdn/hardware/mISDN/w6692.c:851:6: warning: no previous prototype for 'initW6692' [-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/isdn/hardware/mISDN/w6692.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

The patch looks good, but now you have sent two different patches with the same subject
line. Since this is just one driver and each instance is a trivial change, I'd suggest
doing a single combined patch for them.

Similarly, when you have multiple patches within one subsystem (e.g. two different scsi
drivers), it helps to have a series of patches as you did with the ASoC patches.

	Arnd

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web