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] [day] [month] [year] [list]
Message-ID: <CAJZ5v0iUuYvfBHxrJzQsix=PS3NBCckokfsVizNy3miKM7yxYQ@mail.gmail.com>
Date:   Mon, 11 Dec 2023 22:07:14 +0100
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Li zeming <zeming@...china.com>
Cc:     rafael@...nel.org, pavel@....cz, len.brown@...el.com,
        linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] power: swap: Assign a value when removing the 'error' definition

On Fri, Oct 27, 2023 at 3:56 AM Li zeming <zeming@...china.com> wrote:
>
> 'error' first receives the function result before it is used, and it
> does not need to be assigned a value during definition.
>
> Signed-off-by: Li zeming <zeming@...china.com>
> ---
>  kernel/power/swap.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/power/swap.c b/kernel/power/swap.c
> index 74edbce2320ba..90bb583c57bf7 100644
> --- a/kernel/power/swap.c
> +++ b/kernel/power/swap.c
> @@ -450,7 +450,7 @@ static int get_swap_writer(struct swap_map_handle *handle)
>  static int swap_write_page(struct swap_map_handle *handle, void *buf,
>                 struct hib_bio_batch *hb)
>  {
> -       int error = 0;
> +       int error;
>         sector_t offset;
>
>         if (!handle->cur)
> --

Applied as 6.8 material under a rewritten subject.

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ