> >  out:
> >         return 0;
> >  }
> > -
> 
> nit: This blank should be here.
Done.

> 
> >  static int ufs_bsg_request(struct bsg_job *job)
> >  {
> >         struct ufs_bsg_request *bsg_request = job->request;
> > @@ -140,6 +137,12 @@ static int ufs_bsg_request(struct bsg_job *job)
> >         if (!desc_buff)
> >                 goto out;
> >
> > +       if (desc_len)
> > +               bsg_reply->reply_payload_rcv_len =
> > +                       sg_copy_from_buffer(job->request_payload.sg_list,
> > +                                           job->request_payload.sg_cnt,
> > +                                           desc_buff, desc_len);
> > +
> 
> So you copy the buffer to request_payload even if it was a write
> request? I guess that should be okay? I just expected to see a check
> of desc_op mirroring the one you had for the read case in
> ufs_bsg_alloc_desc_buffer.
The desc_len is being update  in ufshcd.c: to the actual size that was read,
And to 0 in the case of write descriptor.
But I will add this check anyway here  as it indeed improves the readability of 
the code.

Thanks,
Avri

Reply via email to