]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 4.14
authorSasha Levin <sashal@kernel.org>
Mon, 2 Oct 2023 11:02:56 +0000 (07:02 -0400)
committerSasha Levin <sashal@kernel.org>
Mon, 2 Oct 2023 11:02:56 +0000 (07:02 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-4.14/clk-tegra-fix-error-return-case-for-recalc_rate.patch [new file with mode: 0644]
queue-4.14/series
queue-4.14/xtensa-boot-don-t-add-include-dirs.patch [new file with mode: 0644]
queue-4.14/xtensa-boot-lib-fix-function-prototypes.patch [new file with mode: 0644]

diff --git a/queue-4.14/clk-tegra-fix-error-return-case-for-recalc_rate.patch b/queue-4.14/clk-tegra-fix-error-return-case-for-recalc_rate.patch
new file mode 100644 (file)
index 0000000..f7318e9
--- /dev/null
@@ -0,0 +1,40 @@
+From 9e481fa7cca8d68ff404795ac2da8fb2b0587306 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 12 Sep 2023 14:29:50 +0300
+Subject: clk: tegra: fix error return case for recalc_rate
+
+From: Timo Alho <talho@nvidia.com>
+
+[ Upstream commit a47b44fbb13f5e7a981b4515dcddc93a321ae89c ]
+
+tegra-bpmp clocks driver makes implicit conversion of signed error
+code to unsigned value in recalc_rate operation. The behavior for
+recalc_rate, according to it's specification, should be that "If the
+driver cannot figure out a rate for this clock, it must return 0."
+
+Fixes: ca6f2796eef7 ("clk: tegra: Add BPMP clock driver")
+Signed-off-by: Timo Alho <talho@nvidia.com>
+Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
+Link: https://lore.kernel.org/r/20230912112951.2330497-1-cyndis@kapsi.fi
+Signed-off-by: Stephen Boyd <sboyd@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/clk/tegra/clk-bpmp.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/clk/tegra/clk-bpmp.c b/drivers/clk/tegra/clk-bpmp.c
+index 6c933b0e29a3b..fcb7c599583b3 100644
+--- a/drivers/clk/tegra/clk-bpmp.c
++++ b/drivers/clk/tegra/clk-bpmp.c
+@@ -154,7 +154,7 @@ static unsigned long tegra_bpmp_clk_recalc_rate(struct clk_hw *hw,
+       err = tegra_bpmp_clk_transfer(clk->bpmp, &msg);
+       if (err < 0)
+-              return err;
++              return 0;
+       return response.rate;
+ }
+-- 
+2.40.1
+
index 38d9ffea6706ae5dc17889594cf7cd553c168f53..7cd66ac6021a9ed5b984562451d6b0dd070b075b 100644 (file)
@@ -5,3 +5,6 @@ dccp-fix-dccp_v4_err-dccp_v6_err-again.patch
 team-fix-null-ptr-deref-when-team-device-type-is-cha.patch
 gpio-tb10x-fix-an-error-handling-path-in-tb10x_gpio_.patch
 i2c-mux-demux-pinctrl-check-the-return-value-of-devm.patch
+clk-tegra-fix-error-return-case-for-recalc_rate.patch
+xtensa-boot-don-t-add-include-dirs.patch
+xtensa-boot-lib-fix-function-prototypes.patch
diff --git a/queue-4.14/xtensa-boot-don-t-add-include-dirs.patch b/queue-4.14/xtensa-boot-don-t-add-include-dirs.patch
new file mode 100644 (file)
index 0000000..3d6a382
--- /dev/null
@@ -0,0 +1,43 @@
+From 9422d06b58cb064feacdb574fae87f494e5b6d86 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 19 Sep 2023 22:21:37 -0700
+Subject: xtensa: boot: don't add include-dirs
+
+From: Randy Dunlap <rdunlap@infradead.org>
+
+[ Upstream commit 54d3d7d363823782c3444ddc41bb8cf1edc80514 ]
+
+Drop the -I<include-dir> options to prevent build warnings since there
+is not boot/include directory:
+
+cc1: warning: arch/xtensa/boot/include: No such file or directory [-Wmissing-include-dirs]
+
+Fixes: 437374e9a950 ("restore arch/{ppc/xtensa}/boot cflags")
+Fixes: 4bedea945451 ("xtensa: Architecture support for Tensilica Xtensa Part 2")
+Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
+Cc: Chris Zankel <chris@zankel.net>
+Cc: Max Filippov <jcmvbkbc@gmail.com>
+Message-Id: <20230920052139.10570-15-rdunlap@infradead.org>
+Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/xtensa/boot/Makefile | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/arch/xtensa/boot/Makefile b/arch/xtensa/boot/Makefile
+index 8c20a7965bda0..7acb04aeb577a 100644
+--- a/arch/xtensa/boot/Makefile
++++ b/arch/xtensa/boot/Makefile
+@@ -9,8 +9,7 @@
+ # KBUILD_CFLAGS used when building rest of boot (takes effect recursively)
+-KBUILD_CFLAGS += -fno-builtin -Iarch/$(ARCH)/boot/include
+-HOSTFLAGS     += -Iarch/$(ARCH)/boot/include
++KBUILD_CFLAGS += -fno-builtin
+ BIG_ENDIAN    := $(shell echo __XTENSA_EB__ | $(CC) -E - | grep -v "\#")
+-- 
+2.40.1
+
diff --git a/queue-4.14/xtensa-boot-lib-fix-function-prototypes.patch b/queue-4.14/xtensa-boot-lib-fix-function-prototypes.patch
new file mode 100644 (file)
index 0000000..2254b7b
--- /dev/null
@@ -0,0 +1,52 @@
+From 313869552822f24d33065a3fa80480a906e5fe53 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 20 Sep 2023 04:41:09 -0700
+Subject: xtensa: boot/lib: fix function prototypes
+
+From: Max Filippov <jcmvbkbc@gmail.com>
+
+[ Upstream commit f54d02c8f2cc4b46ba2a3bd8252a6750453b6f2b ]
+
+Add function prototype for gunzip() to the boot library code and make
+exit() and zalloc() static.
+
+arch/xtensa/boot/lib/zmem.c:8:6: warning: no previous prototype for 'exit' [-Wmissing-prototypes]
+    8 | void exit (void)
+arch/xtensa/boot/lib/zmem.c:13:7: warning: no previous prototype for 'zalloc' [-Wmissing-prototypes]
+   13 | void *zalloc(unsigned size)
+arch/xtensa/boot/lib/zmem.c:35:6: warning: no previous prototype for 'gunzip' [-Wmissing-prototypes]
+   35 | void gunzip (void *dst, int dstlen, unsigned char *src, int *lenp)
+
+Fixes: 4bedea945451 ("xtensa: Architecture support for Tensilica Xtensa Part 2")
+Fixes: e7d163f76665 ("xtensa: Removed local copy of zlib and fixed O= support")
+Suggested-by: Randy Dunlap <rdunlap@infradead.org>
+Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/xtensa/boot/lib/zmem.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/arch/xtensa/boot/lib/zmem.c b/arch/xtensa/boot/lib/zmem.c
+index e3ecd743c5153..b89189355122a 100644
+--- a/arch/xtensa/boot/lib/zmem.c
++++ b/arch/xtensa/boot/lib/zmem.c
+@@ -4,13 +4,14 @@
+ /* bits taken from ppc */
+ extern void *avail_ram, *end_avail;
++void gunzip(void *dst, int dstlen, unsigned char *src, int *lenp);
+-void exit (void)
++static void exit(void)
+ {
+   for (;;);
+ }
+-void *zalloc(unsigned size)
++static void *zalloc(unsigned int size)
+ {
+         void *p = avail_ram;
+-- 
+2.40.1
+