lkml.org 
[lkml]   [2018]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] clk: tegra: refactor 7.1 div calculation
Hi Peter,

I love your patch! Perhaps something to improve:

[auto build test WARNING on tegra/for-next]
[also build test WARNING on v4.18-rc3 next-20180703]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Aapo-Vienamo/clk-tegra-refactor-7-1-div-calculation/20180703-205606
base: https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git for-next
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.2.0 make.cross ARCH=arm

All warnings (new ones prefixed by >>):

In file included from arch/arm/include/asm/div64.h:127:0,
from include/linux/kernel.h:174,
from drivers/clk/tegra/div71.c:17:
drivers/clk/tegra/div71.c: In function 'div71_get':
include/asm-generic/div64.h:222:28: warning: comparison of distinct pointer types lacks a cast
(void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
^
>> drivers/clk/tegra/div71.c:40:2: note: in expansion of macro 'do_div'
do_div(divider_ux1, rate);
^~~~~~

vim +/do_div +40 drivers/clk/tegra/div71.c

> 17 #include <linux/kernel.h>
18
19 #include "clk.h"
20
21 #define div_mask(w) ((1 << (w)) - 1)
22
23 int div71_get(unsigned long rate, unsigned parent_rate, u8 width,
24 u8 frac_width, u8 flags)
25 {
26 s64 divider_ux1 = parent_rate;
27 int mul;
28
29 if (!rate)
30 return 0;
31
32 mul = 1 << frac_width;
33
34 if (!(flags & TEGRA_DIVIDER_INT))
35 divider_ux1 *= mul;
36
37 if (flags & TEGRA_DIVIDER_ROUND_UP)
38 divider_ux1 += rate - 1;
39
> 40 do_div(divider_ux1, rate);

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2018-07-03 17:31    [W:0.090 / U:4.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site