* [linux-next:master 7640/10763] drivers/cpufreq/tegra186-cpufreq.c:108:18: sparse: sparse: incorrect type in assignment (different address spaces)
@ 2020-09-25 9:15 kernel test robot
2020-10-05 5:04 ` Viresh Kumar
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2020-09-25 9:15 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 4721 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: d1d2220c7f39d0fca302c4ba6cca4ede01660a2b
commit: b89c01c960511dcffe3666d89645c95445d00902 [7640/10763] cpufreq: tegra186: Fix initial frequency
config: arm64-randconfig-s031-20200923 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-201-g24bdaac6-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b89c01c960511dcffe3666d89645c95445d00902
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout b89c01c960511dcffe3666d89645c95445d00902
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
drivers/cpufreq/tegra186-cpufreq.c:72:37: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *driver_data @@ got void [noderef] __iomem * @@
drivers/cpufreq/tegra186-cpufreq.c:72:37: sparse: expected void *driver_data
drivers/cpufreq/tegra186-cpufreq.c:72:37: sparse: got void [noderef] __iomem *
drivers/cpufreq/tegra186-cpufreq.c:87:40: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void [noderef] __iomem *edvd_reg @@ got void *driver_data @@
drivers/cpufreq/tegra186-cpufreq.c:87:40: sparse: expected void [noderef] __iomem *edvd_reg
drivers/cpufreq/tegra186-cpufreq.c:87:40: sparse: got void *driver_data
>> drivers/cpufreq/tegra186-cpufreq.c:108:18: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *edvd_reg @@ got void *driver_data @@
drivers/cpufreq/tegra186-cpufreq.c:108:18: sparse: expected void [noderef] __iomem *edvd_reg
drivers/cpufreq/tegra186-cpufreq.c:108:18: sparse: got void *driver_data
vim +108 drivers/cpufreq/tegra186-cpufreq.c
53
54 static int tegra186_cpufreq_init(struct cpufreq_policy *policy)
55 {
56 struct tegra186_cpufreq_data *data = cpufreq_get_driver_data();
57 unsigned int i;
58
59 for (i = 0; i < data->num_clusters; i++) {
60 struct tegra186_cpufreq_cluster *cluster = &data->clusters[i];
61 const struct tegra186_cpufreq_cluster_info *info =
62 cluster->info;
63 int core;
64
65 for (core = 0; core < ARRAY_SIZE(info->cpus); core++) {
66 if (info->cpus[core] == policy->cpu)
67 break;
68 }
69 if (core == ARRAY_SIZE(info->cpus))
70 continue;
71
> 72 policy->driver_data =
73 data->regs + info->offset + EDVD_CORE_VOLT_FREQ(core);
74 policy->freq_table = cluster->table;
75 break;
76 }
77
78 policy->cpuinfo.transition_latency = 300 * 1000;
79
80 return 0;
81 }
82
83 static int tegra186_cpufreq_set_target(struct cpufreq_policy *policy,
84 unsigned int index)
85 {
86 struct cpufreq_frequency_table *tbl = policy->freq_table + index;
87 void __iomem *edvd_reg = policy->driver_data;
88 u32 edvd_val = tbl->driver_data;
89
90 writel(edvd_val, edvd_reg);
91
92 return 0;
93 }
94
95 static unsigned int tegra186_cpufreq_get(unsigned int cpu)
96 {
97 struct cpufreq_frequency_table *tbl;
98 struct cpufreq_policy *policy;
99 void __iomem *edvd_reg;
100 unsigned int i, freq = 0;
101 u32 ndiv;
102
103 policy = cpufreq_cpu_get(cpu);
104 if (!policy)
105 return 0;
106
107 tbl = policy->freq_table;
> 108 edvd_reg = policy->driver_data;
109 ndiv = readl(edvd_reg) & EDVD_CORE_VOLT_FREQ_F_MASK;
110
111 for (i = 0; tbl[i].frequency != CPUFREQ_TABLE_END; i++) {
112 if ((tbl[i].driver_data & EDVD_CORE_VOLT_FREQ_F_MASK) == ndiv) {
113 freq = tbl[i].frequency;
114 break;
115 }
116 }
117
118 cpufreq_cpu_put(policy);
119
120 return freq;
121 }
122
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 38635 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-next:master 7640/10763] drivers/cpufreq/tegra186-cpufreq.c:108:18: sparse: sparse: incorrect type in assignment (different address spaces)
2020-09-25 9:15 [linux-next:master 7640/10763] drivers/cpufreq/tegra186-cpufreq.c:108:18: sparse: sparse: incorrect type in assignment (different address spaces) kernel test robot
@ 2020-10-05 5:04 ` Viresh Kumar
0 siblings, 0 replies; 3+ messages in thread
From: Viresh Kumar @ 2020-10-05 5:04 UTC (permalink / raw)
To: kernel test robot; +Cc: Jon Hunter, kbuild-all, linux-pm
On 25-09-20, 17:15, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: d1d2220c7f39d0fca302c4ba6cca4ede01660a2b
> commit: b89c01c960511dcffe3666d89645c95445d00902 [7640/10763] cpufreq: tegra186: Fix initial frequency
> config: arm64-randconfig-s031-20200923 (attached as .config)
> compiler: aarch64-linux-gcc (GCC) 9.3.0
> reproduce:
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # apt-get install sparse
> # sparse version: v0.6.2-201-g24bdaac6-dirty
> # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b89c01c960511dcffe3666d89645c95445d00902
> git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> git fetch --no-tags linux-next master
> git checkout b89c01c960511dcffe3666d89645c95445d00902
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm64
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
>
> sparse warnings: (new ones prefixed by >>)
>
> drivers/cpufreq/tegra186-cpufreq.c:72:37: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *driver_data @@ got void [noderef] __iomem * @@
> drivers/cpufreq/tegra186-cpufreq.c:72:37: sparse: expected void *driver_data
> drivers/cpufreq/tegra186-cpufreq.c:72:37: sparse: got void [noderef] __iomem *
> drivers/cpufreq/tegra186-cpufreq.c:87:40: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void [noderef] __iomem *edvd_reg @@ got void *driver_data @@
> drivers/cpufreq/tegra186-cpufreq.c:87:40: sparse: expected void [noderef] __iomem *edvd_reg
> drivers/cpufreq/tegra186-cpufreq.c:87:40: sparse: got void *driver_data
> >> drivers/cpufreq/tegra186-cpufreq.c:108:18: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *edvd_reg @@ got void *driver_data @@
> drivers/cpufreq/tegra186-cpufreq.c:108:18: sparse: expected void [noderef] __iomem *edvd_reg
> drivers/cpufreq/tegra186-cpufreq.c:108:18: sparse: got void *driver_data
>
> vim +108 drivers/cpufreq/tegra186-cpufreq.c
>
> 53
> 54 static int tegra186_cpufreq_init(struct cpufreq_policy *policy)
> 55 {
> 56 struct tegra186_cpufreq_data *data = cpufreq_get_driver_data();
> 57 unsigned int i;
> 58
> 59 for (i = 0; i < data->num_clusters; i++) {
> 60 struct tegra186_cpufreq_cluster *cluster = &data->clusters[i];
> 61 const struct tegra186_cpufreq_cluster_info *info =
> 62 cluster->info;
> 63 int core;
> 64
> 65 for (core = 0; core < ARRAY_SIZE(info->cpus); core++) {
> 66 if (info->cpus[core] == policy->cpu)
> 67 break;
> 68 }
> 69 if (core == ARRAY_SIZE(info->cpus))
> 70 continue;
> 71
> > 72 policy->driver_data =
> 73 data->regs + info->offset + EDVD_CORE_VOLT_FREQ(core);
> 74 policy->freq_table = cluster->table;
> 75 break;
> 76 }
> 77
> 78 policy->cpuinfo.transition_latency = 300 * 1000;
> 79
> 80 return 0;
> 81 }
> 82
> 83 static int tegra186_cpufreq_set_target(struct cpufreq_policy *policy,
> 84 unsigned int index)
> 85 {
> 86 struct cpufreq_frequency_table *tbl = policy->freq_table + index;
> 87 void __iomem *edvd_reg = policy->driver_data;
> 88 u32 edvd_val = tbl->driver_data;
> 89
> 90 writel(edvd_val, edvd_reg);
> 91
> 92 return 0;
> 93 }
> 94
> 95 static unsigned int tegra186_cpufreq_get(unsigned int cpu)
> 96 {
> 97 struct cpufreq_frequency_table *tbl;
> 98 struct cpufreq_policy *policy;
> 99 void __iomem *edvd_reg;
> 100 unsigned int i, freq = 0;
> 101 u32 ndiv;
> 102
> 103 policy = cpufreq_cpu_get(cpu);
> 104 if (!policy)
> 105 return 0;
> 106
> 107 tbl = policy->freq_table;
> > 108 edvd_reg = policy->driver_data;
> 109 ndiv = readl(edvd_reg) & EDVD_CORE_VOLT_FREQ_F_MASK;
> 110
> 111 for (i = 0; tbl[i].frequency != CPUFREQ_TABLE_END; i++) {
> 112 if ((tbl[i].driver_data & EDVD_CORE_VOLT_FREQ_F_MASK) == ndiv) {
> 113 freq = tbl[i].frequency;
> 114 break;
> 115 }
> 116 }
> 117
> 118 cpufreq_cpu_put(policy);
> 119
> 120 return freq;
> 121 }
> 122
Jon,
Please send a fix for this.
--
viresh
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-next:master 7640/10763] drivers/cpufreq/tegra186-cpufreq.c:108:18: sparse: sparse: incorrect type in assignment (different address spaces)
@ 2020-10-05 5:04 ` Viresh Kumar
0 siblings, 0 replies; 3+ messages in thread
From: Viresh Kumar @ 2020-10-05 5:04 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 4909 bytes --]
On 25-09-20, 17:15, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: d1d2220c7f39d0fca302c4ba6cca4ede01660a2b
> commit: b89c01c960511dcffe3666d89645c95445d00902 [7640/10763] cpufreq: tegra186: Fix initial frequency
> config: arm64-randconfig-s031-20200923 (attached as .config)
> compiler: aarch64-linux-gcc (GCC) 9.3.0
> reproduce:
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # apt-get install sparse
> # sparse version: v0.6.2-201-g24bdaac6-dirty
> # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b89c01c960511dcffe3666d89645c95445d00902
> git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> git fetch --no-tags linux-next master
> git checkout b89c01c960511dcffe3666d89645c95445d00902
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm64
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
>
> sparse warnings: (new ones prefixed by >>)
>
> drivers/cpufreq/tegra186-cpufreq.c:72:37: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *driver_data @@ got void [noderef] __iomem * @@
> drivers/cpufreq/tegra186-cpufreq.c:72:37: sparse: expected void *driver_data
> drivers/cpufreq/tegra186-cpufreq.c:72:37: sparse: got void [noderef] __iomem *
> drivers/cpufreq/tegra186-cpufreq.c:87:40: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void [noderef] __iomem *edvd_reg @@ got void *driver_data @@
> drivers/cpufreq/tegra186-cpufreq.c:87:40: sparse: expected void [noderef] __iomem *edvd_reg
> drivers/cpufreq/tegra186-cpufreq.c:87:40: sparse: got void *driver_data
> >> drivers/cpufreq/tegra186-cpufreq.c:108:18: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *edvd_reg @@ got void *driver_data @@
> drivers/cpufreq/tegra186-cpufreq.c:108:18: sparse: expected void [noderef] __iomem *edvd_reg
> drivers/cpufreq/tegra186-cpufreq.c:108:18: sparse: got void *driver_data
>
> vim +108 drivers/cpufreq/tegra186-cpufreq.c
>
> 53
> 54 static int tegra186_cpufreq_init(struct cpufreq_policy *policy)
> 55 {
> 56 struct tegra186_cpufreq_data *data = cpufreq_get_driver_data();
> 57 unsigned int i;
> 58
> 59 for (i = 0; i < data->num_clusters; i++) {
> 60 struct tegra186_cpufreq_cluster *cluster = &data->clusters[i];
> 61 const struct tegra186_cpufreq_cluster_info *info =
> 62 cluster->info;
> 63 int core;
> 64
> 65 for (core = 0; core < ARRAY_SIZE(info->cpus); core++) {
> 66 if (info->cpus[core] == policy->cpu)
> 67 break;
> 68 }
> 69 if (core == ARRAY_SIZE(info->cpus))
> 70 continue;
> 71
> > 72 policy->driver_data =
> 73 data->regs + info->offset + EDVD_CORE_VOLT_FREQ(core);
> 74 policy->freq_table = cluster->table;
> 75 break;
> 76 }
> 77
> 78 policy->cpuinfo.transition_latency = 300 * 1000;
> 79
> 80 return 0;
> 81 }
> 82
> 83 static int tegra186_cpufreq_set_target(struct cpufreq_policy *policy,
> 84 unsigned int index)
> 85 {
> 86 struct cpufreq_frequency_table *tbl = policy->freq_table + index;
> 87 void __iomem *edvd_reg = policy->driver_data;
> 88 u32 edvd_val = tbl->driver_data;
> 89
> 90 writel(edvd_val, edvd_reg);
> 91
> 92 return 0;
> 93 }
> 94
> 95 static unsigned int tegra186_cpufreq_get(unsigned int cpu)
> 96 {
> 97 struct cpufreq_frequency_table *tbl;
> 98 struct cpufreq_policy *policy;
> 99 void __iomem *edvd_reg;
> 100 unsigned int i, freq = 0;
> 101 u32 ndiv;
> 102
> 103 policy = cpufreq_cpu_get(cpu);
> 104 if (!policy)
> 105 return 0;
> 106
> 107 tbl = policy->freq_table;
> > 108 edvd_reg = policy->driver_data;
> 109 ndiv = readl(edvd_reg) & EDVD_CORE_VOLT_FREQ_F_MASK;
> 110
> 111 for (i = 0; tbl[i].frequency != CPUFREQ_TABLE_END; i++) {
> 112 if ((tbl[i].driver_data & EDVD_CORE_VOLT_FREQ_F_MASK) == ndiv) {
> 113 freq = tbl[i].frequency;
> 114 break;
> 115 }
> 116 }
> 117
> 118 cpufreq_cpu_put(policy);
> 119
> 120 return freq;
> 121 }
> 122
Jon,
Please send a fix for this.
--
viresh
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-10-05 5:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-25 9:15 [linux-next:master 7640/10763] drivers/cpufreq/tegra186-cpufreq.c:108:18: sparse: sparse: incorrect type in assignment (different address spaces) kernel test robot
2020-10-05 5:04 ` Viresh Kumar
2020-10-05 5:04 ` Viresh Kumar
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.