Skip to contentSkip to conversation

Declare local functions static

PATCH Applied Bart Van Assche 3 participants 8 messages Jun 3, 2024 – Jun 12, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover Declare local functions static

Hi Martin,

There are several 32-bit ARM SCSI drivers that trigger compiler warnings about missing function declarations. This patch series fixes these compiler warnings by declaring local functions static. Please consider this patch series for the next merge window.

Thanks,

Bart.

Bart Van Assche (4):
scsi: acornscsi: Declare local functions static
scsi: cumana: Declare local functions static
scsi: eesox: Declare local functions static
scsi: powertec: Declare local functions static

 drivers/scsi/arm/acornscsi.c | 9 ++++-----
 drivers/scsi/arm/cumana_2.c  | 2 +-
 drivers/scsi/arm/eesox.c     | 2 +-
 drivers/scsi/arm/powertec.c  | 2 +-
 4 files changed, 7 insertions(+), 8 deletions(-)
#1 lore raw

PATCH 1/4 scsi: acornscsi: Declare local functions static

---
 drivers/scsi/arm/acornscsi.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/scsi/arm/acornscsi.c +4 -5
index 0b046e4b395c..e50a3dbf9de3 100644
@@ -2450,7 +2450,7 @@ static int acornscsi_queuecmd_lck(struct scsi_cmnd *SCpnt)
     return 0;
 }
 
-DEF_SCSI_QCMD(acornscsi_queuecmd)
+static DEF_SCSI_QCMD(acornscsi_queuecmd)
 
 enum res_abort { res_not_running, res_success, res_success_clear, res_snooze };
 
@@ -2552,7 +2552,7 @@ static enum res_abort acornscsi_do_abort(AS_Host *host, struct scsi_cmnd *SCpnt)
  * Params   : SCpnt - command to abort
  * Returns  : one of SCSI_ABORT_ macros
  */
-int acornscsi_abort(struct scsi_cmnd *SCpnt)
+static int acornscsi_abort(struct scsi_cmnd *SCpnt)
 {
 	AS_Host *host = (AS_Host *) SCpnt->device->host->hostdata;
 	int result;
@@ -2634,7 +2634,7 @@ int acornscsi_abort(struct scsi_cmnd *SCpnt)
  * Params   : SCpnt  - command causing reset
  * Returns  : one of SCSI_RESET_ macros
  */
-int acornscsi_host_reset(struct scsi_cmnd *SCpnt)
+static int acornscsi_host_reset(struct scsi_cmnd *SCpnt)
 {
 	AS_Host *host = (AS_Host *)SCpnt->device->host->hostdata;
 	struct scsi_cmnd *SCptr;
@@ -2679,8 +2679,7 @@ int acornscsi_host_reset(struct scsi_cmnd *SCpnt)
  * Params  : host - host to give information on
  * Returns : a constant string
  */
-const
-char *acornscsi_info(struct Scsi_Host *host)
+static const char *acornscsi_info(struct Scsi_Host *host)
 {
     static char string[100], *p;
 
#2 lore raw

PATCH 2/4 scsi: cumana: Declare local functions static

In reply to Bart Van Assche
---
 drivers/scsi/arm/cumana_2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/arm/cumana_2.c +1 -1
index c5d8f4313b31..e460068f6834 100644
@@ -296,7 +296,7 @@ cumanascsi_2_dma_stop(struct Scsi_Host *host, struct scsi_pointer *SCp)
  * Params   : host - driver host structure to return info for.
  * Returns  : pointer to a static buffer containing null terminated string.
  */
-const char *cumanascsi_2_info(struct Scsi_Host *host)
+static const char *cumanascsi_2_info(struct Scsi_Host *host)
 {
 	struct cumanascsi2_info *info = (struct cumanascsi2_info *)host->hostdata;
 	static char string[150];
#3 lore raw

PATCH 3/4 scsi: eesox: Declare local functions static

In reply to Bart Van Assche
---
 drivers/scsi/arm/eesox.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/arm/eesox.c +1 -1
index b3ec7635bc72..99be9da8757f 100644
@@ -381,7 +381,7 @@ eesoxscsi_dma_stop(struct Scsi_Host *host, struct scsi_pointer *SCp)
  * Params   : host - driver host structure to return info for.
  * Returns  : pointer to a static buffer containing null terminated string.
  */
-const char *eesoxscsi_info(struct Scsi_Host *host)
+static const char *eesoxscsi_info(struct Scsi_Host *host)
 {
 	struct eesoxscsi_info *info = (struct eesoxscsi_info *)host->hostdata;
 	static char string[150];
#4 lore raw

PATCH 4/4 scsi: powertec: Declare local functions static

In reply to Bart Van Assche
---
 drivers/scsi/arm/powertec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/arm/powertec.c +1 -1
index 3b5991427886..823c65ff6c12 100644
@@ -184,7 +184,7 @@ powertecscsi_dma_stop(struct Scsi_Host *host, struct scsi_pointer *SCp)
  * Params   : host - driver host structure to return info for.
  * Returns  : pointer to a static buffer containing null terminated string.
  */
-const char *powertecscsi_info(struct Scsi_Host *host)
+static const char *powertecscsi_info(struct Scsi_Host *host)
 {
 	struct powertec_info *info = (struct powertec_info *)host->hostdata;
 	static char string[150];
Reviewed-by on the v1 series
#5 lore raw
In reply to Bart Van Assche
Quoted 17 lines · Bart Van Assche

Hi Martin,

There are several 32-bit ARM SCSI drivers that trigger compiler warnings about missing function declarations. This patch series fixes these compiler warnings by declaring local functions static. Please consider this patch series for the next merge window.

Thanks,

Bart.

Bart Van Assche (4):
scsi: acornscsi: Declare local functions static
scsi: cumana: Declare local functions static
scsi: eesox: Declare local functions static
scsi: powertec: Declare local functions static

Quoted 8 lines
  drivers/scsi/arm/acornscsi.c | 9 ++++-----
  drivers/scsi/arm/cumana_2.c  | 2 +-
  drivers/scsi/arm/eesox.c     | 2 +-
  drivers/scsi/arm/powertec.c  | 2 +-
  4 files changed, 7 insertions(+), 8 deletions(-)

For the series,

#6 lore raw
In reply to Bart Van Assche

Bart,

Quoted 4 lines

There are several 32-bit ARM SCSI drivers that trigger compiler warnings about missing function declarations. This patch series fixes these compiler warnings by declaring local functions static. Please consider this patch series for the next merge window.

Applied to 6.11/scsi-staging, thanks!

Martin

#7 lore raw
In reply to Bart Van Assche
Quoted 8 lines · Bart Van Assche

There are several 32-bit ARM SCSI drivers that trigger compiler warnings about missing function declarations. This patch series fixes these compiler warnings by declaring local functions static. Please consider this patch series for the next merge window.

Thanks,

[...]

Applied to 6.11/scsi-queue, thanks!

[1/4] scsi: acornscsi: Declare local functions static

      https://git.kernel.org/mkp/scsi/c/f5a954bbf2f4
[2/4] scsi: cumana: Declare local functions static
      https://git.kernel.org/mkp/scsi/c/1414045725a0
[3/4] scsi: eesox: Declare local functions static
      https://git.kernel.org/mkp/scsi/c/1dc98be41814
[4/4] scsi: powertec: Declare local functions static
      https://git.kernel.org/mkp/scsi/c/daf613331c93
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering