From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793560384; b=jRE02TH9yZNCb6pVOrP3b4WVRC9P0LUYrr9hsBnIUmWSSoO00a3SY/K23Hx2rgVnbdrU fybufw3DUfps2XkPsCBqrk403cPk57XkOR9ByXAIYq/dGGLt0lrY7GcOtbGm/WEZpoOyr 1iaegKhppxsviG3+XRrNm9o0juRTNOWhRB/58g0YuGelsejF4/bPF3wEitTzUtL1nja4Q 7BcOj+WdMuDrPbRi8I+LiBXMVoNyo5yrMUWDAkVDI92j/tZR/RzLHWKsNgHTzgyC7bxyv txGOQBoBwjoKmusmfCEANELD1Bnv8Gko4CHaPXDaWARgMq7zBsa/OfwDTu9RRSDZyAQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793560384; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=wMMoodAdeUL2Rb09AT1InbIBxLSoeXuaM+x8Py+Dnag=; b=hvFG2f1DsGJxfM2/Kr+w7v4A6sEdaoRUEDRyi7Sa9A2ETOcnr0tg7pmlDQOvib+Fm9SY cVSt9Z8CHUQNVGmwTvruv6MqYfgOKBMgaW95SaWOkfHJZQLGMIWqlsaETNECDGUgahmyI 4Gt6/h0D0l+oeGwOPM5HI9DphIEW4T4goxfbGbCAUOGcFraG3BinJov5OyKPZPwWzVIhy K8wh8ikH/lqhhtfKNqgUj4ZUQ3ktEtU7qTTKXmEfg5qQ1m8LeyLCK8IlEXnZkTwg4IhQS n560ol3uwed6Uk/1MEEZa57PPnl/H8vxjrXK5KIGdT/kO941nhxpz24u6//9u6vW//g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=QOe1NoQj; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7FFC0606A324; Sun, 1 Nov 2026 19:13:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=QOe1NoQj Received: by smtp.kernel.org (Postfix) with ESMTPSA id B13261F000C1; Sun, 1 Nov 2026 19:13:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1793560384; bh=wMMoodAdeUL2Rb09AT1InbIBxLSoeXuaM+x8Py+Dnag=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=QOe1NoQjHAH8Q0Rri8rqr7x4b/ha007t6AbxPjBddwXTLklDNADi+Myo42JP3o8o+ RFJGPlYgXpccqTufpfU5xiTKzMatmmF9gaxI5O2BRjlYEtm2Pbce0z5TSUDZXneUEo P5fWpfTnsVyW0K5TGWZB/LzMej2n4WeLLBCXzC7rkNOA+8haBDM4X1tQf54tRq3FwI 78PveyevRqISENqRpvNy1pOrQ/6i5L22SSbGSwZIR4Z/KVLTlOu/0dOWOEa9vBJZ8b yum0TOrl4L/bTcmKnZlI+lpedGR3xuKLxm5ZKkEgpyudxq2EvA4HBoERYkeGY6tKZT gAx2DNGTaCk8A== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v3 7/7] remoteproc: sunxi: Add KUnit tests Reply-To: sashiko-reviews@lists.linux.dev To: "Tim Michals" Cc: linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org In-Reply-To: <20261101185735.762559-8-tcmichals@gmail.com> References: <20261101185735.762559-1-tcmichals@gmail.com> <20261101185735.762559-8-tcmichals@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sun, 01 Nov 2026 19:13:03 +0000 X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 2 potential issue(= s) to consider: - [Medium] remoteproc: sunxi: missing CONFIG_PM dependency in KUnit test - [Low] remoteproc: sunxi: missing __force on __iomem casts in use_mmio_moc= ks() -- commit 9db9877d3095c9678cf19b6cc5cf48fbc1c0e95d Author: Tim Michals remoteproc: sunxi: Add KUnit tests This commit adds 26 KUnit tests for the Allwinner sunxi remoteproc driver, covering address translation, lifecycle callbacks, crash handling, firmware parsing, and mailbox notifications using KUnit static stubs and mock providers. > diff --git a/drivers/remoteproc/Kconfig b/drivers/remoteproc/Kconfig > index d2929a3290c3f..6516e272689e4 100644 > --- a/drivers/remoteproc/Kconfig > +++ b/drivers/remoteproc/Kconfig > @@ -348,6 +348,21 @@ config SUNXI_REMOTEPROC > To compile this driver as a module, choose M here: the module will > be called sunxi_rproc. > =20 > +config SUNXI_REMOTEPROC_KUNIT_TEST > + tristate "KUnit tests for Allwinner sunxi remoteproc" if !KUNIT_ALL_TES= TS > + depends on SUNXI_REMOTEPROC && KUNIT && COMMON_CLK && RESET_CONTROLLER > + default KUNIT_ALL_TESTS [Severity: Medium] Should SUNXI_REMOTEPROC_KUNIT_TEST also depend on PM? In include/linux/pm.h, the usage_count member of struct dev_pm_info is only defined when CONFIG_PM is enabled: #ifdef CONFIG_PM ... atomic_t usage_count; When CONFIG_PM is disabled, expect_powered_off(), test_prepare_unprepare_order(), and test_prepare_power_up_failure() in drivers/remoteproc/sunxi_rproc_kunit.c fail to compile because they read dev->power.usage_count unconditionally. In addition, test_prepare_power_up_failure() relies on dev_pm_domain_set() and pm_runtime_enable() so that sunxi_rproc_prepare() -> pm_runtime_resume_and_get() invokes mock_failing_pm_domain.ops.runtime_resu= me and returns -EIO. When CONFIG_PM is disabled, those helpers are no-op stubs and pm_runtime_resume_and_get() returns 0 instead of -EIO. [ ... ] > diff --git a/drivers/remoteproc/sunxi_rproc_kunit.c b/drivers/remoteproc/= sunxi_rproc_kunit.c > new file mode 100644 > index 0000000000000..0931564dc22bb > --- /dev/null > +++ b/drivers/remoteproc/sunxi_rproc_kunit.c [ ... ] > +static void use_mmio_mocks(struct test_context *ctx) > +{ > + ctx->priv.cfg_va =3D (void __iomem *)ctx->mock_cfg_regs; > + ctx->priv.remap_va =3D (void __iomem *)&ctx->mock_remap_reg; > + ctx->priv.sram0_va =3D (void __iomem *)ctx->mock_sram_buf; > + ctx->priv.sram0_size =3D sizeof(ctx->mock_sram_buf); > + ctx->priv.sram1_va =3D (void __iomem *)ctx->mock_sram1_buf; > + ctx->priv.sram1_size =3D sizeof(ctx->mock_sram1_buf); > +} [Severity: Low] Unlike FAKE_SRAM_VA and FAKE_SRAM1_VA, which use (void __force __iomem *), the casts in use_mmio_mocks() omit __force when casting normal kernel memory buffers to __iomem pointers. Should these casts use (void __force __iomem *) to avoid Sparse address-space warnings when building with C=3D1? --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261101185735.7625= 59-1-tcmichals@gmail.com?part=3D7