All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [SCSI] aacraid: mark aac_src_select_comm() static
@ 2016-09-04  6:47 Baoyou Xie
  2016-09-05 11:49 ` Arnd Bergmann
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Baoyou Xie @ 2016-09-04  6:47 UTC (permalink / raw)
  To: aacraid, jejb, martin.petersen
  Cc: linux-scsi, linux-kernel, arnd, baoyou.xie, xie.baoyou

We get 1 warning when building kernel with W=1:
drivers/scsi/aacraid/src.c:616:5: warning: no previous prototype for 'aac_src_select_comm' [-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 this function with 'static'.

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
---
 drivers/scsi/aacraid/src.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/aacraid/src.c b/drivers/scsi/aacraid/src.c
index 28f8b8a..0c45388 100644
--- a/drivers/scsi/aacraid/src.c
+++ b/drivers/scsi/aacraid/src.c
@@ -613,7 +613,7 @@ static int aac_src_restart_adapter(struct aac_dev *dev, int bled)
  *	@dev: Adapter
  *	@comm: communications method
  */
-int aac_src_select_comm(struct aac_dev *dev, int comm)
+static int aac_src_select_comm(struct aac_dev *dev, int comm)
 {
 	switch (comm) {
 	case AAC_COMM_MESSAGE:
-- 
2.7.4

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

* Re: [PATCH] [SCSI] aacraid: mark aac_src_select_comm() static
  2016-09-04  6:47 [PATCH] [SCSI] aacraid: mark aac_src_select_comm() static Baoyou Xie
@ 2016-09-05 11:49 ` Arnd Bergmann
  2016-09-05 11:50 ` Arnd Bergmann
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2016-09-05 11:49 UTC (permalink / raw)
  To: Baoyou Xie
  Cc: aacraid, jejb, martin.petersen, linux-scsi, linux-kernel, xie.baoyou

On Sunday, September 4, 2016 2:47:10 PM CEST Baoyou Xie wrote:
> We get 1 warning when building kernel with W=1:
> drivers/scsi/aacraid/src.c:616:5: warning: no previous prototype for 'aac_src_select_comm' [-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 this function with 'static'.
> 
> Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
> 

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

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

* Re: [PATCH] [SCSI] aacraid: mark aac_src_select_comm() static
  2016-09-04  6:47 [PATCH] [SCSI] aacraid: mark aac_src_select_comm() static Baoyou Xie
  2016-09-05 11:49 ` Arnd Bergmann
@ 2016-09-05 11:50 ` Arnd Bergmann
  2016-09-07 18:03 ` David Carroll
  2016-09-09 11:09 ` Martin K. Petersen
  3 siblings, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2016-09-05 11:50 UTC (permalink / raw)
  To: Baoyou Xie
  Cc: aacraid, jejb, martin.petersen, linux-scsi, linux-kernel, xie.baoyou

On Sunday, September 4, 2016 2:47:10 PM CEST Baoyou Xie wrote:
> We get 1 warning when building kernel with W=1:
> drivers/scsi/aacraid/src.c:616:5: warning: no previous prototype for 'aac_src_select_comm' [-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 this function with 'static'.
> 
> 

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

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

* RE: [PATCH] [SCSI] aacraid: mark aac_src_select_comm() static
  2016-09-04  6:47 [PATCH] [SCSI] aacraid: mark aac_src_select_comm() static Baoyou Xie
  2016-09-05 11:49 ` Arnd Bergmann
  2016-09-05 11:50 ` Arnd Bergmann
@ 2016-09-07 18:03 ` David Carroll
  2016-09-09 11:09 ` Martin K. Petersen
  3 siblings, 0 replies; 5+ messages in thread
From: David Carroll @ 2016-09-07 18:03 UTC (permalink / raw)
  To: Baoyou Xie, dl-esc-Aacraid Linux Driver, jejb, martin.petersen
  Cc: linux-scsi, linux-kernel, arnd, xie.baoyou

> 
> We get 1 warning when building kernel with W=1:
> drivers/scsi/aacraid/src.c:616:5: warning: no previous prototype for
> 'aac_src_select_comm' [-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 this function with 'static'.
> 
> Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
> ---
>  drivers/scsi/aacraid/src.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Dave Carroll <david.carroll@microsemi.com>

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

* Re: [PATCH] [SCSI] aacraid: mark aac_src_select_comm() static
  2016-09-04  6:47 [PATCH] [SCSI] aacraid: mark aac_src_select_comm() static Baoyou Xie
                   ` (2 preceding siblings ...)
  2016-09-07 18:03 ` David Carroll
@ 2016-09-09 11:09 ` Martin K. Petersen
  3 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2016-09-09 11:09 UTC (permalink / raw)
  To: Baoyou Xie
  Cc: aacraid, jejb, martin.petersen, linux-scsi, linux-kernel, arnd,
	xie.baoyou

>>>>> "Baoyou" == Baoyou Xie <baoyou.xie@linaro.org> writes:

Baoyou> We get 1 warning when building kernel with W=1:
Baoyou> drivers/scsi/aacraid/src.c:616:5: warning: no previous prototype
Baoyou> for 'aac_src_select_comm' [-Wmissing-prototypes]

Applied to 4.9/scsi-queue.

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2016-09-09 11:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-04  6:47 [PATCH] [SCSI] aacraid: mark aac_src_select_comm() static Baoyou Xie
2016-09-05 11:49 ` Arnd Bergmann
2016-09-05 11:50 ` Arnd Bergmann
2016-09-07 18:03 ` David Carroll
2016-09-09 11:09 ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.