Skip to contentSkip to conversation

scsi: qla2xxx: Change qla_trim_buf,__qla_adjust_buf functions to static

PATCH Applied Tom Rix 2 participants 3 messages Jan 14, 2023 – Jan 27, 2023

Subsystems (2)
lore
Share & tools
lore

Tom Rix

author
#0 lore raw

PATCH 1/1 scsi: qla2xxx: Change qla_trim_buf,__qla_adjust_buf functions to static

Smatch reports
drivers/scsi/qla2xxx/qla_mid.c:1189:6: warning: symbol 'qla_trim_buf' was not declared. Should it be static? drivers/scsi/qla2xxx/qla_mid.c:1221:6: warning: symbol '__qla_adjust_buf' was not declared. Should it be static?

These functions are only used in qla_mid.c, so they should be static.

Fixes 1f8f9c34127e ("scsi: qla2xxx: edif: Reduce memory usage during low I/O")
---
 drivers/scsi/qla2xxx/qla_mid.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/qla2xxx/qla_mid.c +2 -2
index c6ca39b8e23d..bd6bc1a968b2 100644
@@ -1186,7 +1186,7 @@ int qla_get_buf(struct scsi_qla_host *vha, struct qla_qpair *qp, struct qla_buf_
 	return 0;
 }
 
-void qla_trim_buf(struct qla_qpair *qp, u16 trim)
+static void qla_trim_buf(struct qla_qpair *qp, u16 trim)
 {
 	int i, j;
 	struct qla_hw_data *ha = qp->vha->hw;
@@ -1218,7 +1218,7 @@ void qla_trim_buf(struct qla_qpair *qp, u16 trim)
 	       qp->id, trim, qp->buf_pool.num_alloc);
 }
 
-void __qla_adjust_buf(struct qla_qpair *qp)
+static void __qla_adjust_buf(struct qla_qpair *qp)
 {
 	u32 trim;
 
Signature · 1 line
2.27.0
#1 lore raw

Tom,

Quoted 5 lines

Smatch reports
drivers/scsi/qla2xxx/qla_mid.c:1189:6: warning: symbol 'qla_trim_buf' was not declared. Should it be static? drivers/scsi/qla2xxx/qla_mid.c:1221:6: warning: symbol '__qla_adjust_buf' was not declared. Should it be static?

These functions are only used in qla_mid.c, so they should be static.

Applied to 6.3/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#2 lore raw
In reply to Tom Rix
Quoted 8 lines · Tom Rix

Smatch reports
drivers/scsi/qla2xxx/qla_mid.c:1189:6: warning: symbol 'qla_trim_buf' was not declared. Should it be static? drivers/scsi/qla2xxx/qla_mid.c:1221:6: warning: symbol '__qla_adjust_buf' was not declared. Should it be static?

These functions are only used in qla_mid.c, so they should be static.

[...]

Applied to 6.3/scsi-queue, thanks!

[1/1] scsi: qla2xxx: Change qla_trim_buf,__qla_adjust_buf functions to static

      https://git.kernel.org/mkp/scsi/c/54c51253b3d5
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering