public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] scsi: qedi deadcoding
@ 2025-04-16  0:22 linux
  2025-04-16  0:22 ` [PATCH 1/2] scsi: qedi: Remove unused sysfs functions linux
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: linux @ 2025-04-16  0:22 UTC (permalink / raw)
  To: njavali, mrangankar, GR-QLogic-Storage-Upstream, James.Bottomley,
	martin.petersen
  Cc: linux-scsi, linux-kernel, Dr. David Alan Gilbert

From: "Dr. David Alan Gilbert" <linux@treblig.org>

Hi,
  A couple of deadcode patches for the qdi driver.

Build tested only.

Dave
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>


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(-)

-- 
2.49.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] scsi: qedi: Remove unused sysfs functions
  2025-04-16  0:22 [PATCH 0/2] scsi: qedi deadcoding linux
@ 2025-04-16  0:22 ` linux
  2025-04-16  0:22 ` [PATCH 2/2] scsi: qedi: Remove unused qedi_get_proto_itt linux
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: linux @ 2025-04-16  0:22 UTC (permalink / raw)
  To: njavali, mrangankar, GR-QLogic-Storage-Upstream, James.Bottomley,
	martin.petersen
  Cc: linux-scsi, linux-kernel, Dr. David Alan Gilbert

From: "Dr. David Alan Gilbert" <linux@treblig.org>

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.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
---
 drivers/scsi/qedi/qedi_dbg.c | 22 ----------------------
 drivers/scsi/qedi/qedi_dbg.h | 12 ------------
 2 files changed, 34 deletions(-)

diff --git a/drivers/scsi/qedi/qedi_dbg.c b/drivers/scsi/qedi/qedi_dbg.c
index 2ebef4d20b5b..2f3e044b818f 100644
--- a/drivers/scsi/qedi/qedi_dbg.c
+++ b/drivers/scsi/qedi/qedi_dbg.c
@@ -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);
-}
diff --git a/drivers/scsi/qedi/qedi_dbg.h b/drivers/scsi/qedi/qedi_dbg.h
index 5a1ec4542183..864951865869 100644
--- a/drivers/scsi/qedi/qedi_dbg.h
+++ b/drivers/scsi/qedi/qedi_dbg.h
@@ -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;
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] scsi: qedi: Remove unused qedi_get_proto_itt
  2025-04-16  0:22 [PATCH 0/2] scsi: qedi deadcoding linux
  2025-04-16  0:22 ` [PATCH 1/2] scsi: qedi: Remove unused sysfs functions linux
@ 2025-04-16  0:22 ` linux
  2025-04-22  1:53 ` [PATCH 0/2] scsi: qedi deadcoding Martin K. Petersen
  2025-04-29  2:08 ` Martin K. Petersen
  3 siblings, 0 replies; 5+ messages in thread
From: linux @ 2025-04-16  0:22 UTC (permalink / raw)
  To: njavali, mrangankar, GR-QLogic-Storage-Upstream, James.Bottomley,
	martin.petersen
  Cc: linux-scsi, linux-kernel, Dr. David Alan Gilbert

From: "Dr. David Alan Gilbert" <linux@treblig.org>

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.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
---
 drivers/scsi/qedi/qedi_gbl.h  | 1 -
 drivers/scsi/qedi/qedi_main.c | 8 --------
 2 files changed, 9 deletions(-)

diff --git a/drivers/scsi/qedi/qedi_gbl.h b/drivers/scsi/qedi/qedi_gbl.h
index 772218445a56..5e10441f2e22 100644
--- a/drivers/scsi/qedi/qedi_gbl.h
+++ b/drivers/scsi/qedi/qedi_gbl.h
@@ -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);
diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c
index e87885cc701c..b168bb2178e9 100644
--- a/drivers/scsi/qedi/qedi_main.c
+++ b/drivers/scsi/qedi/qedi_main.c
@@ -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;
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] scsi: qedi deadcoding
  2025-04-16  0:22 [PATCH 0/2] scsi: qedi deadcoding linux
  2025-04-16  0:22 ` [PATCH 1/2] scsi: qedi: Remove unused sysfs functions linux
  2025-04-16  0:22 ` [PATCH 2/2] scsi: qedi: Remove unused qedi_get_proto_itt linux
@ 2025-04-22  1:53 ` Martin K. Petersen
  2025-04-29  2:08 ` Martin K. Petersen
  3 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2025-04-22  1:53 UTC (permalink / raw)
  To: linux
  Cc: njavali, mrangankar, GR-QLogic-Storage-Upstream, James.Bottomley,
	martin.petersen, linux-scsi, linux-kernel


>   A couple of deadcode patches for the qdi driver.
>
> Build tested only.

Applied to 6.16/scsi-staging, thanks!

-- 
Martin K. Petersen

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] scsi: qedi deadcoding
  2025-04-16  0:22 [PATCH 0/2] scsi: qedi deadcoding linux
                   ` (2 preceding siblings ...)
  2025-04-22  1:53 ` [PATCH 0/2] scsi: qedi deadcoding Martin K. Petersen
@ 2025-04-29  2:08 ` Martin K. Petersen
  3 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2025-04-29  2:08 UTC (permalink / raw)
  To: njavali, mrangankar, GR-QLogic-Storage-Upstream, James.Bottomley,
	linux
  Cc: Martin K . Petersen, linux-scsi, linux-kernel

On Wed, 16 Apr 2025 01:22:33 +0100, linux@treblig.org wrote:

>   A couple of deadcode patches for the qdi driver.
> 
> Build tested only.
> 
> Dave
> Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
> 
> [...]

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

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-04-29  2:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-16  0:22 [PATCH 0/2] scsi: qedi deadcoding linux
2025-04-16  0:22 ` [PATCH 1/2] scsi: qedi: Remove unused sysfs functions linux
2025-04-16  0:22 ` [PATCH 2/2] scsi: qedi: Remove unused qedi_get_proto_itt linux
2025-04-22  1:53 ` [PATCH 0/2] scsi: qedi deadcoding Martin K. Petersen
2025-04-29  2:08 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox