From: Sasha Levin Date: Mon, 2 Oct 2023 11:02:56 +0000 (-0400) Subject: Fixes for 4.14 X-Git-Tag: v6.5.6~64 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e4e2f90aad22656f462a33403f4a34c02029e930;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 4.14 Signed-off-by: Sasha Levin --- 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 index 00000000000..f7318e93cd7 --- /dev/null +++ b/queue-4.14/clk-tegra-fix-error-return-case-for-recalc_rate.patch @@ -0,0 +1,40 @@ +From 9e481fa7cca8d68ff404795ac2da8fb2b0587306 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 12 Sep 2023 14:29:50 +0300 +Subject: clk: tegra: fix error return case for recalc_rate + +From: Timo Alho + +[ 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 +Signed-off-by: Mikko Perttunen +Link: https://lore.kernel.org/r/20230912112951.2330497-1-cyndis@kapsi.fi +Signed-off-by: Stephen Boyd +Signed-off-by: Sasha Levin +--- + 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 + diff --git a/queue-4.14/series b/queue-4.14/series index 38d9ffea670..7cd66ac6021 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -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 index 00000000000..3d6a382557b --- /dev/null +++ b/queue-4.14/xtensa-boot-don-t-add-include-dirs.patch @@ -0,0 +1,43 @@ +From 9422d06b58cb064feacdb574fae87f494e5b6d86 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 19 Sep 2023 22:21:37 -0700 +Subject: xtensa: boot: don't add include-dirs + +From: Randy Dunlap + +[ Upstream commit 54d3d7d363823782c3444ddc41bb8cf1edc80514 ] + +Drop the -I 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 +Cc: Chris Zankel +Cc: Max Filippov +Message-Id: <20230920052139.10570-15-rdunlap@infradead.org> +Signed-off-by: Max Filippov +Signed-off-by: Sasha Levin +--- + 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 index 00000000000..2254b7b1fdf --- /dev/null +++ b/queue-4.14/xtensa-boot-lib-fix-function-prototypes.patch @@ -0,0 +1,52 @@ +From 313869552822f24d33065a3fa80480a906e5fe53 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 20 Sep 2023 04:41:09 -0700 +Subject: xtensa: boot/lib: fix function prototypes + +From: Max Filippov + +[ 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 +Signed-off-by: Max Filippov +Signed-off-by: Sasha Levin +--- + 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 +