scsi: qedi deadcoding
Subsystems (2)
cover scsi: qedi deadcoding
From: "Dr. David Alan Gilbert" <[email protected]>
Hi,
A couple of deadcode patches for the qdi driver.
Build tested only.
Dave
Dr. David Alan Gilbert (2):
scsi: qedi: Remove unused sysfs functions
scsi: qedi: Remove unused qedi_get_proto_itt
drivers/scsi/qedi/qedi_dbg.c | 22 ---------------------- drivers/scsi/qedi/qedi_dbg.h | 12 ------------ drivers/scsi/qedi/qedi_gbl.h | 1 - drivers/scsi/qedi/qedi_main.c | 8 -------- 4 files changed, 43 deletions(-)
Signature · 1 line
2.49.0
PATCH 1/2 scsi: qedi: Remove unused sysfs functions
From: "Dr. David Alan Gilbert" <[email protected]>
qedi_remove_sysfs_attr() and qedi_create_sysfs_attr() were added in 2016 by
commit ace7f46ba5fd ("scsi: qedi: Add QLogic FastLinQ offload iSCSI driver framework.")
but have remained unused.
Remove them.
--- drivers/scsi/qedi/qedi_dbg.c | 22 ---------------------- drivers/scsi/qedi/qedi_dbg.h | 12 ------------ 2 files changed, 34 deletions(-)
drivers/scsi/qedi/qedi_dbg.c +0 -22
@@ -103,25 +103,3 @@ qedi_dbg_info(struct qedi_dbg_ctx *qedi, const char *func, u32 line, ret:va_end (va); } - -int -qedi_create_sysfs_attr (struct Scsi_Host *shost,struct sysfs_bin_attrs *iter) -{ -int ret =0 ; - -for (; iter->name; iter++) { - ret =sysfs_create_bin_file (&shost->shost_gendev.kobj, - iter->attr); -if (ret) -pr_err ("Unable to create sysfs %s attr, err(%d).\n" , - iter->name, ret); - } -return ret; -} - -void -qedi_remove_sysfs_attr (struct Scsi_Host *shost,struct sysfs_bin_attrs *iter) -{ -for (; iter->name; iter++) -sysfs_remove_bin_file (&shost->shost_gendev.kobj, iter->attr); -}
drivers/scsi/qedi/qedi_dbg.h +0 -12
@@ -87,18 +87,6 @@ void qedi_dbg_notice(struct qedi_dbg_ctx *qedi, const char *func, u32 line,void qedi_dbg_info (struct qedi_dbg_ctx *qedi,const char *func,u32 line,u32 info,const char *fmt, ...); -struct Scsi_Host ; - -struct sysfs_bin_attrs { -char *name; -const struct bin_attribute *attr; -}; - -int qedi_create_sysfs_attr (struct Scsi_Host *shost, -struct sysfs_bin_attrs *iter); -void qedi_remove_sysfs_attr (struct Scsi_Host *shost, -struct sysfs_bin_attrs *iter); -/* DebugFS related code */ struct qedi_list_of_funcs {char *oper_str;
Signature · 1 line
2.49.0
PATCH 2/2 scsi: qedi: Remove unused qedi_get_proto_itt
In reply to [email protected]From: "Dr. David Alan Gilbert" <[email protected]>
qedi_get_proto_itt() last use was removed in 2021 by commit ed1b86ba0fba ("scsi: qedi: Wake up if cmd_cleanup_req is set")
Remove it.
--- drivers/scsi/qedi/qedi_gbl.h | 1 - drivers/scsi/qedi/qedi_main.c | 8 -------- 2 files changed, 9 deletions(-)
drivers/scsi/qedi/qedi_gbl.h +0 -1
@@ -45,7 +45,6 @@ int qedi_iscsi_cleanup_task(struct iscsi_task *task,void qedi_iscsi_unmap_sg_list (struct qedi_cmd *cmd);void qedi_update_itt_map (struct qedi_ctx *qedi,u32 tid,u32 proto_itt,struct qedi_cmd *qedi_cmd); -void qedi_get_proto_itt (struct qedi_ctx *qedi,u32 tid,u32 *proto_itt);void qedi_get_task_tid (struct qedi_ctx *qedi,u32 itt,int16_t *tid);void qedi_process_iscsi_error (struct qedi_endpoint *ep,struct iscsi_eqe_data *data);
drivers/scsi/qedi/qedi_main.c +0 -8
@@ -1877,14 +1877,6 @@ void qedi_get_task_tid(struct qedi_ctx *qedi, u32 itt, s16 *tid)WARN_ON (1 ); } -void qedi_get_proto_itt (struct qedi_ctx *qedi,u32 tid,u32 *proto_itt) -{ - *proto_itt = qedi->itt_map[tid].itt; -QEDI_INFO (&qedi->dbg_ctx,QEDI_LOG_CONN , -"Get itt map tid [0x%x with proto itt[0x%x]" , - tid, *proto_itt); -} -struct qedi_cmd *qedi_get_cmd_from_tid (struct qedi_ctx *qedi,u32 tid) {struct qedi_cmd *cmd =NULL ;
Signature · 1 line
2.49.0
Martin K. Petersen
AppliedQuoted 4 lines
A couple of deadcode patches for the qdi driver.
Build tested only.
Applied to 6.16/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen
Martin K. Petersen
AppliedQuoted 8 lines · On Wed, 16 Apr 2025 01:22:33 +0100, [email protected] wrote:
A couple of deadcode patches for the qdi driver.
Build tested only.
Dave
Signed-off-by Dr. David Alan Gilbert <[email protected]>[...]
Applied to 6.16/scsi-queue, thanks!
[1/2] scsi: qedi: Remove unused sysfs functions
https://git.kernel.org/mkp/scsi/c/918eb0682157 [2/2] scsi: qedi: Remove unused qedi_get_proto_itt https://git.kernel.org/mkp/scsi/c/0d16b70cdbfc
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering