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: <CAHp75VesGPg28bDhsXCuuQGNuwedhivY9Dd+FLWUSMeWpvhrjQ@mail.gmail.com>
Date:	Fri, 22 Apr 2016 02:01:53 +0300
From:	Andy Shevchenko <andy.shevchenko@...il.com>
To:	Giedrius Statkevičius 
	<giedrius.statkevicius@...il.com>
Cc:	Corentin Chary <corentin.chary@...il.com>,
	"dvhart@...radead.org" <dvhart@...radead.org>,
	acpi4asus-user@...ts.sourceforge.net,
	platform-driver-x86@...r.kernel.org,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 1/2] asus-laptop: remove redundant initializers

On Sat, Apr 16, 2016 at 3:01 AM, Giedrius Statkevičius
<giedrius.statkevicius@...il.com> wrote:
> Initializing rv to AE_OK is pointless because later function results are
> assigned to them and only then the variable is used
>
> Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@...il.com>

Fine to me:
Acked-by: Andy Shevchenko <andy.shevchenko@...il.com>

> ---
>  drivers/platform/x86/asus-laptop.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
> index f2b5d0a..d86d42e 100644
> --- a/drivers/platform/x86/asus-laptop.c
> +++ b/drivers/platform/x86/asus-laptop.c
> @@ -771,7 +771,7 @@ static int asus_read_brightness(struct backlight_device *bd)
>  {
>         struct asus_laptop *asus = bl_get_data(bd);
>         unsigned long long value;
> -       acpi_status rv = AE_OK;
> +       acpi_status rv;
>
>         rv = acpi_evaluate_integer(asus->handle, METHOD_BRIGHTNESS_GET,
>                                    NULL, &value);
> @@ -865,7 +865,7 @@ static ssize_t infos_show(struct device *dev, struct device_attribute *attr,
>         int len = 0;
>         unsigned long long temp;
>         char buf[16];           /* enough for all info */
> -       acpi_status rv = AE_OK;
> +       acpi_status rv;
>
>         /*
>          * We use the easy way, we don't care of off and count,
> @@ -1265,7 +1265,7 @@ static DEVICE_ATTR_RO(ls_value);
>  static int asus_gps_status(struct asus_laptop *asus)
>  {
>         unsigned long long status;
> -       acpi_status rv = AE_OK;
> +       acpi_status rv;
>
>         rv = acpi_evaluate_integer(asus->handle, METHOD_GPS_STATUS,
>                                    NULL, &status);
> --
> 2.8.0
>



-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ