Re: [PATCH] scsi: ufs: Split struct ufs_hba

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/1/22 20:13, Keoseong Park wrote:
diff --git a/drivers/ufs/core/ufs-debugfs.c b/drivers/ufs/core/ufs-debugfs.c
index e3baed6c70bd..12ff7bdf84aa 100644
--- a/drivers/ufs/core/ufs-debugfs.c
+++ b/drivers/ufs/core/ufs-debugfs.c
@@ -34,7 +34,8 @@ void ufs_debugfs_exit(void)
static int ufs_debugfs_stats_show(struct seq_file *s, void *data)
{
         struct ufs_hba *hba = hba_from_file(s->file);
-        struct ufs_event_hist *e = hba->ufs_stats.event;
+        struct ufs_hba_priv *priv = container_of(hba, typeof(*priv), hba);

How about functionalizing container_of in ufshcd-priv.h like below?

static inline struct ufs_hba_priv *hba_to_hba_priv(struct ufs_hba *hba)
{
         return container_of(hba, struct ufs_hba_priv, hba);
}

I think it will be easy to understand.

Hi Keoseong,

That's an interesting suggestion. I will look into this.

Thanks,

Bart.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux