[07/17] scsi: qlogicpti: mark qlogicpti_info() static

Message ID 20230810141947.1236730-8-arnd@kernel.org
State New
Headers
Series -Wmissing-prototype warning fixes |

Commit Message

Arnd Bergmann Aug. 10, 2023, 2:19 p.m. UTC
  From: Arnd Bergmann <arnd@arndb.de>

The qlogicpti_info() function is only used in this file and should
be static to avoid a warning:

drivers/scsi/qlogicpti.c:846:13: error: no previous prototype for 'qlogicpti_info' [-Werror=missing-prototypes]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/scsi/qlogicpti.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Jinpu Wang Aug. 10, 2023, 2:27 p.m. UTC | #1
On Thu, Aug 10, 2023 at 4:22 PM Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> The qlogicpti_info() function is only used in this file and should
> be static to avoid a warning:
>
> drivers/scsi/qlogicpti.c:846:13: error: no previous prototype for 'qlogicpti_info' [-Werror=missing-prototypes]
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
lgtm
Reviewed-by: Jack Wang <jinpu.wang@ionos.com>
> ---
>  drivers/scsi/qlogicpti.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
> index f88a5421c483f..3b95f7a6216fe 100644
> --- a/drivers/scsi/qlogicpti.c
> +++ b/drivers/scsi/qlogicpti.c
> @@ -843,7 +843,7 @@ static int qpti_map_queues(struct qlogicpti *qpti)
>         return 0;
>  }
>
> -const char *qlogicpti_info(struct Scsi_Host *host)
> +static const char *qlogicpti_info(struct Scsi_Host *host)
>  {
>         static char buf[80];
>         struct qlogicpti *qpti = (struct qlogicpti *) host->hostdata;
> --
> 2.39.2
>
  

Patch

diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
index f88a5421c483f..3b95f7a6216fe 100644
--- a/drivers/scsi/qlogicpti.c
+++ b/drivers/scsi/qlogicpti.c
@@ -843,7 +843,7 @@  static int qpti_map_queues(struct qlogicpti *qpti)
 	return 0;
 }
 
-const char *qlogicpti_info(struct Scsi_Host *host)
+static const char *qlogicpti_info(struct Scsi_Host *host)
 {
 	static char buf[80];
 	struct qlogicpti *qpti = (struct qlogicpti *) host->hostdata;