lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9a317a138c61c7937b655dbd73ffcb40985d61c8.camel@gmail.com>
Date:   Thu, 28 May 2020 15:47:36 +0200
From:   Bean Huo <huobean@...il.com>
To:     Avri Altman <Avri.Altman@....com>,
        "alim.akhtar@...sung.com" <alim.akhtar@...sung.com>,
        "asutoshd@...eaurora.org" <asutoshd@...eaurora.org>,
        "jejb@...ux.ibm.com" <jejb@...ux.ibm.com>,
        "martin.petersen@...cle.com" <martin.petersen@...cle.com>,
        "stanley.chu@...iatek.com" <stanley.chu@...iatek.com>,
        "beanhuo@...ron.com" <beanhuo@...ron.com>,
        "bvanassche@....org" <bvanassche@....org>,
        "tomas.winkler@...el.com" <tomas.winkler@...el.com>,
        "cang@...eaurora.org" <cang@...eaurora.org>
Cc:     "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 1/3] scsi: ufs: remove max_t in ufs_get_device_desc

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ