mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: "Olivia Mackall" <olivia@selenic.com>,
	"Herbert Xu" <herbert@gondor.apana.org.au>,
	"Nicolas Ferre" <nicolas.ferre@microchip.com>,
	"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
	"Claudiu Beznea" <claudiu.beznea@tuxon.dev>,
	"Hadar Gat" <hadar.gat@arm.com>,
	"Sean Wang" <sean.wang@mediatek.com>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@collabora.com>,
	"Avi Fishman" <avifishman70@gmail.com>,
	"Tomer Maimon" <tmaimon77@gmail.com>,
	"Tali Perry" <tali.perry1@gmail.com>,
	"Patrick Venture" <venture@google.com>,
	"Nancy Yuen" <yuenn@google.com>,
	"Benjamin Fair" <benjaminfair@google.com>,
	"Daniel Golle" <daniel@makrotopia.org>,
	"Aurelien Jarno" <aurelien@aurel32.net>,
	"Nicolas Frattaroli" <nicolas.frattaroli@collabora.com>,
	"Heiko Stuebner" <heiko@sntech.de>,
	"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
	"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
	"Sakari Ailus" <sakari.ailus@linux.intel.com>,
	"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
	"Marek Vasut" <marex@denx.de>,
	"Gatien Chevallier" <gatien.chevallier@foss.st.com>
Cc: linux-crypto@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
	openbmc@lists.ozlabs.org, linux-rockchip@lists.infradead.org,
	linux-stm32@st-md-mailman.stormreply.com
Subject: [PATCH 05/80] hwrng: Remove redundant pm_runtime_mark_last_busy() calls
Date: Fri,  4 Jul 2025 10:53:59 +0300	[thread overview]
Message-ID: <20250704075359.3217036-1-sakari.ailus@linux.intel.com> (raw)
In-Reply-To: <20250704075225.3212486-1-sakari.ailus@linux.intel.com>

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
The cover letter of the set can be found here
<URL:https://lore.kernel.org/linux-pm/20250704075225.3212486-1-sakari.ailus@linux.intel.com>.

In brief, this patch depends on PM runtime patches adding marking the last
busy timestamp in autosuspend related functions. The patches are here, on
rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1

 drivers/char/hw_random/atmel-rng.c     | 1 -
 drivers/char/hw_random/cctrng.c        | 1 -
 drivers/char/hw_random/mtk-rng.c       | 1 -
 drivers/char/hw_random/npcm-rng.c      | 1 -
 drivers/char/hw_random/omap3-rom-rng.c | 1 -
 drivers/char/hw_random/rockchip-rng.c  | 3 ---
 drivers/char/hw_random/stm32-rng.c     | 1 -
 7 files changed, 9 deletions(-)

diff --git a/drivers/char/hw_random/atmel-rng.c b/drivers/char/hw_random/atmel-rng.c
index d2b00458761e..6ed24be3481d 100644
--- a/drivers/char/hw_random/atmel-rng.c
+++ b/drivers/char/hw_random/atmel-rng.c
@@ -80,7 +80,6 @@ static int atmel_trng_read(struct hwrng *rng, void *buf, size_t max,
 	ret = 4;
 
 out:
-	pm_runtime_mark_last_busy(trng->dev);
 	pm_runtime_put_sync_autosuspend(trng->dev);
 	return ret;
 }
diff --git a/drivers/char/hw_random/cctrng.c b/drivers/char/hw_random/cctrng.c
index 4db198849695..a5be9258037f 100644
--- a/drivers/char/hw_random/cctrng.c
+++ b/drivers/char/hw_random/cctrng.c
@@ -98,7 +98,6 @@ static void cc_trng_pm_put_suspend(struct device *dev)
 {
 	int rc = 0;
 
-	pm_runtime_mark_last_busy(dev);
 	rc = pm_runtime_put_autosuspend(dev);
 	if (rc)
 		dev_err(dev, "pm_runtime_put_autosuspend returned %x\n", rc);
diff --git a/drivers/char/hw_random/mtk-rng.c b/drivers/char/hw_random/mtk-rng.c
index b7fa1bc1122b..c89171df7635 100644
--- a/drivers/char/hw_random/mtk-rng.c
+++ b/drivers/char/hw_random/mtk-rng.c
@@ -98,7 +98,6 @@ static int mtk_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
 		max -= sizeof(u32);
 	}
 
-	pm_runtime_mark_last_busy(priv->dev);
 	pm_runtime_put_sync_autosuspend(priv->dev);
 
 	return retval || !wait ? retval : -EIO;
diff --git a/drivers/char/hw_random/npcm-rng.c b/drivers/char/hw_random/npcm-rng.c
index 3e308c890bd2..40d6e29dea03 100644
--- a/drivers/char/hw_random/npcm-rng.c
+++ b/drivers/char/hw_random/npcm-rng.c
@@ -80,7 +80,6 @@ static int npcm_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
 		max--;
 	}
 
-	pm_runtime_mark_last_busy(priv->dev);
 	pm_runtime_put_sync_autosuspend(priv->dev);
 
 	return retval || !wait ? retval : -EIO;
diff --git a/drivers/char/hw_random/omap3-rom-rng.c b/drivers/char/hw_random/omap3-rom-rng.c
index 8064c792caf0..aa71f61c3dc9 100644
--- a/drivers/char/hw_random/omap3-rom-rng.c
+++ b/drivers/char/hw_random/omap3-rom-rng.c
@@ -56,7 +56,6 @@ static int omap3_rom_rng_read(struct hwrng *rng, void *data, size_t max, bool w)
 	else
 		r = 4;
 
-	pm_runtime_mark_last_busy(ddata->dev);
 	pm_runtime_put_autosuspend(ddata->dev);
 
 	return r;
diff --git a/drivers/char/hw_random/rockchip-rng.c b/drivers/char/hw_random/rockchip-rng.c
index fb4a30b95507..6e3ed4b85605 100644
--- a/drivers/char/hw_random/rockchip-rng.c
+++ b/drivers/char/hw_random/rockchip-rng.c
@@ -223,7 +223,6 @@ static int rk3568_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
 	/* Read random data stored in the registers */
 	memcpy_fromio(buf, rk_rng->base + TRNG_RNG_DOUT, to_read);
 out:
-	pm_runtime_mark_last_busy(rk_rng->dev);
 	pm_runtime_put_sync_autosuspend(rk_rng->dev);
 
 	return (ret < 0) ? ret : to_read;
@@ -263,7 +262,6 @@ static int rk3576_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
 	memcpy_fromio(buf, rk_rng->base + RKRNG_TRNG_DATA0, to_read);
 
 out:
-	pm_runtime_mark_last_busy(rk_rng->dev);
 	pm_runtime_put_sync_autosuspend(rk_rng->dev);
 
 	return (ret < 0) ? ret : to_read;
@@ -355,7 +353,6 @@ static int rk3588_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
 	/* close the TRNG */
 	rk_rng_writel(rk_rng, TRNG_V1_CTRL_NOP, TRNG_V1_CTRL);
 
-	pm_runtime_mark_last_busy(rk_rng->dev);
 	pm_runtime_put_sync_autosuspend(rk_rng->dev);
 
 	return (ret < 0) ? ret : to_read;
diff --git a/drivers/char/hw_random/stm32-rng.c b/drivers/char/hw_random/stm32-rng.c
index 98edbe796bc5..9a8c00586ab0 100644
--- a/drivers/char/hw_random/stm32-rng.c
+++ b/drivers/char/hw_random/stm32-rng.c
@@ -255,7 +255,6 @@ static int stm32_rng_read(struct hwrng *rng, void *data, size_t max, bool wait)
 	}
 
 exit_rpm:
-	pm_runtime_mark_last_busy(priv->dev);
 	pm_runtime_put_sync_autosuspend(priv->dev);
 
 	return retval || !wait ? retval : -EIO;
-- 
2.39.5


  parent reply	other threads:[~2025-07-04  7:54 UTC|newest]

Thread overview: 165+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-04  7:52 [PATCH 00/80] treewide: " Sakari Ailus
2025-07-04  7:53 ` [PATCH 01/80] accel/ivpu: " Sakari Ailus
2025-07-07  8:29   ` Jacek Lawrynowicz
2025-07-04  7:53 ` [PATCH 02/80] accel/amdxdna: " Sakari Ailus
2025-07-07 16:52   ` Lizhi Hou
2025-07-04  7:53 ` [PATCH 04/80] bus: sunxi-rsb: " Sakari Ailus
2025-07-15 16:33   ` Chen-Yu Tsai
2025-07-04  7:53 ` [PATCH 03/80] Bluetooth: " Sakari Ailus
2025-07-04  7:53 ` Sakari Ailus [this message]
2025-07-07  9:35   ` [PATCH 05/80] hwrng: " AngeloGioacchino Del Regno
2025-07-18 10:58   ` Herbert Xu
2025-07-04  7:54 ` [PATCH 06/80] clk: imx: " Sakari Ailus
2025-07-07  8:30   ` Peng Fan
2025-07-24 21:37   ` Stephen Boyd
2025-07-04  7:54 ` [PATCH 07/80] clk: qcom: " Sakari Ailus
2025-07-24 21:46   ` Stephen Boyd
2025-07-04  7:54 ` [PATCH 08/80] crypto: " Sakari Ailus
2025-07-18 10:59   ` Herbert Xu
2025-07-04  7:54 ` [PATCH 09/80] dmaengine: at_xdmac: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 10/80] dmaengine: pl330: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 12/80] dmaengine: ste_dma40: " Sakari Ailus
2025-07-04  8:41   ` Linus Walleij
2025-07-04  7:54 ` [PATCH 11/80] dmaengine: qcom: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 13/80] dmaengine: ti: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 14/80] dmaengine: zynqmp_dma: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 15/80] gpio: arizona: " Sakari Ailus
2025-07-07  8:46   ` Charles Keepax
2025-07-04  7:54 ` [PATCH 16/80] drm/amd: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 17/80] drm/nouveau: " Sakari Ailus
2025-07-04  9:24   ` Danilo Krummrich
2025-07-04  7:54 ` [PATCH 19/80] drm/panfrost: " Sakari Ailus
2025-07-04  9:18   ` Steven Price
2025-08-15 14:22     ` Steven Price
2025-07-04  7:54 ` [PATCH 18/80] drm/radeon: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 20/80] drivers: drm: " Sakari Ailus
2025-07-04  8:11   ` Jani Nikula
2025-07-04  8:58   ` Laurent Pinchart
2025-07-04  9:12   ` Thierry Reding
2025-07-04  9:18   ` Steven Price
2025-07-04 10:24   ` Maíra Canal
2025-07-08 14:01   ` Luca Ceresoli
2025-07-04  7:54 ` [PATCH 21/80] HSI: omap_ssi_port: " Sakari Ailus
2025-07-05  0:37   ` Sebastian Reichel
2025-07-04  7:54 ` [PATCH 22/80] stm class: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 23/80] i2c: " Sakari Ailus
2025-07-10 20:49   ` Andi Shyti
2025-10-14 11:52   ` Wolfram Sang
2025-07-04  7:54 ` [PATCH 24/80] i3c: master: svc: " Sakari Ailus
2025-07-15 14:00   ` Frank Li
2025-07-04  7:54 ` [PATCH 25/80] i3c: dw: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 27/80] iio: accel: " Sakari Ailus
2025-07-04  9:05   ` Jonathan Cameron
2025-07-10  6:46   ` Matti Vaittinen
2025-07-13 13:43     ` Jonathan Cameron
2025-07-04  7:54 ` [PATCH 26/80] HID: intel-thc-hid: " Sakari Ailus
2025-07-07  5:11   ` Xu, Even
2025-07-04  7:54 ` [PATCH 28/80] iio: adc: " Sakari Ailus
2025-07-04  8:42   ` Linus Walleij
2025-07-04  9:09   ` Jonathan Cameron
2025-07-04  7:54 ` [PATCH 29/80] iio: chemical: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 30/80] iio: common: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 32/80] iio: gyro: " Sakari Ailus
2025-07-04  8:41   ` Linus Walleij
2025-07-04 15:25   ` Rui Miguel Silva
2025-07-04  7:54 ` [PATCH 31/80] iio: dac: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 33/80] iio: imu: " Sakari Ailus
2025-07-04 10:26   ` Waqar Hameed
2025-07-04  7:54 ` [PATCH 34/80] iio: light: " Sakari Ailus
2025-07-04  8:42   ` Linus Walleij
2025-07-06 10:31   ` Jonathan Cameron
2025-07-04  7:54 ` [PATCH 35/80] iio: magnetometer: " Sakari Ailus
2025-07-04  8:43   ` Linus Walleij
2025-07-06 10:28   ` Jonathan Cameron
2025-07-04  7:54 ` [PATCH 36/80] iio: pressure: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 37/80] iio: proximity: " Sakari Ailus
2025-07-06 10:27   ` Jonathan Cameron
2025-07-04  7:54 ` [PATCH 39/80] Input: omap4-keypad: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 38/80] iio: temperature: " Sakari Ailus
2025-07-04 16:00   ` Crt Mori
2025-07-06 10:25     ` Jonathan Cameron
2025-07-06 10:26       ` Jonathan Cameron
2025-07-08 10:52         ` Sakari Ailus
2025-07-04  7:54 ` [PATCH 40/80] Input: cs40l50: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 41/80] media: " Sakari Ailus
2025-07-04  8:56   ` Laurent Pinchart
2025-07-04  9:07   ` Thierry Reding
2025-07-04  9:32   ` Tommaso Merciai
2025-07-04 11:30   ` Dikshita Agarwal
2025-07-04 15:16   ` Sean Young
2025-07-07 15:57   ` Dave Stevenson
2025-07-09  8:43   ` Benjamin Gaignard
2025-07-04  7:54 ` [PATCH 42/80] mfd: " Sakari Ailus
2025-07-07  8:47   ` Charles Keepax
2025-07-23  8:42   ` (subset) " Lee Jones
2025-07-04  7:54 ` [PATCH 43/80] mei: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 44/80] mmc: " Sakari Ailus
2025-07-09 14:02   ` Ulf Hansson
2025-07-04  7:54 ` [PATCH 45/80] mtd: rawnand: gpmi: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 46/80] net: ethernet: " Sakari Ailus
2025-07-04  8:57   ` Niklas Söderlund
2025-07-04  7:54 ` [PATCH 47/80] net: ipa: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 48/80] net: wireless: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 49/80] net: wwan: " Sakari Ailus
2025-07-05  9:51   ` Sergey Ryazanov
2025-07-04  7:54 ` [PATCH 50/80] nfc: trf7970a: " Sakari Ailus
2025-07-04  8:03   ` Krzysztof Kozlowski
2025-07-15  8:18     ` Sakari Ailus
2025-07-04  7:54 ` [PATCH 51/80] PCI/portdrv: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 52/80] phy: motorola: phy-mapphone-mdm6600: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 53/80] phy: ti: phy-twl4030-usb: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 54/80] power: supply: bq24190: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 55/80] power: supply: twl4030_charger: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 56/80] pwm: img: " Sakari Ailus
2025-07-09  8:55   ` Uwe Kleine-König
2025-07-04  7:54 ` [PATCH 57/80] regulator: stm32-vrefbuf: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 58/80] remoteproc: omap: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 60/80] soundwire: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 59/80] slimbus: " Sakari Ailus
2025-07-09  6:41   ` Srinivas Kandagatla
2025-07-04  7:54 ` [PATCH 61/80] spi: " Sakari Ailus
2025-07-07  9:35   ` AngeloGioacchino Del Regno
2025-07-04  7:54 ` [PATCH 62/80] staging: greybus: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 63/80] " Sakari Ailus
2025-07-04  7:54 ` [PATCH 64/80] media: rkvdec: " Sakari Ailus
2025-07-04 13:05   ` Nicolas Dufresne
2025-08-11 13:48   ` Nicolas Dufresne
2025-07-04  7:54 ` [PATCH 65/80] thunderbolt: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 66/80] serial: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 67/80] usb: " Sakari Ailus
2025-07-04  9:11   ` Thierry Reding
2025-07-07  9:35   ` AngeloGioacchino Del Regno
2025-07-21  2:25   ` Peter Chen (CIX)
2025-07-04  7:54 ` [PATCH 68/80] w1: omap-hdq: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 69/80] ALSA: hda: " Sakari Ailus
2025-07-04 11:47   ` Takashi Iwai
2025-07-04 11:52     ` Mark Brown
2025-07-04 11:58       ` Takashi Iwai
2025-07-06  8:27         ` Takashi Iwai
2025-07-04  7:54 ` [PATCH 70/80] ASoC: atmel: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 71/80] ASoC: codecs: " Sakari Ailus
2025-07-07  9:16   ` Charles Keepax
2025-07-04  7:54 ` [PATCH 72/80] ASoC: Intel: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 73/80] ASoC: component: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 74/80] ASoC: SOF: " Sakari Ailus
2025-07-04  8:26   ` Péter Ujfalusi
2025-07-04  7:55 ` [PATCH 76/80] soc: apple: mailbox: " Sakari Ailus
2025-07-04  7:55 ` [PATCH 75/80] ALSA: intel_hdmi: " Sakari Ailus
2025-07-04 11:45   ` Takashi Iwai
2025-07-06  8:26     ` Takashi Iwai
2025-07-04  7:55 ` [PATCH 77/80] block: pm: " Sakari Ailus
2025-07-07  5:59   ` Christoph Hellwig
2025-07-04  7:55 ` [PATCH 78/80] Input: cyapa - " Sakari Ailus
2025-07-04  7:55 ` [PATCH 80/80] scsi: block: pm: " Sakari Ailus
2025-07-04  7:55 ` [PATCH 79/80] mei: " Sakari Ailus
2025-07-04  9:03 ` [PATCH 00/80] treewide: " Jonathan Cameron
2025-07-04 12:04 ` Mark Brown
2025-07-08 10:01   ` Sakari Ailus
2025-07-04 18:15 ` (subset) " Mark Brown
2025-07-04 23:39 ` Mark Brown
2025-07-06 23:04 ` Sebastian Reichel
2025-07-07  8:03 ` Bartosz Golaszewski
2025-07-07 16:29 ` Mark Brown
2025-07-30 23:40 ` Alexandre Belloni
2025-09-05 21:08 ` Sebastian Reichel
2025-11-26 20:10 ` Bjorn Andersson

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=20250704075359.3217036-1-sakari.ailus@linux.intel.com \
    --to=sakari.ailus@linux.intel.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=aurelien@aurel32.net \
    --cc=avifishman70@gmail.com \
    --cc=benjaminfair@google.com \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=daniel@makrotopia.org \
    --cc=gatien.chevallier@foss.st.com \
    --cc=hadar.gat@arm.com \
    --cc=heiko@sntech.de \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=marex@denx.de \
    --cc=matthias.bgg@gmail.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=nicolas.ferre@microchip.com \
    --cc=nicolas.frattaroli@collabora.com \
    --cc=olivia@selenic.com \
    --cc=openbmc@lists.ozlabs.org \
    --cc=sean.wang@mediatek.com \
    --cc=tali.perry1@gmail.com \
    --cc=tmaimon77@gmail.com \
    --cc=u.kleine-koenig@baylibre.com \
    --cc=venture@google.com \
    --cc=yuenn@google.com \
    /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®