lkml.org 
[lkml]   [2019]   [Dec]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/2] clk: intel: Add CGU clock driver for a new SoC
Hi Rahul,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on clk/clk-next]
[also build test WARNING on robh/for-next v5.5-rc3 next-20191220]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url: https://github.com/0day-ci/linux/commits/Rahul-Tanwar/clk-intel-Add-a-new-driver-for-a-new-clock-controller-IP/20191223-110300
base: https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-129-g341daf20-dirty
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)

>> drivers/clk/x86/clk-cgu.c:32:32: sparse: sparse: incorrect type in argument 1 (different address spaces)
>> drivers/clk/x86/clk-cgu.c:32:32: sparse: expected void const volatile [noderef] <asn:2> *addr
>> drivers/clk/x86/clk-cgu.c:32:32: sparse: got void *
drivers/clk/x86/clk-cgu.c:34:32: sparse: sparse: incorrect type in argument 2 (different address spaces)
>> drivers/clk/x86/clk-cgu.c:34:32: sparse: expected void volatile [noderef] <asn:2> *addr
drivers/clk/x86/clk-cgu.c:34:32: sparse: got void *
drivers/clk/x86/clk-cgu.c:41:29: sparse: sparse: incorrect type in argument 1 (different address spaces)
drivers/clk/x86/clk-cgu.c:41:29: sparse: expected void const volatile [noderef] <asn:2> *addr
drivers/clk/x86/clk-cgu.c:41:29: sparse: got void *
drivers/clk/x86/clk-cgu.c:61:36: sparse: sparse: incorrect type in argument 1 (different address spaces)
>> drivers/clk/x86/clk-cgu.c:61:36: sparse: expected void *membase
>> drivers/clk/x86/clk-cgu.c:61:36: sparse: got void [noderef] <asn:2> *membase
drivers/clk/x86/clk-cgu.c:78:34: sparse: sparse: incorrect type in argument 1 (different address spaces)
drivers/clk/x86/clk-cgu.c:78:34: sparse: expected void *membase
drivers/clk/x86/clk-cgu.c:78:34: sparse: got void [noderef] <asn:2> *membase
drivers/clk/x86/clk-cgu.c:91:28: sparse: sparse: incorrect type in argument 1 (different address spaces)
drivers/clk/x86/clk-cgu.c:91:28: sparse: expected void *membase
drivers/clk/x86/clk-cgu.c:91:28: sparse: got void [noderef] <asn:2> *membase
drivers/clk/x86/clk-cgu.c:155:36: sparse: sparse: incorrect type in argument 1 (different address spaces)
drivers/clk/x86/clk-cgu.c:155:36: sparse: expected void *membase
drivers/clk/x86/clk-cgu.c:155:36: sparse: got void [noderef] <asn:2> *membase
drivers/clk/x86/clk-cgu.c:170:38: sparse: sparse: incorrect type in argument 1 (different address spaces)
drivers/clk/x86/clk-cgu.c:170:38: sparse: expected void *membase
drivers/clk/x86/clk-cgu.c:170:38: sparse: got void [noderef] <asn:2> *membase
drivers/clk/x86/clk-cgu.c:202:32: sparse: sparse: incorrect type in argument 1 (different address spaces)
drivers/clk/x86/clk-cgu.c:202:32: sparse: expected void *membase
drivers/clk/x86/clk-cgu.c:202:32: sparse: got void [noderef] <asn:2> *membase
drivers/clk/x86/clk-cgu.c:260:36: sparse: sparse: incorrect type in argument 1 (different address spaces)
drivers/clk/x86/clk-cgu.c:260:36: sparse: expected void *membase
drivers/clk/x86/clk-cgu.c:260:36: sparse: got void [noderef] <asn:2> *membase
drivers/clk/x86/clk-cgu.c:282:36: sparse: sparse: incorrect type in argument 1 (different address spaces)
drivers/clk/x86/clk-cgu.c:282:36: sparse: expected void *membase
drivers/clk/x86/clk-cgu.c:282:36: sparse: got void [noderef] <asn:2> *membase
drivers/clk/x86/clk-cgu.c:307:29: sparse: sparse: incorrect type in argument 1 (different address spaces)
drivers/clk/x86/clk-cgu.c:307:29: sparse: expected void *membase
drivers/clk/x86/clk-cgu.c:307:29: sparse: got void [noderef] <asn:2> *membase
drivers/clk/x86/clk-cgu.c:333:29: sparse: sparse: incorrect type in argument 1 (different address spaces)
drivers/clk/x86/clk-cgu.c:333:29: sparse: expected void *membase
drivers/clk/x86/clk-cgu.c:333:29: sparse: got void [noderef] <asn:2> *membase
drivers/clk/x86/clk-cgu.c:354:35: sparse: sparse: incorrect type in argument 1 (different address spaces)
drivers/clk/x86/clk-cgu.c:354:35: sparse: expected void *membase
drivers/clk/x86/clk-cgu.c:354:35: sparse: got void [noderef] <asn:2> *membase
drivers/clk/x86/clk-cgu.c:409:37: sparse: sparse: incorrect type in argument 1 (different address spaces)
drivers/clk/x86/clk-cgu.c:409:37: sparse: expected void *membase
drivers/clk/x86/clk-cgu.c:409:37: sparse: got void [noderef] <asn:2> *membase
drivers/clk/x86/clk-cgu.c:466:36: sparse: sparse: incorrect type in argument 1 (different address spaces)
drivers/clk/x86/clk-cgu.c:466:36: sparse: expected void *membase
drivers/clk/x86/clk-cgu.c:466:36: sparse: got void [noderef] <asn:2> *membase
drivers/clk/x86/clk-cgu.c:468:36: sparse: sparse: incorrect type in argument 1 (different address spaces)
drivers/clk/x86/clk-cgu.c:468:36: sparse: expected void *membase
drivers/clk/x86/clk-cgu.c:468:36: sparse: got void [noderef] <asn:2> *membase
drivers/clk/x86/clk-cgu.c:470:37: sparse: sparse: incorrect type in argument 1 (different address spaces)
drivers/clk/x86/clk-cgu.c:470:37: sparse: expected void *membase
drivers/clk/x86/clk-cgu.c:470:37: sparse: got void [noderef] <asn:2> *membase
--
>> drivers/clk/x86/clk-cgu-pll.c:49:42: sparse: sparse: incorrect type in argument 1 (different address spaces)
>> drivers/clk/x86/clk-cgu-pll.c:49:42: sparse: expected void *membase
>> drivers/clk/x86/clk-cgu-pll.c:49:42: sparse: got void [noderef] <asn:2> *membase
drivers/clk/x86/clk-cgu-pll.c:69:36: sparse: sparse: incorrect type in argument 1 (different address spaces)
drivers/clk/x86/clk-cgu-pll.c:69:36: sparse: expected void *membase
drivers/clk/x86/clk-cgu-pll.c:69:36: sparse: got void [noderef] <asn:2> *membase
drivers/clk/x86/clk-cgu-pll.c:70:35: sparse: sparse: incorrect type in argument 1 (different address spaces)
drivers/clk/x86/clk-cgu-pll.c:70:35: sparse: expected void *membase
drivers/clk/x86/clk-cgu-pll.c:70:35: sparse: got void [noderef] <asn:2> *membase
drivers/clk/x86/clk-cgu-pll.c:71:36: sparse: sparse: incorrect type in argument 1 (different address spaces)
drivers/clk/x86/clk-cgu-pll.c:71:36: sparse: expected void *membase
drivers/clk/x86/clk-cgu-pll.c:71:36: sparse: got void [noderef] <asn:2> *membase
drivers/clk/x86/clk-cgu-pll.c:94:34: sparse: sparse: incorrect type in argument 1 (different address spaces)
drivers/clk/x86/clk-cgu-pll.c:94:34: sparse: expected void *membase
drivers/clk/x86/clk-cgu-pll.c:94:34: sparse: got void [noderef] <asn:2> *membase
drivers/clk/x86/clk-cgu-pll.c:106:28: sparse: sparse: incorrect type in argument 1 (different address spaces)
drivers/clk/x86/clk-cgu-pll.c:106:28: sparse: expected void *membase
drivers/clk/x86/clk-cgu-pll.c:106:28: sparse: got void [noderef] <asn:2> *membase
drivers/clk/x86/clk-cgu-pll.c:118:28: sparse: sparse: incorrect type in argument 1 (different address spaces)
drivers/clk/x86/clk-cgu-pll.c:118:28: sparse: expected void *membase
drivers/clk/x86/clk-cgu-pll.c:118:28: sparse: got void [noderef] <asn:2> *membase

vim +32 drivers/clk/x86/clk-cgu.c

25
26 void lgm_set_clk_val(void *membase, u32 reg,
27 u8 shift, u8 width, u32 set_val)
28 {
29 u32 mask = (GENMASK(width - 1, 0) << shift);
30 u32 regval;
31
> 32 regval = readl(membase + reg);
33 regval = (regval & ~mask) | ((set_val << shift) & mask);
> 34 writel(regval, membase + reg);
35 }
36
37 u32 lgm_get_clk_val(void *membase, u32 reg, u8 shift, u8 width)
38 {
39 u32 val;
40
41 val = readl(membase + reg);
42 val = (val >> shift) & (BIT(width) - 1);
43
44 return val;
45 }
46
47 void lgm_clk_add_lookup(struct lgm_clk_provider *ctx,
48 struct clk_hw *hw, unsigned int id)
49 {
50 if (ctx->clk_data.hws)
51 ctx->clk_data.hws[id] = hw;
52 }
53
54 static struct clk_hw *lgm_clk_register_fixed(struct lgm_clk_provider *ctx,
55 const struct lgm_clk_branch *list)
56 {
57 unsigned long flags;
58
59 if (list->div_flags & CLOCK_FLAG_VAL_INIT) {
60 raw_spin_lock_irqsave(&ctx->lock, flags);
> 61 lgm_set_clk_val(ctx->membase, list->div_off, list->div_shift,
62 list->div_width, list->div_val);
63 raw_spin_unlock_irqrestore(&ctx->lock, flags);
64 }
65
66 return clk_hw_register_fixed_rate(NULL, list->name,
67 list->parent_names[0],
68 list->flags, list->mux_flags);
69 }
70

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

\
 
 \ /
  Last update: 2019-12-23 19:44    [W:0.093 / U:9.516 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site