All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: "Giedrius Statkevičius" <giedrius.statkevicius@gmail.com>
Cc: Corentin Chary <corentin.chary@gmail.com>,
	"dvhart@infradead.org" <dvhart@infradead.org>,
	acpi4asus-user@lists.sourceforge.net,
	platform-driver-x86@vger.kernel.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] asus-laptop: remove redundant initializers
Date: Fri, 22 Apr 2016 02:01:53 +0300	[thread overview]
Message-ID: <CAHp75VesGPg28bDhsXCuuQGNuwedhivY9Dd+FLWUSMeWpvhrjQ@mail.gmail.com> (raw)
In-Reply-To: <1460764917-1042-1-git-send-email-giedrius.statkevicius@gmail.com>

On Sat, Apr 16, 2016 at 3:01 AM, Giedrius Statkevičius
<giedrius.statkevicius@gmail.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@gmail.com>

Fine to me:
Acked-by: Andy Shevchenko <andy.shevchenko@gmail.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

      parent reply	other threads:[~2016-04-21 23:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-16  0:01 [PATCH v2 1/2] asus-laptop: remove redundant initializers Giedrius Statkevičius
2016-04-16  0:01 ` [PATCH v2 2/2] asus-laptop: correct error handling in sysfs_acpi_set Giedrius Statkevičius
2016-04-20 20:19   ` Darren Hart
2016-04-21  6:35     ` Giedrius Statkevičius
2016-04-21 20:34   ` Andy Shevchenko
2016-04-21 20:59     ` Darren Hart
2016-04-25 17:47   ` Darren Hart
2016-04-21 23:01 ` Andy Shevchenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHp75VesGPg28bDhsXCuuQGNuwedhivY9Dd+FLWUSMeWpvhrjQ@mail.gmail.com \
    --to=andy.shevchenko@gmail.com \
    --cc=acpi4asus-user@lists.sourceforge.net \
    --cc=corentin.chary@gmail.com \
    --cc=dvhart@infradead.org \
    --cc=giedrius.statkevicius@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.