> > +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.

Reply via email to