From: Keoseong Park <keosung.park@samsung.com>
To: Bart Van Assche <bvanassche@acm.org>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
cpgsproxy2 <cpgsproxy2@samsung.com>,
cpgsproxy3 <cpgsproxy3@samsung.com>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
Avri Altman <avri.altman@wdc.com>, Bean Huo <beanhuo@micron.com>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Keoseong Park <keosung.park@samsung.com>,
Eric Biggers <ebiggers@google.com>
Subject: RE: [PATCH] scsi: ufs: Split struct ufs_hba
Date: Thu, 02 Jun 2022 12:13:30 +0900 [thread overview]
Message-ID: <1891546521.01654139701937.JavaMail.epsvc@epcpadp3> (raw)
In-Reply-To: CGME20220531035501epcas2p33ef286ea964e39f45a0696edf2d8ae32@epcms2p3
Hi Bart,
>Improve separation between UFSHCI core and host drivers by splitting
>struct ufs_hba. This patch does not change the behavior of the UFS
>driver. The conversions between the struct ufs_hba and the struct
>ufs_hba_priv pointer types do not introduce any overhead since the
>compiler can optimize these out.
>
>Cc: Adrian Hunter <adrian.hunter@intel.com>
>Cc: Avri Altman <avri.altman@wdc.com>
>Cc: Bean Huo <beanhuo@micron.com>
>Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
>Cc: Keoseong Park <keosung.park@samsung.com>
>Cc: Eric Biggers <ebiggers@google.com>
>Signed-off-by: Bart Van Assche <bvanassche@acm.org>
>---
> drivers/ufs/core/ufs-debugfs.c | 79 +-
> drivers/ufs/core/ufs-hwmon.c | 42 +-
> drivers/ufs/core/ufs-sysfs.c | 141 ++-
> drivers/ufs/core/ufs_bsg.c | 14 +-
> drivers/ufs/core/ufshcd-crypto.c | 49 +-
> drivers/ufs/core/ufshcd-priv.h | 229 +++-
> drivers/ufs/core/ufshcd.c | 1782 ++++++++++++++++--------------
> drivers/ufs/core/ufshpb.c | 40 +-
> include/ufs/ufshcd.h | 175 +--
> 9 files changed, 1409 insertions(+), 1142 deletions(-)
>
>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.
Best Regards,
Keoseong Park
>+ struct ufs_event_hist *e = priv->ufs_stats.event;
>
> #define PRT(fmt, typ) \
> seq_printf(s, fmt, e[UFS_EVT_ ## typ].cnt)
>
next parent reply other threads:[~2022-06-02 3:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20220531035501epcas2p33ef286ea964e39f45a0696edf2d8ae32@epcms2p3>
2022-06-02 3:13 ` Keoseong Park [this message]
2022-06-03 5:14 ` [PATCH] scsi: ufs: Split struct ufs_hba Bart Van Assche
2022-05-31 3:54 Bart Van Assche
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=1891546521.01654139701937.JavaMail.epsvc@epcpadp3 \
--to=keosung.park@samsung.com \
--cc=adrian.hunter@intel.com \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=bjorn.andersson@linaro.org \
--cc=bvanassche@acm.org \
--cc=cpgsproxy2@samsung.com \
--cc=cpgsproxy3@samsung.com \
--cc=ebiggers@google.com \
--cc=jaegeuk@kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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