All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Dhruva Gole <d-gole@ti.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	 Adrian Hunter <adrian.hunter@intel.com>,
	Tony Lindgren <tony@atomide.com>,
	 Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
	 Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	 theo.lebrun@bootlin.com, linux-pm@vger.kernel.org,
	 linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org
Subject: Re: [PATCH 2/3] PM: wakeup: Remove unnecessary else from device_init_wakeup
Date: Mon, 18 Mar 2024 14:52:02 +0100	[thread overview]
Message-ID: <CAJZ5v0hP0TR1zVc1hNMw+SnqCw7hJUcFM-J5Y6Mtgh-tnrrdEw@mail.gmail.com> (raw)
In-Reply-To: <20240318055054.1564696-3-d-gole@ti.com>

On Mon, Mar 18, 2024 at 6:55 AM Dhruva Gole <d-gole@ti.com> wrote:
>
> Checkpatch warns that else is generally not necessary after a return
> condition which exists in the if part of this function. Hence, just to
> abide by what checkpatch recommends, follow it's guidelines.
>
> Signed-off-by: Dhruva Gole <d-gole@ti.com>
> ---
>  include/linux/pm_wakeup.h | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/include/linux/pm_wakeup.h b/include/linux/pm_wakeup.h
> index 428803eed798..76cd1f9f1365 100644
> --- a/include/linux/pm_wakeup.h
> +++ b/include/linux/pm_wakeup.h
> @@ -234,11 +234,10 @@ static inline int device_init_wakeup(struct device *dev, bool enable)
>         if (enable) {
>                 device_set_wakeup_capable(dev, true);
>                 return device_wakeup_enable(dev);
> -       } else {
> -               device_wakeup_disable(dev);
> -               device_set_wakeup_capable(dev, false);
> -               return 0;
>         }
> +       device_wakeup_disable(dev);
> +       device_set_wakeup_capable(dev, false);
> +       return 0;
>  }
>
>  #endif /* _LINUX_PM_WAKEUP_H */
> --

This one is fine with me, but not 6.9-rc material.

Thanks!

  reply	other threads:[~2024-03-18 13:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-18  5:50 [PATCH 0/3] PM: wakeup: make device_wakeup_disable return void Dhruva Gole
2024-03-18  5:50 ` [PATCH 1/3] " Dhruva Gole
2024-03-18 13:47   ` Rafael J. Wysocki
2024-03-18 15:19     ` Dhruva Gole
2024-03-18  5:50 ` [PATCH 2/3] PM: wakeup: Remove unnecessary else from device_init_wakeup Dhruva Gole
2024-03-18 13:52   ` Rafael J. Wysocki [this message]
2024-03-18 15:18     ` Dhruva Gole
2024-03-18  5:50 ` [PATCH 3/3] mmc: sdhci-pci: Use device_set_wakeup_enable for en/disable wakeups Dhruva Gole
2024-03-18 13:50   ` Rafael J. Wysocki

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=CAJZ5v0hP0TR1zVc1hNMw+SnqCw7hJUcFM-J5Y6Mtgh-tnrrdEw@mail.gmail.com \
    --to=rafael@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=d-gole@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=theo.lebrun@bootlin.com \
    --cc=tony@atomide.com \
    --cc=ulf.hansson@linaro.org \
    --cc=viresh.kumar@linaro.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.