From: Greg Kroah-Hartman Date: Mon, 25 Mar 2024 08:50:48 +0000 (+0100) Subject: 5.10-stable patches X-Git-Tag: v6.8.2~30 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5b5e6dc04d62ea041533927e1e7702498b25305b;p=thirdparty%2Fkernel%2Fstable-queue.git 5.10-stable patches added patches: remoteproc-stm32-fix-incorrect-optional-pointers.patch remoteproc-stm32-fix-phys_addr_t-format-string.patch --- diff --git a/queue-5.10/remoteproc-stm32-fix-incorrect-optional-pointers.patch b/queue-5.10/remoteproc-stm32-fix-incorrect-optional-pointers.patch new file mode 100644 index 00000000000..0a90ea5205b --- /dev/null +++ b/queue-5.10/remoteproc-stm32-fix-incorrect-optional-pointers.patch @@ -0,0 +1,77 @@ +From fb2bdd32b231b70e6a3f1054528692f604db25d8 Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Mon, 24 Jul 2023 21:56:49 +0200 +Subject: remoteproc: stm32: fix incorrect optional pointers + +From: Arnd Bergmann + +commit fb2bdd32b231b70e6a3f1054528692f604db25d8 upstream. + +Compile-testing without CONFIG_OF shows that the of_match_ptr() macro +was used incorrectly here: + +drivers/remoteproc/stm32_rproc.c:662:34: warning: unused variable 'stm32_rproc_match' [-Wunused-const-variable] + +As in almost every driver, the solution is simply to remove the +use of this macro. The same thing happened with the deprecated +SIMPLE_DEV_PM_OPS(), but the corresponding warning was already shut +up with __maybe_unused annotations, so fix those as well by using the +correct DEFINE_SIMPLE_DEV_PM_OPS() macros and removing the extraneous +__maybe_unused modifiers. For completeness, also add a pm_ptr() to let +the PM ops be eliminated completely when CONFIG_PM is turned off. + +Reported-by: kernel test robot +Closes: https://lore.kernel.org/oe-kbuild-all/202307242300.ia82qBTp-lkp@intel.com +Fixes: 03bd158e1535 ("remoteproc: stm32: use correct format strings on 64-bit") +Fixes: 410119ee29b6 ("remoteproc: stm32: wakeup the system by wdg irq") +Fixes: 13140de09cc2 ("remoteproc: stm32: add an ST stm32_rproc driver") +Signed-off-by: Arnd Bergmann +Acked-by: Arnaud Pouliquen +Link: https://lore.kernel.org/r/20230724195704.2432382-1-arnd@kernel.org +Signed-off-by: Mathieu Poirier +Signed-off-by: Greg Kroah-Hartman +--- + drivers/remoteproc/stm32_rproc.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +--- a/drivers/remoteproc/stm32_rproc.c ++++ b/drivers/remoteproc/stm32_rproc.c +@@ -870,7 +870,7 @@ static int stm32_rproc_remove(struct pla + return 0; + } + +-static int __maybe_unused stm32_rproc_suspend(struct device *dev) ++static int stm32_rproc_suspend(struct device *dev) + { + struct rproc *rproc = dev_get_drvdata(dev); + struct stm32_rproc *ddata = rproc->priv; +@@ -881,7 +881,7 @@ static int __maybe_unused stm32_rproc_su + return 0; + } + +-static int __maybe_unused stm32_rproc_resume(struct device *dev) ++static int stm32_rproc_resume(struct device *dev) + { + struct rproc *rproc = dev_get_drvdata(dev); + struct stm32_rproc *ddata = rproc->priv; +@@ -892,16 +892,16 @@ static int __maybe_unused stm32_rproc_re + return 0; + } + +-static SIMPLE_DEV_PM_OPS(stm32_rproc_pm_ops, +- stm32_rproc_suspend, stm32_rproc_resume); ++static DEFINE_SIMPLE_DEV_PM_OPS(stm32_rproc_pm_ops, ++ stm32_rproc_suspend, stm32_rproc_resume); + + static struct platform_driver stm32_rproc_driver = { + .probe = stm32_rproc_probe, + .remove = stm32_rproc_remove, + .driver = { + .name = "stm32-rproc", +- .pm = &stm32_rproc_pm_ops, +- .of_match_table = of_match_ptr(stm32_rproc_match), ++ .pm = pm_ptr(&stm32_rproc_pm_ops), ++ .of_match_table = stm32_rproc_match, + }, + }; + module_platform_driver(stm32_rproc_driver); diff --git a/queue-5.10/remoteproc-stm32-fix-phys_addr_t-format-string.patch b/queue-5.10/remoteproc-stm32-fix-phys_addr_t-format-string.patch new file mode 100644 index 00000000000..8e911ac7084 --- /dev/null +++ b/queue-5.10/remoteproc-stm32-fix-phys_addr_t-format-string.patch @@ -0,0 +1,38 @@ +From 3e25e407a1c93b53a87a7743ea0cd4703d3985b7 Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Wed, 21 Apr 2021 16:00:40 +0200 +Subject: remoteproc: stm32: fix phys_addr_t format string + +From: Arnd Bergmann + +commit 3e25e407a1c93b53a87a7743ea0cd4703d3985b7 upstream. + +A phys_addr_t may be wider than an int or pointer: + +drivers/remoteproc/stm32_rproc.c: In function 'stm32_rproc_da_to_pa': +drivers/remoteproc/stm32_rproc.c:583:30: error: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'phys_addr_t' {aka 'long long unsigned int'} [-Werror=format=] + 583 | dev_dbg(dev, "da %llx to pa %#x\n", da, *pa); + +Print it by reference using the special %pap format string. + +Reviewed-by: Arnaud Pouliquen +Fixes: 8a471396d21c ("remoteproc: stm32: Move resource table setup to rproc_ops") +Signed-off-by: Arnd Bergmann +Link: https://lore.kernel.org/r/20210421140053.3727528-1-arnd@kernel.org +Signed-off-by: Bjorn Andersson +Signed-off-by: Greg Kroah-Hartman +--- + drivers/remoteproc/stm32_rproc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/remoteproc/stm32_rproc.c ++++ b/drivers/remoteproc/stm32_rproc.c +@@ -569,7 +569,7 @@ static int stm32_rproc_da_to_pa(struct r + continue; + + *pa = da - p_mem->dev_addr + p_mem->bus_addr; +- dev_dbg(dev, "da %llx to pa %#x\n", da, *pa); ++ dev_dbg(dev, "da %llx to pa %pap\n", da, pa); + + return 0; + } diff --git a/queue-5.10/series b/queue-5.10/series index c5b1a470e07..9ec00a790d6 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -235,3 +235,5 @@ rcu-add-a-helper-to-report-consolidated-flavor-qs.patch bpf-report-rcu-qs-in-cpumap-kthread.patch spi-spi-mt65xx-fix-null-pointer-access-in-interrupt-.patch regmap-add-missing-map-bus-check.patch +remoteproc-stm32-fix-phys_addr_t-format-string.patch +remoteproc-stm32-fix-incorrect-optional-pointers.patch