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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJZ5v0jVgb3dzqUj5QLgxcJacOxGWqJm4BvyO081cHBpV63XRg@mail.gmail.com>
Date:   Sat, 24 Sep 2022 18:52:15 +0200
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     cgel.zte@...il.com
Cc:     "Rafael J. Wysocki" <rafael@...nel.org>,
        Len Brown <lenb@...nel.org>, James Morse <james.morse@....com>,
        Tony Luck <tony.luck@...el.com>,
        Borislav Petkov <bp@...en8.de>,
        Kees Cook <keescook@...omium.org>,
        Anton Vorontsov <anton@...msg.org>,
        Colin Cross <ccross@...roid.com>,
        Jakob Koschel <jakobkoschel@...il.com>,
        Xiang wangx <wangxiang@...rlc.com>,
        ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        ye xingchen <ye.xingchen@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH linux-next v2] ACPI: APEI: Remove the unneeded result variable

On Wed, Sep 21, 2022 at 11:28 AM <cgel.zte@...il.com> wrote:
>
> From: ye xingchen <ye.xingchen@....com.cn>
>
> Return the value erst_get_record_id_begin() and apei_exec_write_register()
>  directly instead of storing it in another redundant variable.
>
> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: ye xingchen <ye.xingchen@....com.cn>
> ---
> v1 -> v2
> combine the patchs in APEI.
>  drivers/acpi/apei/apei-base.c | 5 +----
>  drivers/acpi/apei/erst.c      | 6 +-----
>  2 files changed, 2 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/acpi/apei/apei-base.c b/drivers/acpi/apei/apei-base.c
> index 9f49272cad39..9b52482b4ed5 100644
> --- a/drivers/acpi/apei/apei-base.c
> +++ b/drivers/acpi/apei/apei-base.c
> @@ -125,12 +125,9 @@ EXPORT_SYMBOL_GPL(apei_exec_write_register);
>  int apei_exec_write_register_value(struct apei_exec_context *ctx,
>                                    struct acpi_whea_header *entry)
>  {
> -       int rc;
> -
>         ctx->value = entry->value;
> -       rc = apei_exec_write_register(ctx, entry);
>
> -       return rc;
> +       return apei_exec_write_register(ctx, entry);
>  }
>  EXPORT_SYMBOL_GPL(apei_exec_write_register_value);
>
> diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c
> index 31b077eedb58..247989060e29 100644
> --- a/drivers/acpi/apei/erst.c
> +++ b/drivers/acpi/apei/erst.c
> @@ -1020,14 +1020,10 @@ static int reader_pos;
>
>  static int erst_open_pstore(struct pstore_info *psi)
>  {
> -       int rc;
> -
>         if (erst_disable)
>                 return -ENODEV;
>
> -       rc = erst_get_record_id_begin(&reader_pos);
> -
> -       return rc;
> +       return erst_get_record_id_begin(&reader_pos);
>  }
>
>  static int erst_close_pstore(struct pstore_info *psi)
> --

Applied as 6.1 material with some edits in the subject and changelog, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ