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: <CAGOxZ538XeHdsTU-TEroSWapoTsMYFt+4OCsW-ke=_fjsEih0w@mail.gmail.com>
Date:   Sun, 19 Jan 2020 07:23:57 +0530
From:   Alim Akhtar <alim.akhtar@...il.com>
To:     Bean Huo <huobean@...il.com>
Cc:     Alim Akhtar <alim.akhtar@...sung.com>,
        Avri Altman <avri.altman@....com>, asutoshd@...eaurora.org,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        Stanley Chu <stanley.chu@...iatek.com>,
        "Bean Huo (beanhuo)" <beanhuo@...ron.com>,
        Bart Van Assche <bvanassche@....org>,
        Tomas Winkler <tomas.winkler@...el.com>,
        Can Guo <cang@...eaurora.org>, linux-scsi@...r.kernel.org,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 5/8] scsi: ufs: Inline two functions into their callers

On Sun, Jan 19, 2020 at 5:45 AM Bean Huo <huobean@...il.com> wrote:
>
> From: Bean Huo <beanhuo@...ron.com>
>
> Delete ufshcd_read_power_desc() and ufshcd_read_device_desc(), directly
> inline ufshcd_read_desc() into its callers.
>
> Signed-off-by: Bean Huo <beanhuo@...ron.com>
> ---
Reviewed-by: Alim Akhtar <alim.akhtar@...sung.com>

>  drivers/scsi/ufs/ufshcd.c | 17 ++++-------------
>  1 file changed, 4 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index 925b31dc3110..5f3b0ad5135a 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -3146,17 +3146,6 @@ static inline int ufshcd_read_desc(struct ufs_hba *hba,
>         return ufshcd_read_desc_param(hba, desc_id, desc_index, 0, buf, size);
>  }
>
> -static inline int ufshcd_read_power_desc(struct ufs_hba *hba,
> -                                        u8 *buf,
> -                                        u32 size)
> -{
> -       return ufshcd_read_desc(hba, QUERY_DESC_IDN_POWER, 0, buf, size);
> -}
> -
> -static int ufshcd_read_device_desc(struct ufs_hba *hba, u8 *buf, u32 size)
> -{
> -       return ufshcd_read_desc(hba, QUERY_DESC_IDN_DEVICE, 0, buf, size);
> -}
>
>  /**
>   * struct uc_string_id - unicode string
> @@ -6493,7 +6482,8 @@ static void ufshcd_init_icc_levels(struct ufs_hba *hba)
>         if (!desc_buf)
>                 return;
>
> -       ret = ufshcd_read_power_desc(hba, desc_buf, buff_len);
> +       ret = ufshcd_read_desc(hba, QUERY_DESC_IDN_POWER, 0,
> +                       desc_buf, buff_len);
>         if (ret) {
>                 dev_err(hba->dev,
>                         "%s: Failed reading power descriptor.len = %d ret = %d",
> @@ -6599,7 +6589,8 @@ static int ufs_get_device_desc(struct ufs_hba *hba)
>                 goto out;
>         }
>
> -       err = ufshcd_read_device_desc(hba, desc_buf, hba->desc_size.dev_desc);
> +       err = ufshcd_read_desc(hba, QUERY_DESC_IDN_DEVICE, 0, desc_buf,
> +                       hba->desc_size.dev_desc);
>         if (err) {
>                 dev_err(hba->dev, "%s: Failed reading Device Desc. err = %d\n",
>                         __func__, err);
> --
> 2.17.1
>


-- 
Regards,
Alim

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ