mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Suzuki K Poulose <suzuki.poulose@arm.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>,
	Linux PM <linux-pm@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Brian Norris <briannorris@chromium.org>,
	Mike Leach <mike.leach@linaro.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>
Subject: Re: [PATCH v1 17/23] coresight: Discard pm_runtime_put() return values
Date: Tue, 23 Dec 2025 09:53:27 +0000	[thread overview]
Message-ID: <a4f9b322-befd-4727-b4a0-9894685dea76@arm.com> (raw)
In-Reply-To: <2058657.yKVeVyVuyW@rafael.j.wysocki>

On 22/12/2025 20:25, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> Failing a debugfs write due to pm_runtime_put() returning a negative
> value is not particularly useful.
>   
> Returning an error code from pm_runtime_put() merely means that it has
> not queued up a work item to check whether or not the device can be
> suspended and there are many perfectly valid situations in which that
> can happen, like after writing "on" to the devices' runtime PM "control"
> attribute in sysfs for one example.  It also happens when the kernel
> has been configured with CONFIG_PM unset, in which case
> debug_disable_func() in the coresight driver will always return an
> error.
> 
> For this reason, update debug_disable_func() to simply discard the
> return value of pm_runtime_put(), change its return type to void, and
> propagate that change to debug_func_knob_write().
> 
> This will facilitate a planned change of the pm_runtime_put() return
> type to void in the future.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
> 
> This patch is part of a series, but it doesn't depend on anything else
> in that series.  The last patch in the series depends on it.
> 
> It can be applied by itself and if you decide to do so, please let me
> know.
> 
> Otherwise, an ACK or equivalent will be appreciated, but also the lack
> of specific criticism will be eventually regarded as consent.


Happy for you to pick it with your series.

Acked-by: Suzuki K Poulose <suzuki.poulose@arm.com>


> 
> ---
>   drivers/hwtracing/coresight/coresight-cpu-debug.c |   12 ++++--------
>   1 file changed, 4 insertions(+), 8 deletions(-)
> 
> --- a/drivers/hwtracing/coresight/coresight-cpu-debug.c
> +++ b/drivers/hwtracing/coresight/coresight-cpu-debug.c
> @@ -451,10 +451,10 @@ err:
>   	return ret;
>   }
>   
> -static int debug_disable_func(void)
> +static void debug_disable_func(void)
>   {
>   	struct debug_drvdata *drvdata;
> -	int cpu, ret, err = 0;
> +	int cpu;
>   
>   	/*
>   	 * Disable debug power domains, records the error and keep
> @@ -466,12 +466,8 @@ static int debug_disable_func(void)
>   		if (!drvdata)
>   			continue;
>   
> -		ret = pm_runtime_put(drvdata->dev);
> -		if (ret < 0)
> -			err = ret;
> +		pm_runtime_put(drvdata->dev);
>   	}
> -
> -	return err;
>   }
>   
>   static ssize_t debug_func_knob_write(struct file *f,
> @@ -492,7 +488,7 @@ static ssize_t debug_func_knob_write(str
>   	if (val)
>   		ret = debug_enable_func();
>   	else
> -		ret = debug_disable_func();
> +		debug_disable_func();
>   
>   	if (ret) {
>   		pr_err("%s: unable to %s debug function: %d\n",
> 
> 
> 


  reply	other threads:[~2025-12-23  9:53 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-22 19:48 [PATCH v1 00/23] PM: runtime: Convert pm_runtime_put() to a void function Rafael J. Wysocki
2025-12-22 19:50 ` [PATCH v1 01/23] genirq/chip: Change irq_chip_pm_put() return type to void Rafael J. Wysocki
2026-01-08 21:35   ` Thomas Gleixner
2025-12-22 19:52 ` [PATCH v1 02/23] USB: core: Discard pm_runtime_put() return value Rafael J. Wysocki
2025-12-22 20:57   ` Alan Stern
2025-12-23  7:56   ` Greg Kroah-Hartman
2025-12-22 19:57 ` [PATCH v1 03/23] drm: " Rafael J. Wysocki
2025-12-23 10:23   ` Dave Stevenson
2025-12-23 15:57   ` Liviu Dudau
2025-12-22 19:59 ` [PATCH v1 04/23] drm/imagination: " Rafael J. Wysocki
2026-01-05 12:29   ` Matt Coster
2025-12-22 20:01 ` [PATCH v1 05/23] media: rkisp1: " Rafael J. Wysocki
2025-12-23 16:30   ` Laurent Pinchart
2025-12-22 20:03 ` [PATCH v1 06/23] media: ccs: " Rafael J. Wysocki
2026-01-07 18:51   ` Sakari Ailus
2025-12-22 20:06 ` [PATCH v1 07/23] media: mediatek: vcodec: " Rafael J. Wysocki
2025-12-22 20:07 ` [PATCH v1 08/23] watchdog: rz: Discard pm_runtime_put() return values Rafael J. Wysocki
2025-12-28 19:14   ` Guenter Roeck
2025-12-22 20:09 ` [PATCH v1 09/23] watchdog: rzv2h_wdt: Discard pm_runtime_put() return value Rafael J. Wysocki
2025-12-28 19:15   ` Guenter Roeck
2025-12-22 20:11 ` [PATCH v1 10/23] net: ethernet: ti: am65-cpsw: " Rafael J. Wysocki
2026-01-02 23:53   ` Jakub Kicinski
2026-01-03 21:34     ` Rafael J. Wysocki
2025-12-22 20:14 ` [PATCH v1 11/23] net: cadence: macb: " Rafael J. Wysocki
2025-12-23  8:48   ` Nicolas Ferre
2025-12-22 20:16 ` [PATCH v1 12/23] net: wan: framer: Discard pm_runtime_put() return values Rafael J. Wysocki
2025-12-22 20:18 ` [PATCH v1 13/23] phy: freescale: Discard pm_runtime_put() return value Rafael J. Wysocki
2025-12-22 20:21 ` [PATCH v1 14/23] phy: rockchip-samsung-dcphy: " Rafael J. Wysocki
2025-12-22 20:22 ` [PATCH v1 15/23] phy: core: Discard pm_runtime_put() return values Rafael J. Wysocki
2025-12-30 10:34   ` Geert Uytterhoeven
2025-12-30 10:54     ` Geert Uytterhoeven
2025-12-30 15:05       ` Geert Uytterhoeven
2025-12-30 16:18         ` Rafael J. Wysocki
2025-12-30 16:17       ` Rafael J. Wysocki
2025-12-22 20:24 ` [PATCH v1 16/23] hwspinlock: omap: Discard pm_runtime_put() return value Rafael J. Wysocki
2025-12-22 20:46   ` Bjorn Andersson
2025-12-22 20:25 ` [PATCH v1 17/23] coresight: Discard pm_runtime_put() return values Rafael J. Wysocki
2025-12-23  9:53   ` Suzuki K Poulose [this message]
2025-12-22 20:27 ` [PATCH v1 18/23] platform/chrome: cros_hps_i2c: Discard pm_runtime_put() return value Rafael J. Wysocki
2025-12-23  3:56   ` Tzung-Bi Shih
2025-12-22 20:29 ` [PATCH v1 19/23] pmdomain: imx: gpcv2: " Rafael J. Wysocki
2025-12-23 13:02   ` Peng Fan
2025-12-28 15:51   ` Ulf Hansson
2026-02-19 14:07     ` Rafael J. Wysocki
2026-02-20 16:05       ` Ulf Hansson
2026-02-20 16:58         ` Rafael J. Wysocki
2026-02-20 17:23           ` Rafael J. Wysocki
2026-02-21 11:24             ` Rafael J. Wysocki
2026-02-23 11:03           ` Ulf Hansson
2026-02-23 13:03             ` Rafael J. Wysocki
2025-12-22 20:31 ` [PATCH v1 20/23] scsi: ufs: core: Discard pm_runtime_put() return values Rafael J. Wysocki
2025-12-23 15:29   ` Bart Van Assche
2026-01-04 20:21   ` Martin K. Petersen
2025-12-22 20:33 ` [PATCH v1 21/23] dmaengine: sh: Discard pm_runtime_put() return value Rafael J. Wysocki
2025-12-22 20:35 ` [PATCH v1 22/23] ASoC: rockchip: " Rafael J. Wysocki
2025-12-22 20:36 ` [PATCH v1 23/23] PM: runtime: Change pm_runtime_put() return type to void Rafael J. Wysocki
2025-12-28 15:51   ` Ulf Hansson
2026-01-05 21:31   ` Brian Norris
2025-12-23 11:28 ` (subset) [PATCH v1 00/23] PM: runtime: Convert pm_runtime_put() to a void function Vinod Koul
2025-12-23 17:07 ` Mark Brown
2025-12-23 17:44 ` Vinod Koul
2026-01-03 21:23 ` [PATCH v2 1/3] net: Discard pm_runtime_put() return value Rafael J. Wysocki
2026-01-03 21:26   ` [PATCH v2 1/3] net: ethernet: ti: am65-cpsw: " Rafael J. Wysocki
2026-01-03 21:27   ` [PATCH v2 2/3] net: cadence: macb: " Rafael J. Wysocki
2026-01-03 21:29   ` [PATCH v2 3/3] net: wan: framer: Discard pm_runtime_put() return values Rafael J. Wysocki
2026-01-07  0:29   ` [PATCH v2 1/3] net: Discard pm_runtime_put() return value Jakub Kicinski
2026-01-07 12:41     ` Rafael J. Wysocki
2026-01-07 12:31 ` [RESEND][PATCH v2 0/3] " Rafael J. Wysocki
2026-01-07 12:34   ` [RESEND][PATCH v2 1/3] net: ethernet: ti: am65-cpsw: " Rafael J. Wysocki
2026-01-07 12:35   ` [RESEND][PATCH v2 2/3] net: cadence: macb: " Rafael J. Wysocki
2026-01-07 12:37   ` [RESEND][PATCH v2 3/3] net: wan: framer: Discard pm_runtime_put() return values Rafael J. Wysocki
2026-01-08 14:06   ` [RESEND][PATCH v2 0/3] net: Discard pm_runtime_put() return value Rafael J. Wysocki
2026-01-08 16:16     ` Jakub Kicinski
2026-01-08 16:20   ` patchwork-bot+netdevbpf

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=a4f9b322-befd-4727-b4a0-9894685dea76@arm.com \
    --to=suzuki.poulose@arm.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=briannorris@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mike.leach@linaro.org \
    --cc=rafael@kernel.org \
    --cc=ulf.hansson@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®