lkml.org 
[lkml]   [2020]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH v2 1/3] scsi: ufs: remove max_t in ufs_get_device_desc
From
Date
On Thu, 2020-05-28 at 13:41 +0000, Avri Altman wrote:
> > +++ b/drivers/scsi/ufs/ufshcd.c
> > @@ -6881,8 +6881,7 @@ static int ufs_get_device_desc(struct ufs_hba
> > *hba)
> > u8 *desc_buf;
> > struct ufs_dev_info *dev_info = &hba->dev_info;
> >
> > - buff_len = max_t(size_t, hba->desc_size.dev_desc,
> > - QUERY_DESC_MAX_SIZE + 1);
> > + buff_len = QUERY_DESC_MAX_SIZE + 1;
>
> So why the +1?
> Originally it was used for the '\0' terminator, which is not needed
> anymore.

you are correct, now not need +1, I will change it.

thanks,

Bean

\
 
 \ /
  Last update: 2020-05-28 15:49    [W:0.075 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site