From: Bart Van Assche <bvanassche@acm.org>
To: "Martin K . Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, Bart Van Assche <bvanassche@acm.org>,
"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
Peter Wang <peter.wang@mediatek.com>,
Avri Altman <avri.altman@wdc.com>, Huan Tang <tanghuan@vivo.com>,
Zhongqiu Han <zhongqiu.han@oss.qualcomm.com>,
Gwendal Grignou <gwendal@chromium.org>,
"Bao D. Nguyen" <quic_nguyenb@quicinc.com>,
Liu Song <liu.song13@zte.com.cn>, Daniel Lee <chullee@google.com>,
Bean Huo <huobean@gmail.com>,
Manivannan Sadhasivam <mani@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>
Subject: [PATCH 1/2] ufs: core: Change the ufs_sysfs_{add,remove}_nodes() argument type
Date: Mon, 27 Oct 2025 10:09:29 -0700 [thread overview]
Message-ID: <20251027170950.2919594-2-bvanassche@acm.org> (raw)
In-Reply-To: <20251027170950.2919594-1-bvanassche@acm.org>
Prepare for adding code that accesses a struct ufs_hba member. No
functionality has been changed.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
drivers/ufs/core/ufs-sysfs.c | 7 ++++---
drivers/ufs/core/ufs-sysfs.h | 5 +++--
drivers/ufs/core/ufshcd.c | 4 ++--
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/ufs/core/ufs-sysfs.c b/drivers/ufs/core/ufs-sysfs.c
index c040afc6668e..7150c15287d1 100644
--- a/drivers/ufs/core/ufs-sysfs.c
+++ b/drivers/ufs/core/ufs-sysfs.c
@@ -2089,8 +2089,9 @@ const struct attribute_group ufs_sysfs_lun_attributes_group = {
.attrs = ufs_sysfs_lun_attributes,
};
-void ufs_sysfs_add_nodes(struct device *dev)
+void ufs_sysfs_add_nodes(struct ufs_hba *hba)
{
+ struct device *dev = hba->dev;
int ret;
ret = sysfs_create_groups(&dev->kobj, ufs_sysfs_groups);
@@ -2100,7 +2101,7 @@ void ufs_sysfs_add_nodes(struct device *dev)
__func__, ret);
}
-void ufs_sysfs_remove_nodes(struct device *dev)
+void ufs_sysfs_remove_nodes(struct ufs_hba *hba)
{
- sysfs_remove_groups(&dev->kobj, ufs_sysfs_groups);
+ sysfs_remove_groups(&hba->dev->kobj, ufs_sysfs_groups);
}
diff --git a/drivers/ufs/core/ufs-sysfs.h b/drivers/ufs/core/ufs-sysfs.h
index 6efb82a082fd..c9e3751c6793 100644
--- a/drivers/ufs/core/ufs-sysfs.h
+++ b/drivers/ufs/core/ufs-sysfs.h
@@ -8,9 +8,10 @@
#include <linux/sysfs.h>
struct device;
+struct ufs_hba;
-void ufs_sysfs_add_nodes(struct device *dev);
-void ufs_sysfs_remove_nodes(struct device *dev);
+void ufs_sysfs_add_nodes(struct ufs_hba *hba);
+void ufs_sysfs_remove_nodes(struct ufs_hba *hba);
extern const struct attribute_group ufs_sysfs_unit_descriptor_group;
extern const struct attribute_group ufs_sysfs_lun_attributes_group;
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index 5d6297aa5c28..9521aa38211c 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -10429,7 +10429,7 @@ void ufshcd_remove(struct ufs_hba *hba)
ufshcd_rpm_get_sync(hba);
ufs_hwmon_remove(hba);
ufs_bsg_remove(hba);
- ufs_sysfs_remove_nodes(hba->dev);
+ ufs_sysfs_remove_nodes(hba);
cancel_delayed_work_sync(&hba->ufs_rtc_update_work);
blk_mq_destroy_queue(hba->tmf_queue);
blk_put_queue(hba->tmf_queue);
@@ -10887,7 +10887,7 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)
if (err)
goto out_disable;
- ufs_sysfs_add_nodes(hba->dev);
+ ufs_sysfs_add_nodes(hba);
async_schedule(ufshcd_async_scan, hba);
device_enable_async_suspend(dev);
next prev parent reply other threads:[~2025-10-27 17:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-27 17:09 [PATCH 0/2] Two additional UFS fixes for this rc cycle Bart Van Assche
2025-10-27 17:09 ` Bart Van Assche [this message]
2025-10-27 17:09 ` [PATCH 2/2] ufs: core: Really fix the code for updating the "hid" attribute group Bart Van Assche
2025-10-28 3:03 ` Bjorn Andersson
2025-10-28 12:47 ` Peter Wang (王信友)
2025-10-28 13:33 ` Bart Van Assche
2025-10-28 13:57 ` Bart Van Assche
2025-10-28 14:50 ` Bjorn Andersson
2025-10-28 20:21 ` Bart Van Assche
2025-10-28 9:51 ` Neil Armstrong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251027170950.2919594-2-bvanassche@acm.org \
--to=bvanassche@acm.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=adrian.hunter@intel.com \
--cc=avri.altman@wdc.com \
--cc=chullee@google.com \
--cc=gwendal@chromium.org \
--cc=huobean@gmail.com \
--cc=linux-scsi@vger.kernel.org \
--cc=liu.song13@zte.com.cn \
--cc=mani@kernel.org \
--cc=martin.petersen@oracle.com \
--cc=peter.wang@mediatek.com \
--cc=quic_nguyenb@quicinc.com \
--cc=tanghuan@vivo.com \
--cc=zhongqiu.han@oss.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox