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]
Date:   Wed, 26 Apr 2023 12:51:52 +0000
From:   Avri Altman <Avri.Altman@....com>
To:     "keosung.park@...sung.com" <keosung.park@...sung.com>,
        ALIM AKHTAR <alim.akhtar@...sung.com>,
        "bvanassche@....org" <bvanassche@....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>,
        "quic_asutoshd@...cinc.com" <quic_asutoshd@...cinc.com>,
        "beanhuo@...ron.com" <beanhuo@...ron.com>,
        "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] scsi: ufs: core: Simplify param_set_mcq_mode()

> This function does not require the "ret" variable because it returns
> only the result of param_set_bool().
> 
> Remove unnecessary "ret" variable and simplify the code.
> 
> Signed-off-by: Keoseong Park <keosung.park@...sung.com>
Reviewed-by: Avri Altman <avri.altman@....com>

> ---
>  drivers/ufs/core/ufshcd.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index 9434328ba323..46c4ed478ad0 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -108,13 +108,7 @@ static bool is_mcq_supported(struct ufs_hba *hba)
> 
>  static int param_set_mcq_mode(const char *val, const struct kernel_param
> *kp)
>  {
> -       int ret;
> -
> -       ret = param_set_bool(val, kp);
> -       if (ret)
> -               return ret;
> -
> -       return 0;
> +       return param_set_bool(val, kp);
>  }
> 
>  static const struct kernel_param_ops mcq_mode_ops = {
> --
> 2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ