From 12a5acd58743c20d0531d036b15a958afed1c417 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 12 Apr 2021 09:05:45 +0200 Subject: [PATCH] 4.4-stable patches added patches: clk-socfpga-fix-iomem-pointer-cast-on-64-bit.patch --- ...pga-fix-iomem-pointer-cast-on-64-bit.patch | 39 +++++++++++++++++++ queue-4.4/series | 1 + 2 files changed, 40 insertions(+) create mode 100644 queue-4.4/clk-socfpga-fix-iomem-pointer-cast-on-64-bit.patch diff --git a/queue-4.4/clk-socfpga-fix-iomem-pointer-cast-on-64-bit.patch b/queue-4.4/clk-socfpga-fix-iomem-pointer-cast-on-64-bit.patch new file mode 100644 index 00000000000..0a3beb2d27d --- /dev/null +++ b/queue-4.4/clk-socfpga-fix-iomem-pointer-cast-on-64-bit.patch @@ -0,0 +1,39 @@ +From 2867b9746cef78745c594894aece6f8ef826e0b4 Mon Sep 17 00:00:00 2001 +From: Krzysztof Kozlowski +Date: Sun, 14 Mar 2021 12:07:09 +0100 +Subject: clk: socfpga: fix iomem pointer cast on 64-bit +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Krzysztof Kozlowski + +commit 2867b9746cef78745c594894aece6f8ef826e0b4 upstream. + +Pointers should be cast with uintptr_t instead of integer. This fixes +warning when compile testing on ARM64: + + drivers/clk/socfpga/clk-gate.c: In function ‘socfpga_clk_recalc_rate’: + drivers/clk/socfpga/clk-gate.c:102:7: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] + +Fixes: b7cec13f082f ("clk: socfpga: Look for the GPIO_DB_CLK by its offset") +Signed-off-by: Krzysztof Kozlowski +Acked-by: Dinh Nguyen +Link: https://lore.kernel.org/r/20210314110709.32599-1-krzysztof.kozlowski@canonical.com +Signed-off-by: Stephen Boyd +Signed-off-by: Greg Kroah-Hartman +--- + drivers/clk/socfpga/clk-gate.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/clk/socfpga/clk-gate.c ++++ b/drivers/clk/socfpga/clk-gate.c +@@ -107,7 +107,7 @@ static unsigned long socfpga_clk_recalc_ + val = readl(socfpgaclk->div_reg) >> socfpgaclk->shift; + val &= GENMASK(socfpgaclk->width - 1, 0); + /* Check for GPIO_DB_CLK by its offset */ +- if ((int) socfpgaclk->div_reg & SOCFPGA_GPIO_DB_CLK_OFFSET) ++ if ((uintptr_t) socfpgaclk->div_reg & SOCFPGA_GPIO_DB_CLK_OFFSET) + div = val + 1; + else + div = (1 << val); diff --git a/queue-4.4/series b/queue-4.4/series index ebfcf40bfd8..8689fe6fc7e 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -18,3 +18,4 @@ clk-fix-invalid-usage-of-list-cursor-in-unregister.patch workqueue-move-the-position-of-debug_work_activate-i.patch s390-cpcmd-fix-inline-assembly-register-clobbering.patch rdma-cxgb4-check-for-ipv6-address-properly-while-des.patch +clk-socfpga-fix-iomem-pointer-cast-on-64-bit.patch -- 2.47.3