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


Groups > linux.kernel > #1475866 > unrolled thread

[PATCH] [SCSI] aacraid: mark aac_src_select_comm() static

Started byBaoyou Xie <baoyou.xie@linaro.org>
First post2016-09-04 08:50 +0200
Last post2016-09-09 13:20 +0200
Articles 4 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] [SCSI] aacraid: mark aac_src_select_comm() static Baoyou Xie <baoyou.xie@linaro.org> - 2016-09-04 08:50 +0200
    Re: [PATCH] [SCSI] aacraid: mark aac_src_select_comm() static Arnd Bergmann <arnd@arndb.de> - 2016-09-05 13:50 +0200
    Re: [PATCH] [SCSI] aacraid: mark aac_src_select_comm() static Arnd Bergmann <arnd@arndb.de> - 2016-09-05 14:00 +0200
    Re: [PATCH] [SCSI] aacraid: mark aac_src_select_comm() static "Martin K. Petersen" <martin.petersen@oracle.com> - 2016-09-09 13:20 +0200

#1475866 — [PATCH] [SCSI] aacraid: mark aac_src_select_comm() static

FromBaoyou Xie <baoyou.xie@linaro.org>
Date2016-09-04 08:50 +0200
Subject[PATCH] [SCSI] aacraid: mark aac_src_select_comm() static
Message-ID<sdzpD-7qA-13@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1476333

FromArnd Bergmann <arnd@arndb.de>
Date2016-09-05 13:50 +0200
Message-ID<se0zv-3bq-9@gated-at.bofh.it>
In reply to#1475866
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>

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


#1476351

FromArnd Bergmann <arnd@arndb.de>
Date2016-09-05 14:00 +0200
Message-ID<se0Jc-3fd-49@gated-at.bofh.it>
In reply to#1475866
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>

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


#1479886

From"Martin K. Petersen" <martin.petersen@oracle.com>
Date2016-09-09 13:20 +0200
Message-ID<sfs0G-27K-35@gated-at.bofh.it>
In reply to#1475866
>>>>> "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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web