Re: [PATCH v11 6/9] soc: qcom: cpr: Use u64 for frequency

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 27.06.2023 22:15, Jeffrey Hugo wrote:
> 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 -
Ugh. Either didn't notice or clang wasn't unhappy with it.

Thanks for noticing.

Konrad
> 
>   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",
>    ^~~~~~~



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux