[PATCH 1/2] scsi: qedi: Remove unused sysfs functions
From: linux
Date: Tue Apr 15 2025 - 20:23:01 EST
From: "Dr. David Alan Gilbert" <linux@xxxxxxxxxxx>
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@xxxxxxxxxxx>
---
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