[chanwoo:devfreq-testing-qcom-l2 2/3] drivers/devfreq/krait-cache-devfreq.c:100:3: error: 'struct devfreq_dev_profile' has no member named 'target'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git devfreq-testing-qcom-l2
head: 0710a546fe23fc744371ae2eaab3877a2678f647
commit: 1b1177093e008343203b2a04ff8b015688516cb9 [2/3] devfreq: qcom: Add L2 Krait Cache devfreq scaling driver
config: parisc-randconfig-r006-20210517 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git/commit/...
git remote add chanwoo https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git
git fetch --no-tags chanwoo devfreq-testing-qcom-l2
git checkout 1b1177093e008343203b2a04ff8b015688516cb9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=parisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
In file included from drivers/devfreq/krait-cache-devfreq.c:7:
include/linux/devfreq.h:117:2: error: expected specifier-qualifier-list before '*' token
117 | * @up_threshold: If the load is over this value, the frequency jumps.
| ^
include/linux/devfreq.h:117:4: error: stray '@' in program
117 | * @up_threshold: If the load is over this value, the frequency jumps.
| ^
include/linux/devfreq.h:119:4: error: stray '@' in program
119 | * @down_differential: If the load is under upthreshold - downdifferential,
| ^
In file included from drivers/devfreq/krait-cache-devfreq.c:15:
drivers/devfreq/governor.h: In function 'devfreq_update_stats':
drivers/devfreq/governor.h:102:18: error: 'struct devfreq_dev_profile' has no member named 'get_dev_status'
102 | if (!df->profile->get_dev_status)
| ^~
drivers/devfreq/governor.h:105:20: error: 'struct devfreq_dev_profile' has no member named 'get_dev_status'
105 | return df->profile->get_dev_status(df->dev.parent, &df->last_status);
| ^~
drivers/devfreq/krait-cache-devfreq.c: At top level:
>> drivers/devfreq/krait-cache-devfreq.c:100:3: error: 'struct devfreq_dev_profile' has no member named 'target'
100 | .target = krait_cache_target,
| ^~~~~~
>> drivers/devfreq/krait-cache-devfreq.c:100:12: warning: initialization of 'long unsigned int' from 'int (*)(struct device *, long unsigned int *, u32)' {aka 'int (*)(struct device *, long unsigned int *, unsigned int)'} makes integer from pointer without a cast [-Wint-conversion]
100 | .target = krait_cache_target,
| ^~~~~~~~~~~~~~~~~~
drivers/devfreq/krait-cache-devfreq.c:100:12: note: (near initialization for 'tegra_devfreq_profile.initial_freq')
>> drivers/devfreq/krait-cache-devfreq.c:101:3: error: 'struct devfreq_dev_profile' has no member named 'get_dev_status'
101 | .get_dev_status = krait_cache_get_dev_status,
| ^~~~~~~~~~~~~~
>> drivers/devfreq/krait-cache-devfreq.c:101:20: warning: initialization of 'unsigned int' from 'int (*)(struct device *, struct devfreq_dev_status *)' makes integer from pointer without a cast [-Wint-conversion]
101 | .get_dev_status = krait_cache_get_dev_status,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/devfreq/krait-cache-devfreq.c:101:20: note: (near initialization for 'tegra_devfreq_profile.polling_ms')
>> drivers/devfreq/krait-cache-devfreq.c:102:3: error: 'struct devfreq_dev_profile' has no member named 'get_cur_freq'
102 | .get_cur_freq = krait_cache_get_cur_freq
| ^~~~~~~~~~~~
>> drivers/devfreq/krait-cache-devfreq.c:102:18: error: incompatible types when initializing type 'enum devfreq_timer' using type 'int (*)(struct device *, long unsigned int *)'
102 | .get_cur_freq = krait_cache_get_cur_freq
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/devfreq/krait-cache-devfreq.c: In function 'krait_cache_notifier':
drivers/devfreq/krait-cache-devfreq.c:134:24: error: 'struct devfreq_dev_profile' has no member named 'target'
134 | ret = devfreq->profile->target(data->dev, &freq, 0);
| ^~
>> drivers/devfreq/krait-cache-devfreq.c:138:22: error: 'struct devfreq_dev_profile' has no member named 'freq_table'
138 | if (devfreq->profile->freq_table &&
| ^~
drivers/devfreq/krait-cache-devfreq.c: At top level:
>> drivers/devfreq/krait-cache-devfreq.c:199:3: error: 'struct devfreq_governor' has no member named 'immutable'
199 | .immutable = true,
| ^~~~~~~~~
>> drivers/devfreq/krait-cache-devfreq.c:199:15: warning: excess elements in struct initializer
199 | .immutable = true,
| ^~~~
drivers/devfreq/krait-cache-devfreq.c:199:15: note: (near initialization for 'krait_devfreq_governor')
drivers/devfreq/krait-cache-devfreq.c: In function 'krait_cache_probe':
drivers/devfreq/krait-cache-devfreq.c:264:43: error: 'struct devfreq_dev_profile' has no member named 'freq_table'
264 | data->freq_table = data->devfreq->profile->freq_table;
| ^~
vim +100 drivers/devfreq/krait-cache-devfreq.c
98
99 static struct devfreq_dev_profile tegra_devfreq_profile = {
> 100 .target = krait_cache_target,
> 101 .get_dev_status = krait_cache_get_dev_status,
> 102 .get_cur_freq = krait_cache_get_cur_freq
103 };
104
105 static int krait_cache_notifier(struct notifier_block *nb, unsigned long action,
106 void *v)
107 {
108 struct cpufreq_freqs *freqs;
109 unsigned int cpu, cur_cpu;
110 struct krait_data *data;
111 struct devfreq *devfreq;
112 unsigned long freq;
113 int ret = 0;
114
115 if (action != CPUFREQ_POSTCHANGE)
116 return NOTIFY_OK;
117
118 data = container_of(nb, struct krait_data, nb);
119 devfreq = data->devfreq;
120
121 mutex_lock_nested(&devfreq->lock, SINGLE_DEPTH_NESTING);
122
123 freqs = (struct cpufreq_freqs *)v;
124 freq = freqs->new;
125 cur_cpu = freqs->policy->cpu;
126
127 /* find the max freq across all core */
128 for_each_present_cpu(cpu)
129 if (cpu != cur_cpu)
130 freq = max(freq, (unsigned long)cpufreq_quick_get(cpu));
131
132 devfreq->governor->get_target_freq(devfreq, &freq);
133
134 ret = devfreq->profile->target(data->dev, &freq, 0);
135 if (ret < 0)
136 goto out;
137
> 138 if (devfreq->profile->freq_table &&
139 (devfreq_update_status(devfreq, freq)))
140 dev_err(data->dev,
141 "Couldn't update frequency transition information.\n");
142
143 devfreq->previous_freq = freq;
144
145 out:
146 mutex_unlock(&devfreq->lock);
147 return notifier_from_errno(ret);
148 };
149
150 static int krait_cache_governor_get_target(struct devfreq *devfreq,
151 unsigned long *freq)
152 {
153 unsigned int *l2_cpufreq;
154 unsigned long *freq_table;
155 unsigned long target_freq = *freq;
156 struct krait_data *data = dev_get_drvdata(devfreq->dev.parent);
157
158 l2_cpufreq = data->l2_cpufreq;
159 freq_table = data->freq_table;
160
161 /*
162 * Find the highest l2 freq interval based on the max cpufreq
163 * across all core
164 */
165 while (*(l2_cpufreq = l2_cpufreq + 1) && target_freq >= *l2_cpufreq)
166 freq_table = freq_table + 1;
167
168 *freq = *freq_table;
169
170 return 0;
171 };
172
173 static int krait_cache_governor_event_handler(struct devfreq *devfreq,
174 unsigned int event, void *data)
175 {
176 struct krait_data *kdata = dev_get_drvdata(devfreq->dev.parent);
177 int ret = 0;
178
179 switch (event) {
180 case DEVFREQ_GOV_START:
181 kdata->nb.notifier_call = krait_cache_notifier;
182 ret = cpufreq_register_notifier(&kdata->nb,
183 CPUFREQ_TRANSITION_NOTIFIER);
184 break;
185
186 case DEVFREQ_GOV_STOP:
187 cpufreq_unregister_notifier(&kdata->nb,
188 CPUFREQ_TRANSITION_NOTIFIER);
189 break;
190 }
191
192 return ret;
193 };
194
195 static struct devfreq_governor krait_devfreq_governor = {
196 .name = "krait_governor",
197 .get_target_freq = krait_cache_governor_get_target,
198 .event_handler = krait_cache_governor_event_handler,
> 199 .immutable = true,
200 };
201
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[chanwoo:devfreq-testing-qcom-l2 1/3] drivers/memory/tegra/tegra20-emc.c:1042:2: warning: the address of 'tegra_emc_devfreq_get_dev_status' will always evaluate as 'true'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git devfreq-testing-qcom-l2
head: 0710a546fe23fc744371ae2eaab3877a2678f647
commit: f3ff8a27ab2f41bffcc6d620e6f475a7a8822ccf [1/3] PM / devfreq: Add new up_threshold and down_differential sysfs attrs
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git/commit/...
git remote add chanwoo https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git
git fetch --no-tags chanwoo devfreq-testing-qcom-l2
git checkout f3ff8a27ab2f41bffcc6d620e6f475a7a8822ccf
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/memory/tegra/tegra20-emc.c:11:
include/linux/devfreq.h:117:2: error: expected specifier-qualifier-list before '*' token
117 | * @up_threshold: If the load is over this value, the frequency jumps.
| ^
include/linux/devfreq.h:117:4: error: stray '@' in program
117 | * @up_threshold: If the load is over this value, the frequency jumps.
| ^
include/linux/devfreq.h:119:4: error: stray '@' in program
119 | * @down_differential: If the load is under upthreshold - downdifferential,
| ^
drivers/memory/tegra/tegra20-emc.c:203:38: error: field 'ondemand_data' has incomplete type
203 | struct devfreq_simple_ondemand_data ondemand_data;
| ^~~~~~~~~~~~~
drivers/memory/tegra/tegra20-emc.c:1041:3: error: 'struct devfreq_dev_profile' has no member named 'target'
1041 | .target = tegra_emc_devfreq_target,
| ^~~~~~
drivers/memory/tegra/tegra20-emc.c:1041:12: error: incompatible types when initializing type 'enum devfreq_timer' using type 'int (*)(struct device *, long unsigned int *, u32)' {aka 'int (*)(struct device *, long unsigned int *, unsigned int)'}
1041 | .target = tegra_emc_devfreq_target,
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/memory/tegra/tegra20-emc.c:1042:3: error: 'struct devfreq_dev_profile' has no member named 'get_dev_status'
1042 | .get_dev_status = tegra_emc_devfreq_get_dev_status,
| ^~~~~~~~~~~~~~
>> drivers/memory/tegra/tegra20-emc.c:1042:2: warning: the address of 'tegra_emc_devfreq_get_dev_status' will always evaluate as 'true' [-Waddress]
1042 | .get_dev_status = tegra_emc_devfreq_get_dev_status,
| ^
vim +1042 drivers/memory/tegra/tegra20-emc.c
dedf62d6f17fc9 Dmitry Osipenko 2020-11-11 1038
dedf62d6f17fc9 Dmitry Osipenko 2020-11-11 1039 static struct devfreq_dev_profile tegra_emc_devfreq_profile = {
dedf62d6f17fc9 Dmitry Osipenko 2020-11-11 1040 .polling_ms = 30,
dedf62d6f17fc9 Dmitry Osipenko 2020-11-11 1041 .target = tegra_emc_devfreq_target,
dedf62d6f17fc9 Dmitry Osipenko 2020-11-11 @1042 .get_dev_status = tegra_emc_devfreq_get_dev_status,
dedf62d6f17fc9 Dmitry Osipenko 2020-11-11 1043 };
dedf62d6f17fc9 Dmitry Osipenko 2020-11-11 1044
:::::: The code at line 1042 was first introduced by commit
:::::: dedf62d6f17fc9cf0389602b6d3d7533cc218679 memory: tegra20-emc: Add devfreq support
:::::: TO: Dmitry Osipenko <digetx(a)gmail.com>
:::::: CC: Krzysztof Kozlowski <krzk(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[chanwoo:devfreq-testing-qcom-l2 1/3] include/linux/devfreq.h:117:2: error: type name requires a specifier or qualifier
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git devfreq-testing-qcom-l2
head: 0710a546fe23fc744371ae2eaab3877a2678f647
commit: f3ff8a27ab2f41bffcc6d620e6f475a7a8822ccf [1/3] PM / devfreq: Add new up_threshold and down_differential sysfs attrs
config: x86_64-randconfig-a004-20210517 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project a80a5036a1f6b9a9eb4038b30458f9ab349efff8)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git/commit/...
git remote add chanwoo https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git
git fetch --no-tags chanwoo devfreq-testing-qcom-l2
git checkout f3ff8a27ab2f41bffcc6d620e6f475a7a8822ccf
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/devfreq/governor_performance.c:9:
>> include/linux/devfreq.h:117:2: error: type name requires a specifier or qualifier
* @up_threshold: If the load is over this value, the frequency jumps.
^
>> include/linux/devfreq.h:117:4: error: expected member name or ';' after declaration specifiers
* @up_threshold: If the load is over this value, the frequency jumps.
^
>> include/linux/devfreq.h:117:3: error: expected ';' at end of declaration list
* @up_threshold: If the load is over this value, the frequency jumps.
^
;
3 errors generated.
--
In file included from drivers/devfreq/devfreq.c:14:
In file included from include/linux/devfreq_cooling.h:13:
>> include/linux/devfreq.h:117:2: error: type name requires a specifier or qualifier
* @up_threshold: If the load is over this value, the frequency jumps.
^
>> include/linux/devfreq.h:117:4: error: expected member name or ';' after declaration specifiers
* @up_threshold: If the load is over this value, the frequency jumps.
^
>> include/linux/devfreq.h:117:3: error: expected ';' at end of declaration list
* @up_threshold: If the load is over this value, the frequency jumps.
^
;
>> drivers/devfreq/devfreq.c:1854:43: error: no member named 'up_threshold' in 'struct devfreq_dev_profile'
return sprintf(buf, "%d\n", df->profile->up_threshold
~~~~~~~~~~~ ^
drivers/devfreq/devfreq.c:1855:21: error: no member named 'up_threshold' in 'struct devfreq_dev_profile'
? df->profile->up_threshold
~~~~~~~~~~~ ^
drivers/devfreq/devfreq.c:1887:15: error: no member named 'up_threshold' in 'struct devfreq_dev_profile'
df->profile->up_threshold = value;
~~~~~~~~~~~ ^
drivers/devfreq/devfreq.c:1930:30: error: no member named 'up_threshold' in 'struct devfreq_dev_profile'
up_threshold = df->profile->up_threshold
~~~~~~~~~~~ ^
drivers/devfreq/devfreq.c:1931:20: error: no member named 'up_threshold' in 'struct devfreq_dev_profile'
? df->profile->up_threshold
~~~~~~~~~~~ ^
drivers/devfreq/devfreq.c:2059:37: error: no member named 'up_threshold' in 'struct devfreq_dev_profile'
up_threshold = devfreq->profile->up_threshold
~~~~~~~~~~~~~~~~ ^
drivers/devfreq/devfreq.c:2060:26: error: no member named 'up_threshold' in 'struct devfreq_dev_profile'
? devfreq->profile->up_threshold
~~~~~~~~~~~~~~~~ ^
10 errors generated.
--
In file included from drivers/devfreq/governor_simpleondemand.c:11:
>> include/linux/devfreq.h:117:2: error: type name requires a specifier or qualifier
* @up_threshold: If the load is over this value, the frequency jumps.
^
>> include/linux/devfreq.h:117:4: error: expected member name or ';' after declaration specifiers
* @up_threshold: If the load is over this value, the frequency jumps.
^
>> include/linux/devfreq.h:117:3: error: expected ';' at end of declaration list
* @up_threshold: If the load is over this value, the frequency jumps.
^
;
>> drivers/devfreq/governor_simpleondemand.c:30:19: error: no member named 'up_threshold' in 'struct devfreq_dev_profile'
if (df->profile->up_threshold)
~~~~~~~~~~~ ^
drivers/devfreq/governor_simpleondemand.c:31:35: error: no member named 'up_threshold' in 'struct devfreq_dev_profile'
dfso_upthreshold = df->profile->up_threshold;
~~~~~~~~~~~ ^
5 errors generated.
vim +117 include/linux/devfreq.h
73
74 /**
75 * struct devfreq_dev_profile - Devfreq's user device profile
76 * @initial_freq: The operating frequency when devfreq_add_device() is
77 * called.
78 * @polling_ms: The polling interval in ms. 0 disables polling.
79 * @timer: Timer type is either deferrable or delayed timer.
80 * @target: The device should set its operating frequency at
81 * freq or lowest-upper-than-freq value. If freq is
82 * higher than any operable frequency, set maximum.
83 * Before returning, target function should set
84 * freq at the current frequency.
85 * The "flags" parameter's possible values are
86 * explained above with "DEVFREQ_FLAG_*" macros.
87 * @get_dev_status: The device should provide the current performance
88 * status to devfreq. Governors are recommended not to
89 * use this directly. Instead, governors are recommended
90 * to use devfreq_update_stats() along with
91 * devfreq.last_status.
92 * @get_cur_freq: The device should provide the current frequency
93 * at which it is operating.
94 * @exit: An optional callback that is called when devfreq
95 * is removing the devfreq object due to error or
96 * from devfreq_remove_device() call. If the user
97 * has registered devfreq->nb at a notifier-head,
98 * this is the time to unregister it.
99 * @freq_table: Optional list of frequencies to support statistics
100 * and freq_table must be generated in ascending order.
101 * @max_state: The size of freq_table.
102 *
103 * @is_cooling_device: A self-explanatory boolean giving the device a
104 * cooling effect property.
105 * @up_threshold: If the load is over this value, the frequency jumps.
106 * Specify 0 to use the default. Valid value = 0 to 100.
107 * @down_differential: If the load is under upthreshold - downdifferential,
108 * the governor may consider slowing the frequency down.
109 * Specify 0 to use the default. Valid value = 0 to 100.
110 * downdifferential < upthreshold must hold.
111 */
112 struct devfreq_dev_profile {
113 unsigned long initial_freq;
114 unsigned int polling_ms;
115 enum devfreq_timer timer;
116 bool is_cooling_device;
> 117 * @up_threshold: If the load is over this value, the frequency jumps.
118 * Specify 0 to use the default. Valid value = 0 to 100.
119 * @down_differential: If the load is under upthreshold - downdifferential,
120 * the governor may consider slowing the frequency down.
121 * Specify 0 to use the default. Valid value = 0 to 100.
122 * downdifferential < upthreshold must hold.
123 unsigned int up_threshold;
124 unsigned int down_differential;
125
126 int (*target)(struct device *dev, unsigned long *freq, u32 flags);
127 int (*get_dev_status)(struct device *dev,
128 struct devfreq_dev_status *stat);
129 int (*get_cur_freq)(struct device *dev, unsigned long *freq);
130 void (*exit)(struct device *dev);
131
132 unsigned long *freq_table;
133 unsigned int max_state;
134 };
135
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[chanwoo:devfreq-testing-qcom-l2 1/3] drivers/memory/samsung/exynos5422-dmc.c:989:3: error: 'struct devfreq_dev_profile' has no member named 'target'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git devfreq-testing-qcom-l2
head: 0710a546fe23fc744371ae2eaab3877a2678f647
commit: f3ff8a27ab2f41bffcc6d620e6f475a7a8822ccf [1/3] PM / devfreq: Add new up_threshold and down_differential sysfs attrs
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git/commit/...
git remote add chanwoo https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git
git fetch --no-tags chanwoo devfreq-testing-qcom-l2
git checkout f3ff8a27ab2f41bffcc6d620e6f475a7a8822ccf
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=ia64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
In file included from drivers/memory/samsung/exynos5422-dmc.c:8:
include/linux/devfreq.h:117:2: error: expected specifier-qualifier-list before '*' token
117 | * @up_threshold: If the load is over this value, the frequency jumps.
| ^
include/linux/devfreq.h:117:4: error: stray '@' in program
117 | * @up_threshold: If the load is over this value, the frequency jumps.
| ^
include/linux/devfreq.h:119:4: error: stray '@' in program
119 | * @down_differential: If the load is under upthreshold - downdifferential,
| ^
>> drivers/memory/samsung/exynos5422-dmc.c:989:3: error: 'struct devfreq_dev_profile' has no member named 'target'
989 | .target = exynos5_dmc_target,
| ^~~~~~
>> drivers/memory/samsung/exynos5422-dmc.c:989:2: warning: the address of 'exynos5_dmc_target' will always evaluate as 'true' [-Waddress]
989 | .target = exynos5_dmc_target,
| ^
>> drivers/memory/samsung/exynos5422-dmc.c:990:3: error: 'struct devfreq_dev_profile' has no member named 'get_dev_status'
990 | .get_dev_status = exynos5_dmc_get_status,
| ^~~~~~~~~~~~~~
>> drivers/memory/samsung/exynos5422-dmc.c:990:20: warning: excess elements in struct initializer
990 | .get_dev_status = exynos5_dmc_get_status,
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/memory/samsung/exynos5422-dmc.c:990:20: note: (near initialization for 'exynos5_dmc_df_profile')
>> drivers/memory/samsung/exynos5422-dmc.c:991:3: error: 'struct devfreq_dev_profile' has no member named 'get_cur_freq'
991 | .get_cur_freq = exynos5_dmc_get_cur_freq,
| ^~~~~~~~~~~~
drivers/memory/samsung/exynos5422-dmc.c:991:18: warning: excess elements in struct initializer
991 | .get_cur_freq = exynos5_dmc_get_cur_freq,
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/memory/samsung/exynos5422-dmc.c:991:18: note: (near initialization for 'exynos5_dmc_df_profile')
drivers/memory/samsung/exynos5422-dmc.c: In function 'exynos5_dmc_probe':
>> drivers/memory/samsung/exynos5422-dmc.c:1495:25: error: 'struct devfreq_dev_profile' has no member named 'up_threshold'
1495 | exynos5_dmc_df_profile.up_threshold = 55;
| ^
>> drivers/memory/samsung/exynos5422-dmc.c:1496:25: error: 'struct devfreq_dev_profile' has no member named 'down_differential'
1496 | exynos5_dmc_df_profile.down_differential = 5;
| ^
drivers/memory/samsung/exynos5422-dmc.c:1512:25: error: 'struct devfreq_dev_profile' has no member named 'up_threshold'
1512 | exynos5_dmc_df_profile.up_threshold = 10;
| ^
drivers/memory/samsung/exynos5422-dmc.c:1513:25: error: 'struct devfreq_dev_profile' has no member named 'down_differential'
1513 | exynos5_dmc_df_profile.down_differential = 5;
| ^
--
In file included from drivers/gpu/drm/lima/lima_devfreq.h:7,
from drivers/gpu/drm/lima/lima_device.h:14,
from drivers/gpu/drm/lima/lima_drv.c:14:
include/linux/devfreq.h:117:2: error: expected specifier-qualifier-list before '*' token
117 | * @up_threshold: If the load is over this value, the frequency jumps.
| ^
include/linux/devfreq.h:117:4: error: stray '@' in program
117 | * @up_threshold: If the load is over this value, the frequency jumps.
| ^
include/linux/devfreq.h:119:4: error: stray '@' in program
119 | * @down_differential: If the load is under upthreshold - downdifferential,
| ^
In file included from drivers/gpu/drm/lima/lima_device.h:14,
from drivers/gpu/drm/lima/lima_drv.c:14:
>> drivers/gpu/drm/lima/lima_devfreq.h:19:38: error: field 'gov_data' has incomplete type
19 | struct devfreq_simple_ondemand_data gov_data;
| ^~~~~~~~
--
In file included from drivers/gpu/drm/lima/lima_devfreq.c:9:
include/linux/devfreq.h:117:2: error: expected specifier-qualifier-list before '*' token
117 | * @up_threshold: If the load is over this value, the frequency jumps.
| ^
include/linux/devfreq.h:117:4: error: stray '@' in program
117 | * @up_threshold: If the load is over this value, the frequency jumps.
| ^
include/linux/devfreq.h:119:4: error: stray '@' in program
119 | * @down_differential: If the load is under upthreshold - downdifferential,
| ^
In file included from drivers/gpu/drm/lima/lima_device.h:14,
from drivers/gpu/drm/lima/lima_devfreq.c:16:
>> drivers/gpu/drm/lima/lima_devfreq.h:19:38: error: field 'gov_data' has incomplete type
19 | struct devfreq_simple_ondemand_data gov_data;
| ^~~~~~~~
>> drivers/gpu/drm/lima/lima_devfreq.c:86:3: error: 'struct devfreq_dev_profile' has no member named 'target'
86 | .target = lima_devfreq_target,
| ^~~~~~
>> drivers/gpu/drm/lima/lima_devfreq.c:86:12: error: incompatible types when initializing type 'enum devfreq_timer' using type 'int (*)(struct device *, long unsigned int *, u32)' {aka 'int (*)(struct device *, long unsigned int *, unsigned int)'}
86 | .target = lima_devfreq_target,
| ^~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/lima/lima_devfreq.c:87:3: error: 'struct devfreq_dev_profile' has no member named 'get_dev_status'
87 | .get_dev_status = lima_devfreq_get_dev_status,
| ^~~~~~~~~~~~~~
>> drivers/gpu/drm/lima/lima_devfreq.c:87:2: warning: the address of 'lima_devfreq_get_dev_status' will always evaluate as 'true' [-Waddress]
87 | .get_dev_status = lima_devfreq_get_dev_status,
| ^
--
In file included from drivers/gpu/drm/panfrost/panfrost_devfreq.h:7,
from drivers/gpu/drm/panfrost/panfrost_device.h:16,
from drivers/gpu/drm/panfrost/panfrost_drv.c:16:
include/linux/devfreq.h:117:2: error: expected specifier-qualifier-list before '*' token
117 | * @up_threshold: If the load is over this value, the frequency jumps.
| ^
include/linux/devfreq.h:117:4: error: stray '@' in program
117 | * @up_threshold: If the load is over this value, the frequency jumps.
| ^
include/linux/devfreq.h:119:4: error: stray '@' in program
119 | * @down_differential: If the load is under upthreshold - downdifferential,
| ^
In file included from drivers/gpu/drm/panfrost/panfrost_device.h:16,
from drivers/gpu/drm/panfrost/panfrost_drv.c:16:
>> drivers/gpu/drm/panfrost/panfrost_devfreq.h:19:38: error: field 'gov_data' has incomplete type
19 | struct devfreq_simple_ondemand_data gov_data;
| ^~~~~~~~
--
In file included from drivers/gpu/drm/panfrost/panfrost_devfreq.c:5:
include/linux/devfreq.h:117:2: error: expected specifier-qualifier-list before '*' token
117 | * @up_threshold: If the load is over this value, the frequency jumps.
| ^
include/linux/devfreq.h:117:4: error: stray '@' in program
117 | * @up_threshold: If the load is over this value, the frequency jumps.
| ^
include/linux/devfreq.h:119:4: error: stray '@' in program
119 | * @down_differential: If the load is under upthreshold - downdifferential,
| ^
In file included from drivers/gpu/drm/panfrost/panfrost_device.h:16,
from drivers/gpu/drm/panfrost/panfrost_devfreq.c:10:
>> drivers/gpu/drm/panfrost/panfrost_devfreq.h:19:38: error: field 'gov_data' has incomplete type
19 | struct devfreq_simple_ondemand_data gov_data;
| ^~~~~~~~
>> drivers/gpu/drm/panfrost/panfrost_devfreq.c:81:3: error: 'struct devfreq_dev_profile' has no member named 'target'
81 | .target = panfrost_devfreq_target,
| ^~~~~~
>> drivers/gpu/drm/panfrost/panfrost_devfreq.c:81:12: error: incompatible types when initializing type 'enum devfreq_timer' using type 'int (*)(struct device *, long unsigned int *, u32)' {aka 'int (*)(struct device *, long unsigned int *, unsigned int)'}
81 | .target = panfrost_devfreq_target,
| ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/panfrost/panfrost_devfreq.c:82:3: error: 'struct devfreq_dev_profile' has no member named 'get_dev_status'
82 | .get_dev_status = panfrost_devfreq_get_dev_status,
| ^~~~~~~~~~~~~~
>> drivers/gpu/drm/panfrost/panfrost_devfreq.c:82:2: warning: the address of 'panfrost_devfreq_get_dev_status' will always evaluate as 'true' [-Waddress]
82 | .get_dev_status = panfrost_devfreq_get_dev_status,
| ^
vim +989 drivers/memory/samsung/exynos5422-dmc.c
6e7674c3c6df56 Lukasz Luba 2019-08-21 981
4c2af5ddf84b45 Krzysztof Kozlowski 2020-08-22 982 /*
6e7674c3c6df56 Lukasz Luba 2019-08-21 983 * exynos5_dmc_df_profile - Devfreq governor's profile structure
6e7674c3c6df56 Lukasz Luba 2019-08-21 984 *
6e7674c3c6df56 Lukasz Luba 2019-08-21 985 * It provides to the devfreq framework needed functions and polling period.
6e7674c3c6df56 Lukasz Luba 2019-08-21 986 */
6e7674c3c6df56 Lukasz Luba 2019-08-21 987 static struct devfreq_dev_profile exynos5_dmc_df_profile = {
ae8eb8ba521c8e Chanwoo Choi 2020-07-03 988 .timer = DEVFREQ_TIMER_DELAYED,
6e7674c3c6df56 Lukasz Luba 2019-08-21 @989 .target = exynos5_dmc_target,
6e7674c3c6df56 Lukasz Luba 2019-08-21 @990 .get_dev_status = exynos5_dmc_get_status,
6e7674c3c6df56 Lukasz Luba 2019-08-21 @991 .get_cur_freq = exynos5_dmc_get_cur_freq,
6e7674c3c6df56 Lukasz Luba 2019-08-21 992 };
6e7674c3c6df56 Lukasz Luba 2019-08-21 993
:::::: The code at line 989 was first introduced by commit
:::::: 6e7674c3c6df565ab47d02b4f2e608e3477cdf86 memory: Add DMC driver for Exynos5422
:::::: TO: Lukasz Luba <l.luba(a)partner.samsung.com>
:::::: CC: Krzysztof Kozlowski <krzk(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c:596:48: sparse: sparse: cast removes address space '__iomem' of expression
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 63d1cb53e26a9a4168b84a8981b225c0a9cfa235
commit: ea29b20a828511de3348334e529a3d046a180416 init/Kconfig: make COMPILE_TEST depend on HAS_IOMEM
date: 9 weeks ago
config: s390-randconfig-s032-20210517 (attached as .config)
compiler: s390-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.3-341-g8af24329-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout ea29b20a828511de3348334e529a3d046a180416
# 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__' W=1 ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c:596:48: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c:646:35: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void *hwbase @@
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c:646:35: sparse: expected void volatile [noderef] __iomem *addr
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c:646:35: sparse: got void *hwbase
>> drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c:1155:21: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected unsigned long long [usertype] *ptr @@ got void [noderef] __iomem * @@
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c:1155:21: sparse: expected unsigned long long [usertype] *ptr
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c:1155:21: sparse: got void [noderef] __iomem *
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c:1180:21: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected unsigned long long [usertype] *ptr @@ got void [noderef] __iomem * @@
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c:1180:21: sparse: expected unsigned long long [usertype] *ptr
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c:1180:21: sparse: got void [noderef] __iomem *
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c: note: in included file (through arch/s390/include/asm/io.h, include/linux/io.h, include/linux/pci.h):
include/asm-generic/io.h:236:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned long long [usertype] val @@ got restricted __le64 [usertype] @@
include/asm-generic/io.h:236:22: sparse: expected unsigned long long [usertype] val
include/asm-generic/io.h:236:22: sparse: got restricted __le64 [usertype]
include/asm-generic/io.h:236:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned long long [usertype] val @@ got restricted __le64 [usertype] @@
include/asm-generic/io.h:236:22: sparse: expected unsigned long long [usertype] val
include/asm-generic/io.h:236:22: sparse: got restricted __le64 [usertype]
include/asm-generic/io.h:236:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned long long [usertype] val @@ got restricted __le64 [usertype] @@
include/asm-generic/io.h:236:22: sparse: expected unsigned long long [usertype] val
include/asm-generic/io.h:236:22: sparse: got restricted __le64 [usertype]
include/asm-generic/io.h:236:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned long long [usertype] val @@ got restricted __le64 [usertype] @@
include/asm-generic/io.h:236:22: sparse: expected unsigned long long [usertype] val
include/asm-generic/io.h:236:22: sparse: got restricted __le64 [usertype]
include/asm-generic/io.h:236:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned long long [usertype] val @@ got restricted __le64 [usertype] @@
include/asm-generic/io.h:236:22: sparse: expected unsigned long long [usertype] val
include/asm-generic/io.h:236:22: sparse: got restricted __le64 [usertype]
include/asm-generic/io.h:236:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned long long [usertype] val @@ got restricted __le64 [usertype] @@
include/asm-generic/io.h:236:22: sparse: expected unsigned long long [usertype] val
include/asm-generic/io.h:236:22: sparse: got restricted __le64 [usertype]
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:236:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned long long [usertype] val @@ got restricted __le64 [usertype] @@
include/asm-generic/io.h:236:22: sparse: expected unsigned long long [usertype] val
include/asm-generic/io.h:236:22: sparse: got restricted __le64 [usertype]
include/asm-generic/io.h:236:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned long long [usertype] val @@ got restricted __le64 [usertype] @@
include/asm-generic/io.h:236:22: sparse: expected unsigned long long [usertype] val
include/asm-generic/io.h:236:22: sparse: got restricted __le64 [usertype]
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:236:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned long long [usertype] val @@ got restricted __le64 [usertype] @@
include/asm-generic/io.h:236:22: sparse: expected unsigned long long [usertype] val
include/asm-generic/io.h:236:22: sparse: got restricted __le64 [usertype]
include/asm-generic/io.h:236:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned long long [usertype] val @@ got restricted __le64 [usertype] @@
include/asm-generic/io.h:236:22: sparse: expected unsigned long long [usertype] val
include/asm-generic/io.h:236:22: sparse: got restricted __le64 [usertype]
include/asm-generic/io.h:236:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned long long [usertype] val @@ got restricted __le64 [usertype] @@
include/asm-generic/io.h:236:22: sparse: expected unsigned long long [usertype] val
include/asm-generic/io.h:236:22: sparse: got restricted __le64 [usertype]
include/asm-generic/io.h:236:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned long long [usertype] val @@ got restricted __le64 [usertype] @@
include/asm-generic/io.h:236:22: sparse: expected unsigned long long [usertype] val
include/asm-generic/io.h:236:22: sparse: got restricted __le64 [usertype]
include/asm-generic/io.h:236:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned long long [usertype] val @@ got restricted __le64 [usertype] @@
include/asm-generic/io.h:236:22: sparse: expected unsigned long long [usertype] val
include/asm-generic/io.h:236:22: sparse: got restricted __le64 [usertype]
include/asm-generic/io.h:236:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned long long [usertype] val @@ got restricted __le64 [usertype] @@
include/asm-generic/io.h:236:22: sparse: expected unsigned long long [usertype] val
include/asm-generic/io.h:236:22: sparse: got restricted __le64 [usertype]
include/asm-generic/io.h:236:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned long long [usertype] val @@ got restricted __le64 [usertype] @@
include/asm-generic/io.h:236:22: sparse: expected unsigned long long [usertype] val
include/asm-generic/io.h:236:22: sparse: got restricted __le64 [usertype]
include/asm-generic/io.h:236:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned long long [usertype] val @@ got restricted __le64 [usertype] @@
include/asm-generic/io.h:236:22: sparse: expected unsigned long long [usertype] val
include/asm-generic/io.h:236:22: sparse: got restricted __le64 [usertype]
include/asm-generic/io.h:236:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned long long [usertype] val @@ got restricted __le64 [usertype] @@
include/asm-generic/io.h:236:22: sparse: expected unsigned long long [usertype] val
include/asm-generic/io.h:236:22: sparse: got restricted __le64 [usertype]
include/asm-generic/io.h:236:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned long long [usertype] val @@ got restricted __le64 [usertype] @@
include/asm-generic/io.h:236:22: sparse: expected unsigned long long [usertype] val
include/asm-generic/io.h:236:22: sparse: got restricted __le64 [usertype]
include/asm-generic/io.h:236:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned long long [usertype] val @@ got restricted __le64 [usertype] @@
include/asm-generic/io.h:236:22: sparse: expected unsigned long long [usertype] val
include/asm-generic/io.h:236:22: sparse: got restricted __le64 [usertype]
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:236:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned long long [usertype] val @@ got restricted __le64 [usertype] @@
include/asm-generic/io.h:236:22: sparse: expected unsigned long long [usertype] val
include/asm-generic/io.h:236:22: sparse: got restricted __le64 [usertype]
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
--
>> drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c:26:16: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c:29:16: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c:39:16: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c:42:16: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c:720:16: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c: note: in included file (through arch/s390/include/asm/io.h, include/linux/io.h, include/linux/pci.h):
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: cast to restricted __le64
include/asm-generic/io.h:193:15: sparse: sparse: too many warnings
--
>> drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c:554:31: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] iplen @@ got restricted __be16 [usertype] @@
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c:554:31: sparse: expected unsigned short [usertype] iplen
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c:554:31: sparse: got restricted __be16 [usertype]
>> drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c:556:54: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] tot_len @@ got unsigned short [usertype] iplen @@
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c:556:54: sparse: expected restricted __be16 [usertype] tot_len
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c:556:54: sparse: got unsigned short [usertype] iplen
>> drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c:559:60: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] payload_len @@ got unsigned short [usertype] iplen @@
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c:559:60: sparse: expected restricted __be16 [usertype] payload_len
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c:559:60: sparse: got unsigned short [usertype] iplen
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c: note: in included file (through arch/s390/include/asm/io.h, include/linux/scatterlist.h, include/linux/dma-mapping.h, ...):
include/asm-generic/io.h:236:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned long long [usertype] val @@ got restricted __le64 [usertype] @@
include/asm-generic/io.h:236:22: sparse: expected unsigned long long [usertype] val
include/asm-generic/io.h:236:22: sparse: got restricted __le64 [usertype]
include/asm-generic/io.h:236:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned long long [usertype] val @@ got restricted __le64 [usertype] @@
include/asm-generic/io.h:236:22: sparse: expected unsigned long long [usertype] val
include/asm-generic/io.h:236:22: sparse: got restricted __le64 [usertype]
include/asm-generic/io.h:236:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned long long [usertype] val @@ got restricted __le64 [usertype] @@
include/asm-generic/io.h:236:22: sparse: expected unsigned long long [usertype] val
include/asm-generic/io.h:236:22: sparse: got restricted __le64 [usertype]
include/asm-generic/io.h:236:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned long long [usertype] val @@ got restricted __le64 [usertype] @@
include/asm-generic/io.h:236:22: sparse: expected unsigned long long [usertype] val
include/asm-generic/io.h:236:22: sparse: got restricted __le64 [usertype]
include/asm-generic/io.h:236:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned long long [usertype] val @@ got restricted __le64 [usertype] @@
include/asm-generic/io.h:236:22: sparse: expected unsigned long long [usertype] val
include/asm-generic/io.h:236:22: sparse: got restricted __le64 [usertype]
include/asm-generic/io.h:236:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned long long [usertype] val @@ got restricted __le64 [usertype] @@
include/asm-generic/io.h:236:22: sparse: expected unsigned long long [usertype] val
include/asm-generic/io.h:236:22: sparse: got restricted __le64 [usertype]
include/asm-generic/io.h:236:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned long long [usertype] val @@ got restricted __le64 [usertype] @@
include/asm-generic/io.h:236:22: sparse: expected unsigned long long [usertype] val
include/asm-generic/io.h:236:22: sparse: got restricted __le64 [usertype]
vim +/__iomem +596 drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
d424b6c024157f Sunil Goutham 2020-03-21 567
d424b6c024157f Sunil Goutham 2020-03-21 568 static int otx2_pfvf_mbox_init(struct otx2_nic *pf, int numvfs)
d424b6c024157f Sunil Goutham 2020-03-21 569 {
d424b6c024157f Sunil Goutham 2020-03-21 570 void __iomem *hwbase;
d424b6c024157f Sunil Goutham 2020-03-21 571 struct mbox *mbox;
d424b6c024157f Sunil Goutham 2020-03-21 572 int err, vf;
d424b6c024157f Sunil Goutham 2020-03-21 573 u64 base;
d424b6c024157f Sunil Goutham 2020-03-21 574
d424b6c024157f Sunil Goutham 2020-03-21 575 if (!numvfs)
d424b6c024157f Sunil Goutham 2020-03-21 576 return -EINVAL;
d424b6c024157f Sunil Goutham 2020-03-21 577
d424b6c024157f Sunil Goutham 2020-03-21 578 pf->mbox_pfvf = devm_kcalloc(&pf->pdev->dev, numvfs,
d424b6c024157f Sunil Goutham 2020-03-21 579 sizeof(struct mbox), GFP_KERNEL);
d424b6c024157f Sunil Goutham 2020-03-21 580 if (!pf->mbox_pfvf)
d424b6c024157f Sunil Goutham 2020-03-21 581 return -ENOMEM;
d424b6c024157f Sunil Goutham 2020-03-21 582
d424b6c024157f Sunil Goutham 2020-03-21 583 pf->mbox_pfvf_wq = alloc_workqueue("otx2_pfvf_mailbox",
d424b6c024157f Sunil Goutham 2020-03-21 584 WQ_UNBOUND | WQ_HIGHPRI |
d424b6c024157f Sunil Goutham 2020-03-21 585 WQ_MEM_RECLAIM, 1);
d424b6c024157f Sunil Goutham 2020-03-21 586 if (!pf->mbox_pfvf_wq)
d424b6c024157f Sunil Goutham 2020-03-21 587 return -ENOMEM;
d424b6c024157f Sunil Goutham 2020-03-21 588
facede8209ef0d Subbaraya Sundeep 2021-02-11 589 /* On CN10K platform, PF <-> VF mailbox region follows after
facede8209ef0d Subbaraya Sundeep 2021-02-11 590 * PF <-> AF mailbox region.
facede8209ef0d Subbaraya Sundeep 2021-02-11 591 */
facede8209ef0d Subbaraya Sundeep 2021-02-11 592 if (test_bit(CN10K_MBOX, &pf->hw.cap_flag))
facede8209ef0d Subbaraya Sundeep 2021-02-11 593 base = pci_resource_start(pf->pdev, PCI_MBOX_BAR_NUM) +
facede8209ef0d Subbaraya Sundeep 2021-02-11 594 MBOX_SIZE;
facede8209ef0d Subbaraya Sundeep 2021-02-11 595 else
facede8209ef0d Subbaraya Sundeep 2021-02-11 @596 base = readq((void __iomem *)((u64)pf->reg_base +
facede8209ef0d Subbaraya Sundeep 2021-02-11 597 RVU_PF_VF_BAR4_ADDR));
d424b6c024157f Sunil Goutham 2020-03-21 598
facede8209ef0d Subbaraya Sundeep 2021-02-11 599 hwbase = ioremap_wc(base, MBOX_SIZE * pf->total_vfs);
d424b6c024157f Sunil Goutham 2020-03-21 600 if (!hwbase) {
d424b6c024157f Sunil Goutham 2020-03-21 601 err = -ENOMEM;
d424b6c024157f Sunil Goutham 2020-03-21 602 goto free_wq;
d424b6c024157f Sunil Goutham 2020-03-21 603 }
d424b6c024157f Sunil Goutham 2020-03-21 604
d424b6c024157f Sunil Goutham 2020-03-21 605 mbox = &pf->mbox_pfvf[0];
d424b6c024157f Sunil Goutham 2020-03-21 606 err = otx2_mbox_init(&mbox->mbox, hwbase, pf->pdev, pf->reg_base,
d424b6c024157f Sunil Goutham 2020-03-21 607 MBOX_DIR_PFVF, numvfs);
d424b6c024157f Sunil Goutham 2020-03-21 608 if (err)
d424b6c024157f Sunil Goutham 2020-03-21 609 goto free_iomem;
d424b6c024157f Sunil Goutham 2020-03-21 610
d424b6c024157f Sunil Goutham 2020-03-21 611 err = otx2_mbox_init(&mbox->mbox_up, hwbase, pf->pdev, pf->reg_base,
d424b6c024157f Sunil Goutham 2020-03-21 612 MBOX_DIR_PFVF_UP, numvfs);
d424b6c024157f Sunil Goutham 2020-03-21 613 if (err)
d424b6c024157f Sunil Goutham 2020-03-21 614 goto free_iomem;
d424b6c024157f Sunil Goutham 2020-03-21 615
d424b6c024157f Sunil Goutham 2020-03-21 616 for (vf = 0; vf < numvfs; vf++) {
d424b6c024157f Sunil Goutham 2020-03-21 617 mbox->pfvf = pf;
d424b6c024157f Sunil Goutham 2020-03-21 618 INIT_WORK(&mbox->mbox_wrk, otx2_pfvf_mbox_handler);
d424b6c024157f Sunil Goutham 2020-03-21 619 INIT_WORK(&mbox->mbox_up_wrk, otx2_pfvf_mbox_up_handler);
d424b6c024157f Sunil Goutham 2020-03-21 620 mbox++;
d424b6c024157f Sunil Goutham 2020-03-21 621 }
d424b6c024157f Sunil Goutham 2020-03-21 622
d424b6c024157f Sunil Goutham 2020-03-21 623 return 0;
d424b6c024157f Sunil Goutham 2020-03-21 624
d424b6c024157f Sunil Goutham 2020-03-21 625 free_iomem:
d424b6c024157f Sunil Goutham 2020-03-21 626 if (hwbase)
d424b6c024157f Sunil Goutham 2020-03-21 627 iounmap(hwbase);
d424b6c024157f Sunil Goutham 2020-03-21 628 free_wq:
d424b6c024157f Sunil Goutham 2020-03-21 629 destroy_workqueue(pf->mbox_pfvf_wq);
d424b6c024157f Sunil Goutham 2020-03-21 630 return err;
d424b6c024157f Sunil Goutham 2020-03-21 631 }
d424b6c024157f Sunil Goutham 2020-03-21 632
d424b6c024157f Sunil Goutham 2020-03-21 633 static void otx2_pfvf_mbox_destroy(struct otx2_nic *pf)
d424b6c024157f Sunil Goutham 2020-03-21 634 {
d424b6c024157f Sunil Goutham 2020-03-21 635 struct mbox *mbox = &pf->mbox_pfvf[0];
d424b6c024157f Sunil Goutham 2020-03-21 636
d424b6c024157f Sunil Goutham 2020-03-21 637 if (!mbox)
d424b6c024157f Sunil Goutham 2020-03-21 638 return;
d424b6c024157f Sunil Goutham 2020-03-21 639
d424b6c024157f Sunil Goutham 2020-03-21 640 if (pf->mbox_pfvf_wq) {
d424b6c024157f Sunil Goutham 2020-03-21 641 destroy_workqueue(pf->mbox_pfvf_wq);
d424b6c024157f Sunil Goutham 2020-03-21 642 pf->mbox_pfvf_wq = NULL;
d424b6c024157f Sunil Goutham 2020-03-21 643 }
d424b6c024157f Sunil Goutham 2020-03-21 644
d424b6c024157f Sunil Goutham 2020-03-21 645 if (mbox->mbox.hwbase)
d424b6c024157f Sunil Goutham 2020-03-21 @646 iounmap(mbox->mbox.hwbase);
d424b6c024157f Sunil Goutham 2020-03-21 647
d424b6c024157f Sunil Goutham 2020-03-21 648 otx2_mbox_destroy(&mbox->mbox);
d424b6c024157f Sunil Goutham 2020-03-21 649 }
d424b6c024157f Sunil Goutham 2020-03-21 650
:::::: The code at line 596 was first introduced by commit
:::::: facede8209ef0dee84557c036e8502a99bb20a91 octeontx2-pf: cn10k: Add mbox support for CN10K
:::::: TO: Subbaraya Sundeep <sbhatta(a)marvell.com>
:::::: CC: David S. Miller <davem(a)davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[arm-platforms:irq/domain_cleanup 6/31] drivers/mfd/ioc3.c:86:26: error: incomplete definition of type 'struct irq_domain'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git irq/domain_cleanup
head: 2360898eeecf0ff64ae1edf24f632228a09badef
commit: 1831090db122e348023e4c53849586df3991b17e [6/31] MIPS: Do not include linux/irqdomain.h from asm/irq.h
config: mips-randconfig-r031-20210516 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project a80a5036a1f6b9a9eb4038b30458f9ab349efff8)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/com...
git remote add arm-platforms https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git
git fetch --no-tags arm-platforms irq/domain_cleanup
git checkout 1831090db122e348023e4c53849586df3991b17e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
>> drivers/mfd/ioc3.c:86:26: error: incomplete definition of type 'struct irq_domain'
irq_set_chip_data(irq, d->host_data);
~^
include/linux/irq.h:128:8: note: forward declaration of 'struct irq_domain'
struct irq_domain;
^
>> drivers/mfd/ioc3.c:96:36: error: variable has incomplete type 'const struct irq_domain_ops'
static const struct irq_domain_ops ioc3_irq_domain_ops = {
^
drivers/mfd/ioc3.c:96:21: note: forward declaration of 'struct irq_domain_ops'
static const struct irq_domain_ops ioc3_irq_domain_ops = {
^
drivers/mfd/ioc3.c:104:37: error: incomplete definition of type 'struct irq_domain'
struct ioc3_priv_data *ipd = domain->host_data;
~~~~~~^
include/linux/irq.h:128:8: note: forward declaration of 'struct irq_domain'
struct irq_domain;
^
drivers/mfd/ioc3.c:114:9: error: implicit declaration of function 'irq_find_mapping' [-Werror,-Wimplicit-function-declaration]
irq = irq_find_mapping(domain, __ffs(pending));
^
>> drivers/mfd/ioc3.c:140:7: error: implicit declaration of function 'irq_domain_alloc_named_fwnode' [-Werror,-Wimplicit-function-declaration]
fn = irq_domain_alloc_named_fwnode("IOC3");
^
>> drivers/mfd/ioc3.c:140:5: warning: incompatible integer to pointer conversion assigning to 'struct fwnode_handle *' from 'int' [-Wint-conversion]
fn = irq_domain_alloc_named_fwnode("IOC3");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/mfd/ioc3.c:144:11: error: implicit declaration of function 'irq_domain_create_linear' [-Werror,-Wimplicit-function-declaration]
domain = irq_domain_create_linear(fn, 24, &ioc3_irq_domain_ops, ipd);
^
>> drivers/mfd/ioc3.c:146:3: error: implicit declaration of function 'irq_domain_free_fwnode' [-Werror,-Wimplicit-function-declaration]
irq_domain_free_fwnode(fn);
^
drivers/mfd/ioc3.c:619:42: error: incomplete definition of type 'struct irq_domain'
struct fwnode_handle *fn = ipd->domain->fwnode;
~~~~~~~~~~~^
include/linux/irq.h:128:8: note: forward declaration of 'struct irq_domain'
struct irq_domain;
^
>> drivers/mfd/ioc3.c:621:4: error: implicit declaration of function 'irq_domain_remove' [-Werror,-Wimplicit-function-declaration]
irq_domain_remove(ipd->domain);
^
drivers/mfd/ioc3.c:622:4: error: implicit declaration of function 'irq_domain_free_fwnode' [-Werror,-Wimplicit-function-declaration]
irq_domain_free_fwnode(fn);
^
>> drivers/mfd/ioc3.c:582:46: warning: shift count >= width of type [-Wshift-count-overflow]
ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:76:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
drivers/mfd/ioc3.c:649:41: error: incomplete definition of type 'struct irq_domain'
struct fwnode_handle *fn = ipd->domain->fwnode;
~~~~~~~~~~~^
include/linux/irq.h:128:8: note: forward declaration of 'struct irq_domain'
struct irq_domain;
^
drivers/mfd/ioc3.c:651:3: error: implicit declaration of function 'irq_domain_remove' [-Werror,-Wimplicit-function-declaration]
irq_domain_remove(ipd->domain);
^
drivers/mfd/ioc3.c:652:3: error: implicit declaration of function 'irq_domain_free_fwnode' [-Werror,-Wimplicit-function-declaration]
irq_domain_free_fwnode(fn);
^
2 warnings and 13 errors generated.
vim +86 drivers/mfd/ioc3.c
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 76
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 77 static int ioc3_irq_domain_map(struct irq_domain *d, unsigned int irq,
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 78 irq_hw_number_t hwirq)
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 79 {
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 80 /* Set level IRQs for every interrupt contained in IOC3_LVL_MASK */
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 81 if (BIT(hwirq) & IOC3_LVL_MASK)
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 82 irq_set_chip_and_handler(irq, &ioc3_irq_chip, handle_level_irq);
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 83 else
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 84 irq_set_chip_and_handler(irq, &ioc3_irq_chip, handle_edge_irq);
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 85
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 @86 irq_set_chip_data(irq, d->host_data);
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 87 return 0;
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 88 }
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 89
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 90 static void ioc3_irq_domain_unmap(struct irq_domain *d, unsigned int irq)
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 91 {
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 92 irq_set_chip_and_handler(irq, NULL, NULL);
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 93 irq_set_chip_data(irq, NULL);
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 94 }
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 95
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 @96 static const struct irq_domain_ops ioc3_irq_domain_ops = {
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 97 .map = ioc3_irq_domain_map,
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 98 .unmap = ioc3_irq_domain_unmap,
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 99 };
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 100
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 101 static void ioc3_irq_handler(struct irq_desc *desc)
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 102 {
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 103 struct irq_domain *domain = irq_desc_get_handler_data(desc);
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 104 struct ioc3_priv_data *ipd = domain->host_data;
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 105 struct ioc3 __iomem *regs = ipd->regs;
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 106 u32 pending, mask;
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 107 unsigned int irq;
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 108
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 109 pending = readl(®s->sio_ir);
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 110 mask = readl(®s->sio_ies);
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 111 pending &= mask; /* Mask off not enabled interrupts */
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 112
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 113 if (pending) {
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 114 irq = irq_find_mapping(domain, __ffs(pending));
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 115 if (irq)
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 116 generic_handle_irq(irq);
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 117 } else {
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 118 spurious_interrupt();
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 119 }
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 120 }
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 121
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 122 /*
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 123 * System boards/BaseIOs use more interrupt pins of the bridge ASIC
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 124 * to which the IOC3 is connected. Since the IOC3 MFD driver
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 125 * knows wiring of these extra pins, we use the map_irq function
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 126 * to get interrupts activated
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 127 */
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 128 static int ioc3_map_irq(struct pci_dev *pdev, int slot, int pin)
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 129 {
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 130 struct pci_host_bridge *hbrg = pci_find_host_bridge(pdev->bus);
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 131
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 132 return hbrg->map_irq(pdev, slot, pin);
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 133 }
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 134
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 135 static int ioc3_irq_domain_setup(struct ioc3_priv_data *ipd, int irq)
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 136 {
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 137 struct irq_domain *domain;
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 138 struct fwnode_handle *fn;
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 139
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 @140 fn = irq_domain_alloc_named_fwnode("IOC3");
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 141 if (!fn)
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 142 goto err;
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 143
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 @144 domain = irq_domain_create_linear(fn, 24, &ioc3_irq_domain_ops, ipd);
e3beca48a45b5e Thomas Gleixner 2020-07-09 145 if (!domain) {
e3beca48a45b5e Thomas Gleixner 2020-07-09 @146 irq_domain_free_fwnode(fn);
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 147 goto err;
e3beca48a45b5e Thomas Gleixner 2020-07-09 148 }
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 149
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 150 ipd->domain = domain;
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 151
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 152 irq_set_chained_handler_and_data(irq, ioc3_irq_handler, domain);
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 153 ipd->domain_irq = irq;
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 154 return 0;
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 155
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 156 err:
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 157 dev_err(&ipd->pdev->dev, "irq domain setup failed\n");
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 158 return -ENOMEM;
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 159 }
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 160
:::::: The code at line 86 was first introduced by commit
:::::: 0ce5ebd24d25f02c73940f047b12733d84b125e8 mfd: ioc3: Add driver for SGI IOC3 chip
:::::: TO: Thomas Bogendoerfer <tbogendoerfer(a)suse.de>
:::::: CC: Paul Burton <paulburton(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:3598 mlxsw_sp_nexthop_group_refresh() warn: missing error code 'err'
by Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 315d99318179b9cd5077ccc9f7f26a164c9fa998
commit: e3ddfb45bacdc623eedea7f7bf9e7879257471d6 mlxsw: spectrum_router: Allow returning errors from mlxsw_sp_nexthop_group_refresh()
config: x86_64-randconfig-m031-20210514 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:3598 mlxsw_sp_nexthop_group_refresh() warn: missing error code 'err'
vim +/err +3598 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
e3ddfb45bacdc6 Ido Schimmel 2020-11-17 3555 static int
a7ff87acd995e3 Jiri Pirko 2016-07-05 3556 mlxsw_sp_nexthop_group_refresh(struct mlxsw_sp *mlxsw_sp,
a7ff87acd995e3 Jiri Pirko 2016-07-05 3557 struct mlxsw_sp_nexthop_group *nh_grp)
a7ff87acd995e3 Jiri Pirko 2016-07-05 3558 {
7f7a417e6a11d7 Ido Schimmel 2020-11-13 3559 struct mlxsw_sp_nexthop_group_info *nhgi = nh_grp->nhgi;
eb789980d0aa6c Ido Schimmel 2017-10-22 3560 u16 ecmp_size, old_ecmp_size;
a7ff87acd995e3 Jiri Pirko 2016-07-05 3561 struct mlxsw_sp_nexthop *nh;
a7ff87acd995e3 Jiri Pirko 2016-07-05 3562 bool offload_change = false;
a7ff87acd995e3 Jiri Pirko 2016-07-05 3563 u32 adj_index;
a7ff87acd995e3 Jiri Pirko 2016-07-05 3564 bool old_adj_index_valid;
e3ddfb45bacdc6 Ido Schimmel 2020-11-17 3565 int i, err2, err = 0;
a7ff87acd995e3 Jiri Pirko 2016-07-05 3566 u32 old_adj_index;
a7ff87acd995e3 Jiri Pirko 2016-07-05 3567
7f7a417e6a11d7 Ido Schimmel 2020-11-13 3568 if (!nhgi->gateway) {
b3e8d1ebad2d04 Ido Schimmel 2017-02-08 3569 mlxsw_sp_nexthop_fib_entries_update(mlxsw_sp, nh_grp);
e3ddfb45bacdc6 Ido Schimmel 2020-11-17 3570 return 0;
b3e8d1ebad2d04 Ido Schimmel 2017-02-08 3571 }
b3e8d1ebad2d04 Ido Schimmel 2017-02-08 3572
7f7a417e6a11d7 Ido Schimmel 2020-11-13 3573 for (i = 0; i < nhgi->count; i++) {
7f7a417e6a11d7 Ido Schimmel 2020-11-13 3574 nh = &nhgi->nexthops[i];
a7ff87acd995e3 Jiri Pirko 2016-07-05 3575
56b8a9ed276bc1 Petr Machata 2017-07-31 3576 if (nh->should_offload != nh->offloaded) {
a7ff87acd995e3 Jiri Pirko 2016-07-05 3577 offload_change = true;
a7ff87acd995e3 Jiri Pirko 2016-07-05 3578 if (nh->should_offload)
a7ff87acd995e3 Jiri Pirko 2016-07-05 3579 nh->update = 1;
a7ff87acd995e3 Jiri Pirko 2016-07-05 3580 }
a7ff87acd995e3 Jiri Pirko 2016-07-05 3581 }
a7ff87acd995e3 Jiri Pirko 2016-07-05 3582 if (!offload_change) {
a7ff87acd995e3 Jiri Pirko 2016-07-05 3583 /* Nothing was added or removed, so no need to reallocate. Just
a7ff87acd995e3 Jiri Pirko 2016-07-05 3584 * update MAC on existing adjacency indexes.
a7ff87acd995e3 Jiri Pirko 2016-07-05 3585 */
7f7a417e6a11d7 Ido Schimmel 2020-11-13 3586 err = mlxsw_sp_nexthop_group_update(mlxsw_sp, nhgi, false);
a7ff87acd995e3 Jiri Pirko 2016-07-05 3587 if (err) {
a7ff87acd995e3 Jiri Pirko 2016-07-05 3588 dev_warn(mlxsw_sp->bus_info->dev, "Failed to update neigh MAC in adjacency table.\n");
a7ff87acd995e3 Jiri Pirko 2016-07-05 3589 goto set_trap;
a7ff87acd995e3 Jiri Pirko 2016-07-05 3590 }
e3ddfb45bacdc6 Ido Schimmel 2020-11-17 3591 return 0;
a7ff87acd995e3 Jiri Pirko 2016-07-05 3592 }
7f7a417e6a11d7 Ido Schimmel 2020-11-13 3593 mlxsw_sp_nexthop_group_normalize(nhgi);
7f7a417e6a11d7 Ido Schimmel 2020-11-13 3594 if (!nhgi->sum_norm_weight)
a7ff87acd995e3 Jiri Pirko 2016-07-05 3595 /* No neigh of this group is connected so we just set
a7ff87acd995e3 Jiri Pirko 2016-07-05 3596 * the trap and let everthing flow through kernel.
a7ff87acd995e3 Jiri Pirko 2016-07-05 3597 */
a7ff87acd995e3 Jiri Pirko 2016-07-05 @3598 goto set_trap;
The comments sort of imply that this is a success path so no error
code necessary. It's sort of hard to be positive though...
a7ff87acd995e3 Jiri Pirko 2016-07-05 3599
7f7a417e6a11d7 Ido Schimmel 2020-11-13 3600 ecmp_size = nhgi->sum_norm_weight;
425a08c67317ac Ido Schimmel 2017-10-22 3601 err = mlxsw_sp_fix_adj_grp_size(mlxsw_sp, &ecmp_size);
425a08c67317ac Ido Schimmel 2017-10-22 3602 if (err)
425a08c67317ac Ido Schimmel 2017-10-22 3603 /* No valid allocation size available. */
425a08c67317ac Ido Schimmel 2017-10-22 3604 goto set_trap;
425a08c67317ac Ido Schimmel 2017-10-22 3605
4b6b18692aec20 Jiri Pirko 2018-07-08 3606 err = mlxsw_sp_kvdl_alloc(mlxsw_sp, MLXSW_SP_KVDL_ENTRY_TYPE_ADJ,
4b6b18692aec20 Jiri Pirko 2018-07-08 3607 ecmp_size, &adj_index);
1312444374241f Arkadi Sharshevsky 2017-03-25 3608 if (err) {
a7ff87acd995e3 Jiri Pirko 2016-07-05 3609 /* We ran out of KVD linear space, just set the
a7ff87acd995e3 Jiri Pirko 2016-07-05 3610 * trap and let everything flow through kernel.
a7ff87acd995e3 Jiri Pirko 2016-07-05 3611 */
a7ff87acd995e3 Jiri Pirko 2016-07-05 3612 dev_warn(mlxsw_sp->bus_info->dev, "Failed to allocate KVD linear area for nexthop group.\n");
a7ff87acd995e3 Jiri Pirko 2016-07-05 3613 goto set_trap;
a7ff87acd995e3 Jiri Pirko 2016-07-05 3614 }
7f7a417e6a11d7 Ido Schimmel 2020-11-13 3615 old_adj_index_valid = nhgi->adj_index_valid;
7f7a417e6a11d7 Ido Schimmel 2020-11-13 3616 old_adj_index = nhgi->adj_index;
7f7a417e6a11d7 Ido Schimmel 2020-11-13 3617 old_ecmp_size = nhgi->ecmp_size;
7f7a417e6a11d7 Ido Schimmel 2020-11-13 3618 nhgi->adj_index_valid = 1;
7f7a417e6a11d7 Ido Schimmel 2020-11-13 3619 nhgi->adj_index = adj_index;
7f7a417e6a11d7 Ido Schimmel 2020-11-13 3620 nhgi->ecmp_size = ecmp_size;
7f7a417e6a11d7 Ido Schimmel 2020-11-13 3621 mlxsw_sp_nexthop_group_rebalance(nhgi);
7f7a417e6a11d7 Ido Schimmel 2020-11-13 3622 err = mlxsw_sp_nexthop_group_update(mlxsw_sp, nhgi, true);
a7ff87acd995e3 Jiri Pirko 2016-07-05 3623 if (err) {
a7ff87acd995e3 Jiri Pirko 2016-07-05 3624 dev_warn(mlxsw_sp->bus_info->dev, "Failed to update neigh MAC in adjacency table.\n");
a7ff87acd995e3 Jiri Pirko 2016-07-05 3625 goto set_trap;
a7ff87acd995e3 Jiri Pirko 2016-07-05 3626 }
a7ff87acd995e3 Jiri Pirko 2016-07-05 3627
8c5a5b9b9185e5 Ido Schimmel 2020-01-14 3628 mlxsw_sp_nexthop_group_offload_refresh(mlxsw_sp, nh_grp);
8c5a5b9b9185e5 Ido Schimmel 2020-01-14 3629
a7ff87acd995e3 Jiri Pirko 2016-07-05 3630 if (!old_adj_index_valid) {
a7ff87acd995e3 Jiri Pirko 2016-07-05 3631 /* The trap was set for fib entries, so we have to call
a7ff87acd995e3 Jiri Pirko 2016-07-05 3632 * fib entry update to unset it and use adjacency index.
a7ff87acd995e3 Jiri Pirko 2016-07-05 3633 */
a7ff87acd995e3 Jiri Pirko 2016-07-05 3634 err = mlxsw_sp_nexthop_fib_entries_update(mlxsw_sp, nh_grp);
a7ff87acd995e3 Jiri Pirko 2016-07-05 3635 if (err) {
a7ff87acd995e3 Jiri Pirko 2016-07-05 3636 dev_warn(mlxsw_sp->bus_info->dev, "Failed to add adjacency index to fib entries.\n");
a7ff87acd995e3 Jiri Pirko 2016-07-05 3637 goto set_trap;
a7ff87acd995e3 Jiri Pirko 2016-07-05 3638 }
e3ddfb45bacdc6 Ido Schimmel 2020-11-17 3639 return 0;
a7ff87acd995e3 Jiri Pirko 2016-07-05 3640 }
a7ff87acd995e3 Jiri Pirko 2016-07-05 3641
a7ff87acd995e3 Jiri Pirko 2016-07-05 3642 err = mlxsw_sp_adj_index_mass_update(mlxsw_sp, nh_grp,
a7ff87acd995e3 Jiri Pirko 2016-07-05 3643 old_adj_index, old_ecmp_size);
4b6b18692aec20 Jiri Pirko 2018-07-08 3644 mlxsw_sp_kvdl_free(mlxsw_sp, MLXSW_SP_KVDL_ENTRY_TYPE_ADJ,
0304c00546fce7 Jiri Pirko 2018-07-08 3645 old_ecmp_size, old_adj_index);
a7ff87acd995e3 Jiri Pirko 2016-07-05 3646 if (err) {
a7ff87acd995e3 Jiri Pirko 2016-07-05 3647 dev_warn(mlxsw_sp->bus_info->dev, "Failed to mass-update adjacency index for nexthop group.\n");
a7ff87acd995e3 Jiri Pirko 2016-07-05 3648 goto set_trap;
a7ff87acd995e3 Jiri Pirko 2016-07-05 3649 }
77d964e66cfad0 Ido Schimmel 2017-08-02 3650
e3ddfb45bacdc6 Ido Schimmel 2020-11-17 3651 return 0;
a7ff87acd995e3 Jiri Pirko 2016-07-05 3652
a7ff87acd995e3 Jiri Pirko 2016-07-05 3653 set_trap:
7f7a417e6a11d7 Ido Schimmel 2020-11-13 3654 old_adj_index_valid = nhgi->adj_index_valid;
7f7a417e6a11d7 Ido Schimmel 2020-11-13 3655 nhgi->adj_index_valid = 0;
7f7a417e6a11d7 Ido Schimmel 2020-11-13 3656 for (i = 0; i < nhgi->count; i++) {
7f7a417e6a11d7 Ido Schimmel 2020-11-13 3657 nh = &nhgi->nexthops[i];
a7ff87acd995e3 Jiri Pirko 2016-07-05 3658 nh->offloaded = 0;
a7ff87acd995e3 Jiri Pirko 2016-07-05 3659 }
e3ddfb45bacdc6 Ido Schimmel 2020-11-17 3660 err2 = mlxsw_sp_nexthop_fib_entries_update(mlxsw_sp, nh_grp);
e3ddfb45bacdc6 Ido Schimmel 2020-11-17 3661 if (err2)
a7ff87acd995e3 Jiri Pirko 2016-07-05 3662 dev_warn(mlxsw_sp->bus_info->dev, "Failed to set traps for fib entries.\n");
8c5a5b9b9185e5 Ido Schimmel 2020-01-14 3663 mlxsw_sp_nexthop_group_offload_refresh(mlxsw_sp, nh_grp);
a7ff87acd995e3 Jiri Pirko 2016-07-05 3664 if (old_adj_index_valid)
4b6b18692aec20 Jiri Pirko 2018-07-08 3665 mlxsw_sp_kvdl_free(mlxsw_sp, MLXSW_SP_KVDL_ENTRY_TYPE_ADJ,
7f7a417e6a11d7 Ido Schimmel 2020-11-13 3666 nhgi->ecmp_size, nhgi->adj_index);
e3ddfb45bacdc6 Ido Schimmel 2020-11-17 3667 return err;
a7ff87acd995e3 Jiri Pirko 2016-07-05 3668 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
fs/cifs/sess.c:78:5: warning: stack frame size of 1168 bytes in function 'cifs_try_adding_channels'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 63d1cb53e26a9a4168b84a8981b225c0a9cfa235
commit: 387ec58f339b0c45e3767395f11fa8dd3772131e cifs: simplify handling of cifs_sb/ctx->local_nls
date: 5 months ago
config: powerpc64-randconfig-r023-20210516 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project a80a5036a1f6b9a9eb4038b30458f9ab349efff8)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 387ec58f339b0c45e3767395f11fa8dd3772131e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> fs/cifs/sess.c:78:5: warning: stack frame size of 1168 bytes in function 'cifs_try_adding_channels' [-Wframe-larger-than=]
int cifs_try_adding_channels(struct cifs_sb_info *cifs_sb, struct cifs_ses *ses)
^
1 warning generated.
vim +/cifs_try_adding_channels +78 fs/cifs/sess.c
76
77 /* returns number of channels added */
> 78 int cifs_try_adding_channels(struct cifs_sb_info *cifs_sb, struct cifs_ses *ses)
79 {
80 int old_chan_count = ses->chan_count;
81 int left = ses->chan_max - ses->chan_count;
82 int i = 0;
83 int rc = 0;
84 int tries = 0;
85 struct cifs_server_iface *ifaces = NULL;
86 size_t iface_count;
87
88 if (left <= 0) {
89 cifs_dbg(FYI,
90 "ses already at max_channels (%zu), nothing to open\n",
91 ses->chan_max);
92 return 0;
93 }
94
95 if (ses->server->dialect < SMB30_PROT_ID) {
96 cifs_dbg(VFS, "multichannel is not supported on this protocol version, use 3.0 or above\n");
97 return 0;
98 }
99
100 /*
101 * Make a copy of the iface list at the time and use that
102 * instead so as to not hold the iface spinlock for opening
103 * channels
104 */
105 spin_lock(&ses->iface_lock);
106 iface_count = ses->iface_count;
107 if (iface_count <= 0) {
108 spin_unlock(&ses->iface_lock);
109 cifs_dbg(VFS, "no iface list available to open channels\n");
110 return 0;
111 }
112 ifaces = kmemdup(ses->iface_list, iface_count*sizeof(*ifaces),
113 GFP_ATOMIC);
114 if (!ifaces) {
115 spin_unlock(&ses->iface_lock);
116 return 0;
117 }
118 spin_unlock(&ses->iface_lock);
119
120 /*
121 * Keep connecting to same, fastest, iface for all channels as
122 * long as its RSS. Try next fastest one if not RSS or channel
123 * creation fails.
124 */
125 while (left > 0) {
126 struct cifs_server_iface *iface;
127
128 tries++;
129 if (tries > 3*ses->chan_max) {
130 cifs_dbg(FYI, "too many channel open attempts (%d channels left to open)\n",
131 left);
132 break;
133 }
134
135 iface = &ifaces[i];
136 if (is_ses_using_iface(ses, iface) && !iface->rss_capable) {
137 i = (i+1) % iface_count;
138 continue;
139 }
140
141 rc = cifs_ses_add_channel(cifs_sb, ses, iface);
142 if (rc) {
143 cifs_dbg(FYI, "failed to open extra channel on iface#%d rc=%d\n",
144 i, rc);
145 i = (i+1) % iface_count;
146 continue;
147 }
148
149 cifs_dbg(FYI, "successfully opened new channel on iface#%d\n",
150 i);
151 left--;
152 }
153
154 kfree(ifaces);
155 return ses->chan_count - old_chan_count;
156 }
157
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[rppt:memfd-secret/v19.3 4/7] mm/secretmem.c:78:4: error: too many arguments to function 'set_direct_map_default_noflush'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git memfd-secret/v19.3
head: 3ab055334ff06fa6231e2cf27fe7fff57bb7d87f
commit: 545bdc70882cbd28aebc1d6392fdc0249f795d2f [4/7] mm: introduce memfd_secret system call to create "secret" memory areas
config: x86_64-rhel-8.3 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git/commit/?id...
git remote add rppt https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git
git fetch --no-tags rppt memfd-secret/v19.3
git checkout 545bdc70882cbd28aebc1d6392fdc0249f795d2f
# save the attached .config to linux build tree
make W=1 W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
mm/secretmem.c: In function 'secretmem_fault':
>> mm/secretmem.c:78:4: error: too many arguments to function 'set_direct_map_default_noflush'
78 | set_direct_map_default_noflush(page, 1);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/set_memory.h:9,
from mm/secretmem.c:19:
arch/x86/include/asm/set_memory.h:84:5: note: declared here
84 | int set_direct_map_default_noflush(struct page *page);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/set_direct_map_default_noflush +78 mm/secretmem.c
37
38 static bool secretmem_enable __ro_after_init;
39 module_param_named(enable, secretmem_enable, bool, 0400);
40 MODULE_PARM_DESC(secretmem_enable,
41 "Enable secretmem and memfd_secret(2) system call");
42
43 static vm_fault_t secretmem_fault(struct vm_fault *vmf)
44 {
45 struct address_space *mapping = vmf->vma->vm_file->f_mapping;
46 struct inode *inode = file_inode(vmf->vma->vm_file);
47 pgoff_t offset = vmf->pgoff;
48 gfp_t gfp = vmf->gfp_mask;
49 unsigned long addr;
50 struct page *page;
51 int err;
52
53 if (((loff_t)vmf->pgoff << PAGE_SHIFT) >= i_size_read(inode))
54 return vmf_error(-EINVAL);
55
56 retry:
57 page = find_lock_page(mapping, offset);
58 if (!page) {
59 page = alloc_page(gfp | __GFP_ZERO);
60 if (!page)
61 return VM_FAULT_OOM;
62
63 err = set_direct_map_invalid_noflush(page);
64 if (err) {
65 put_page(page);
66 return vmf_error(err);
67 }
68
69 __SetPageUptodate(page);
70 err = add_to_page_cache_lru(page, mapping, offset, gfp);
71 if (unlikely(err)) {
72 put_page(page);
73 /*
74 * If a split of large page was required, it
75 * already happened when we marked the page invalid
76 * which guarantees that this call won't fail
77 */
> 78 set_direct_map_default_noflush(page, 1);
79 if (err == -EEXIST)
80 goto retry;
81
82 return vmf_error(err);
83 }
84
85 addr = (unsigned long)page_address(page);
86 flush_tlb_kernel_range(addr, addr + PAGE_SIZE);
87 }
88
89 vmf->page = page;
90 return VM_FAULT_LOCKED;
91 }
92
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months