From: Daejun Park <daejun7.park@samsung.com>
To: Bart Van Assche <bvanassche@acm.org>,
Daejun Park <daejun7.park@samsung.com>,
"avri.altman@wdc.com" <avri.altman@wdc.com>,
"jejb@linux.ibm.com" <jejb@linux.ibm.com>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
"asutoshd@codeaurora.org" <asutoshd@codeaurora.org>,
"beanhuo@micron.com" <beanhuo@micron.com>,
"stanley.chu@mediatek.com" <stanley.chu@mediatek.com>,
"cang@codeaurora.org" <cang@codeaurora.org>,
"tomas.winkler@intel.com" <tomas.winkler@intel.com>,
ALIM AKHTAR <alim.akhtar@samsung.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Sang-yoon Oh <sangyoon.oh@samsung.com>,
Sung-Jun Park <sungjun07.park@samsung.com>,
yongmyung lee <ymhungry.lee@samsung.com>,
Jinyoung CHOI <j-young.choi@samsung.com>,
Adel Choi <adel.choi@samsung.com>,
BoRam Shin <boram.shin@samsung.com>
Subject: Re: [PATCH v8 3/4] scsi: ufs: L2P map management for HPB read
Date: Thu, 13 Aug 2020 12:13:43 +0900 [thread overview]
Message-ID: <336371513.41597288683542.JavaMail.epsvc@epcpadp2> (raw)
In-Reply-To: <86a04d4f-bb6f-9bc8-cb64-a50b0ed2fdb7@acm.org>
On 2020-08-06 02:15, Daejun Park wrote:
> > + req->end_io_data = (void *)map_req;
>
> Please leave the (void *) cast out since explicit casts from a non-void
> to a void pointer are not necessary in C.
OK, I will fix it.
> > +static inline struct
> > +ufshpb_rsp_field *ufshpb_get_hpb_rsp(struct ufshcd_lrb *lrbp)
> > +{
> > + return (struct ufshpb_rsp_field *)&lrbp->ucd_rsp_ptr->sr.sense_data_len;
> > +}
>
> Please introduce a union in struct utp_cmd_rsp instead of using casts
> to reinterpret a part of a data structure.
OK. I will introduce a union in struct utp_cmd_rsp and use it.
> > +/* routine : isr (ufs) */
>
> The above comment looks very cryptic. Should it perhaps be expanded?
>
> > +struct ufshpb_active_field {
> > + __be16 active_rgn;
> > + __be16 active_srgn;
> > +} __packed;
>
> Since "__packed" is not necessary for the above data structure, please
> remove it. Note: a typical approach in the Linux kernel to verify that
> the compiler has not inserted any padding bytes is to add a BUILD_BUG_ON()
> statement in an initialization function that verifies the size of ABI data
> structures. See also the output of the following command:
>
> git grep -nH 'BUILD_BUG_ON.sizeof.*!='
OK, I didn't know about it. Thanks.
> > +struct ufshpb_rsp_field {
> > + __be16 sense_data_len;
> > + u8 desc_type;
> > + u8 additional_len;
> > + u8 hpb_type;
> > + u8 reserved;
> > + u8 active_rgn_cnt;
> > + u8 inactive_rgn_cnt;
> > + struct ufshpb_active_field hpb_active_field[2];
> > + __be16 hpb_inactive_field[2];
> > +} __packed;
>
> I think the above __packed statement should also be left out.
OK, I will remove it.
Thanks,
Daejun
next prev parent reply other threads:[~2020-08-13 3:18 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20200806073257epcms2p61564ed62e02fc42fc3c2b18fa92a038d@epcms2p6>
2020-08-06 7:32 ` [PATCH v8 0/4] scsi: ufs: Add Host Performance Booster Support Daejun Park
2020-08-06 9:02 ` [PATCH v8 1/4] scsi: ufs: Add UFS feature related parameter Daejun Park
2020-08-06 9:11 ` [PATCH v8 2/4] scsi: ufs: Introduce HPB feature Daejun Park
2020-08-06 9:15 ` [PATCH v8 3/4] scsi: ufs: L2P map management for HPB read Daejun Park
2020-08-06 9:18 ` [PATCH v8 4/4] scsi: ufs: Prepare HPB read for cached sub-region Daejun Park
2020-08-09 0:35 ` Bart Van Assche
2020-08-13 3:15 ` Daejun Park
2020-08-09 0:29 ` [PATCH v8 3/4] scsi: ufs: L2P map management for HPB read Bart Van Assche
2020-08-13 3:13 ` Daejun Park [this message]
2020-08-08 22:56 ` [PATCH v8 2/4] scsi: ufs: Introduce HPB feature Bart Van Assche
2020-08-13 2:13 ` Daejun Park
2020-08-09 0:07 ` Bart Van Assche
2020-08-13 3:00 ` Daejun Park
2020-08-13 3:22 ` Bart Van Assche
2020-08-08 23:00 ` [PATCH v8 1/4] scsi: ufs: Add UFS feature related parameter Bart Van Assche
2020-08-13 2:16 ` Daejun Park
2020-08-06 9:52 ` [PATCH v8 0/4] scsi: ufs: Add Host Performance Booster Support Bean Huo
2020-08-06 9:56 ` Avri Altman
2020-08-06 10:02 ` Bean Huo
2020-08-06 10:12 ` Avri Altman
2020-08-06 10:28 ` Bean Huo
2020-08-06 13:56 ` Avri Altman
2020-08-06 16:36 ` Alim Akhtar
2020-08-06 18:39 ` Bart Van Assche
2020-08-06 23:15 ` Daejun Park
2020-08-07 4:32 ` Martin K. Petersen
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=336371513.41597288683542.JavaMail.epsvc@epcpadp2 \
--to=daejun7.park@samsung.com \
--cc=adel.choi@samsung.com \
--cc=alim.akhtar@samsung.com \
--cc=asutoshd@codeaurora.org \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=boram.shin@samsung.com \
--cc=bvanassche@acm.org \
--cc=cang@codeaurora.org \
--cc=j-young.choi@samsung.com \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=sangyoon.oh@samsung.com \
--cc=stanley.chu@mediatek.com \
--cc=sungjun07.park@samsung.com \
--cc=tomas.winkler@intel.com \
--cc=ymhungry.lee@samsung.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.