[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <SN6PR04MB46402C75D4CBDA85A3628BB5FC8E0@SN6PR04MB4640.namprd04.prod.outlook.com>
Date: Thu, 28 May 2020 13:41:11 +0000
From: Avri Altman <Avri.Altman@....com>
To: Bean Huo <huobean@...il.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
>
> From: Bean Huo <beanhuo@...ron.com>
>
> For the UFS device, the maximum descriptor size is 255, max_t called in
> ufs_get_device_desc() is useless.
>
> Signed-off-by: Bean Huo <beanhuo@...ron.com>
Acked-by: Avri Altman <avri.altman@....com>
> ---
> drivers/scsi/ufs/ufshcd.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index aca50ed39844..0f8c7e05df29 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ 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.
Powered by blists - more mailing lists