Re: [PATCH v11 6/9] soc: qcom: cpr: Use u64 for frequency
From: Jeffrey Hugo
Date: Tue Jun 27 2023 - 16:17:02 EST
On 6/27/2023 12:30 PM, Konrad Dybcio wrote:
32 bits is not enough for over-2.changeGHz frequencies. Move all variables
that operate on Hz to u64 to avoid overflows.
Signed-off-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxx>
I get the following warning when building this -
CC drivers/soc/qcom/cpr-common.o
In file included from ./include/linux/device.h:15:0,
from ./include/linux/platform_device.h:13,
from ./include/linux/of_device.h:5,
from drivers/soc/qcom/cpr.c:18:
drivers/soc/qcom/cpr.c: In function ‘cpr_corner_init’:
drivers/soc/qcom/cpr.c:870:21: warning: format ‘%lu’ expects argument of
type ‘long unsigned int’, but argument 4 has type ‘u64 {aka long long
unsigned int}’ [-Wformat=]
dev_dbg(drv->dev, "freq: %lu level: %u fuse level: %u\n",
^
./include/linux/dev_printk.h:129:27: note: in definition of macro
‘dev_printk’
_dev_printk(level, dev, fmt, ##__VA_ARGS__); \
^~~
./include/linux/dev_printk.h:163:31: note: in expansion of macro ‘dev_fmt’
dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
^~~~~~~
drivers/soc/qcom/cpr.c:870:3: note: in expansion of macro ‘dev_dbg’
dev_dbg(drv->dev, "freq: %lu level: %u fuse level: %u\n",
^~~~~~~