mirror of https://gitee.com/openkylin/linux.git
clk: socfpga: fix iomem pointer cast on 64-bit
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: b7cec13f08
("clk: socfpga: Look for the GPIO_DB_CLK by its offset")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Acked-by: Dinh Nguyen <dinguyen@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
parent
d60f314b93
commit
3684100805
|
@ -99,7 +99,7 @@ static unsigned long socfpga_clk_recalc_rate(struct clk_hw *hwclk,
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue