> > +static inline struct ufs_hba *dev_to_ufs_hba(struct device *d)
> > +{
> > + struct Scsi_Host *shost = dev_to_shost(d->parent);
> > +
> > + return shost_priv(shost);
>
> This just has one caller that culd directly do:
>
> struct ufs_hba *hba = shost_priv(dev_to_shost(job->dev-parent));
Done.
> > + if (qr->opcode == UPIU_QUERY_OPCODE_WRITE_DESC) {
> > + rw = WRITE;
> > + desc_buff = ((uint8_t *)bsg_request) +
> > + sizeof(struct ufs_bsg_request);
>
> desc_buff = bsg_request + 1;
Done.
>
> > + }
> > + }
> > +
> > + req_upiu = (struct utp_upiu_req *)&bsg_request->header;
> > + rsp_upiu = (struct utp_upiu_req *)&bsg_reply->header;
>
> Why do we define the bsg_request/reply separately from struct
> utp_upiu_req
> instead of moving struct utp_upiu_req to the UAPI header and including
> it?
Done.
Bart told me to that a while ago, but somehow it slipped away.
Will do that now.
- [PATCH v5 3/6] scsi: ufs: Add ufs-bsg module Avri Altman
- Re: [PATCH v5 3/6] scsi: ufs: Add ufs-bsg module Bart Van Assche
- Re: [PATCH v5 3/6] scsi: ufs: Add ufs-bsg module Christoph Hellwig
- [PATCH v5 4/6] scsi: ufs: Add API to execute raw upiu co... Avri Altman
- Re: [PATCH v5 4/6] scsi: ufs: Add API to execute ra... Christoph Hellwig
- RE: [PATCH v5 4/6] scsi: ufs: Add API to execut... Avri Altman
- Re: [PATCH v5 4/6] scsi: ufs: Add API to ex... Christoph Hellwig
- [PATCH v5 5/6] scsi: ufs-bsg: Add support for raw upiu i... Avri Altman
- Re: [PATCH v5 5/6] scsi: ufs-bsg: Add support for r... Christoph Hellwig
- RE: [PATCH v5 5/6] scsi: ufs-bsg: Add support f... Avri Altman
- [PATCH v5 6/6] scsi: ufs-bsg: Add support for uic comman... Avri Altman

