drivers/net/wireless/ralink/rt2x00/rt2800lib.c:9012:13: warning: stack frame size of 8504 bytes in function 'rt2800_init_rfcsr'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: ad347abe4a9876b1f65f408ab467137e88f77eb4
commit: 02c587733c8161355a43e6e110c2e29bd0acff72 kasan: remove redundant config option
date: 8 weeks ago
config: x86_64-randconfig-a002-20210612 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project d2012d965d60c3258b3a69d024491698f8aec386)
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/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 02c587733c8161355a43e6e110c2e29bd0acff72
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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 >>):
>> drivers/net/wireless/ralink/rt2x00/rt2800lib.c:9012:13: warning: stack frame size of 8504 bytes in function 'rt2800_init_rfcsr' [-Wframe-larger-than=]
static void rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
^
1 warning generated.
vim +/rt2800_init_rfcsr +9012 drivers/net/wireless/ralink/rt2x00/rt2800lib.c
41977e86c984fc drivers/net/wireless/ralink/rt2x00/rt2800lib.c Roman Yeryomin 2017-03-21 9011
074f25295b78dc drivers/net/wireless/rt2x00/rt2800lib.c Stanislaw Gruszka 2013-04-17 @9012 static void rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
d5374ef13ebda6 drivers/net/wireless/rt2x00/rt2800lib.c Stanislaw Gruszka 2012-12-12 9013 {
d5374ef13ebda6 drivers/net/wireless/rt2x00/rt2800lib.c Stanislaw Gruszka 2012-12-12 9014 if (rt2800_is_305x_soc(rt2x00dev)) {
d5374ef13ebda6 drivers/net/wireless/rt2x00/rt2800lib.c Stanislaw Gruszka 2012-12-12 9015 rt2800_init_rfcsr_305x_soc(rt2x00dev);
074f25295b78dc drivers/net/wireless/rt2x00/rt2800lib.c Stanislaw Gruszka 2013-04-17 9016 return;
d5374ef13ebda6 drivers/net/wireless/rt2x00/rt2800lib.c Stanislaw Gruszka 2012-12-12 9017 }
d5374ef13ebda6 drivers/net/wireless/rt2x00/rt2800lib.c Stanislaw Gruszka 2012-12-12 9018
d5374ef13ebda6 drivers/net/wireless/rt2x00/rt2800lib.c Stanislaw Gruszka 2012-12-12 9019 switch (rt2x00dev->chip.rt) {
d5374ef13ebda6 drivers/net/wireless/rt2x00/rt2800lib.c Stanislaw Gruszka 2012-12-12 9020 case RT3070:
d5374ef13ebda6 drivers/net/wireless/rt2x00/rt2800lib.c Stanislaw Gruszka 2012-12-12 9021 case RT3071:
d5374ef13ebda6 drivers/net/wireless/rt2x00/rt2800lib.c Stanislaw Gruszka 2012-12-12 9022 case RT3090:
d5374ef13ebda6 drivers/net/wireless/rt2x00/rt2800lib.c Stanislaw Gruszka 2012-12-12 9023 rt2800_init_rfcsr_30xx(rt2x00dev);
d5374ef13ebda6 drivers/net/wireless/rt2x00/rt2800lib.c Stanislaw Gruszka 2012-12-12 9024 break;
d5374ef13ebda6 drivers/net/wireless/rt2x00/rt2800lib.c Stanislaw Gruszka 2012-12-12 9025 case RT3290:
d5374ef13ebda6 drivers/net/wireless/rt2x00/rt2800lib.c Stanislaw Gruszka 2012-12-12 9026 rt2800_init_rfcsr_3290(rt2x00dev);
d5374ef13ebda6 drivers/net/wireless/rt2x00/rt2800lib.c Stanislaw Gruszka 2012-12-12 9027 break;
d5374ef13ebda6 drivers/net/wireless/rt2x00/rt2800lib.c Stanislaw Gruszka 2012-12-12 9028 case RT3352:
d5374ef13ebda6 drivers/net/wireless/rt2x00/rt2800lib.c Stanislaw Gruszka 2012-12-12 9029 rt2800_init_rfcsr_3352(rt2x00dev);
d5374ef13ebda6 drivers/net/wireless/rt2x00/rt2800lib.c Stanislaw Gruszka 2012-12-12 9030 break;
d5374ef13ebda6 drivers/net/wireless/rt2x00/rt2800lib.c Stanislaw Gruszka 2012-12-12 9031 case RT3390:
d5374ef13ebda6 drivers/net/wireless/rt2x00/rt2800lib.c Stanislaw Gruszka 2012-12-12 9032 rt2800_init_rfcsr_3390(rt2x00dev);
d5374ef13ebda6 drivers/net/wireless/rt2x00/rt2800lib.c Stanislaw Gruszka 2012-12-12 9033 break;
d0e61a0f7cca51 drivers/net/wireless/ralink/rt2x00/rt2800lib.c Gabor Juhos 2019-04-24 9034 case RT3883:
d0e61a0f7cca51 drivers/net/wireless/ralink/rt2x00/rt2800lib.c Gabor Juhos 2019-04-24 9035 rt2800_init_rfcsr_3883(rt2x00dev);
d0e61a0f7cca51 drivers/net/wireless/ralink/rt2x00/rt2800lib.c Gabor Juhos 2019-04-24 9036 break;
d5374ef13ebda6 drivers/net/wireless/rt2x00/rt2800lib.c Stanislaw Gruszka 2012-12-12 9037 case RT3572:
d5374ef13ebda6 drivers/net/wireless/rt2x00/rt2800lib.c Stanislaw Gruszka 2012-12-12 9038 rt2800_init_rfcsr_3572(rt2x00dev);
d5374ef13ebda6 drivers/net/wireless/rt2x00/rt2800lib.c Stanislaw Gruszka 2012-12-12 9039 break;
ab7078ac3d920e drivers/net/wireless/rt2x00/rt2800lib.c Gabor Juhos 2013-07-08 9040 case RT3593:
ab7078ac3d920e drivers/net/wireless/rt2x00/rt2800lib.c Gabor Juhos 2013-07-08 9041 rt2800_init_rfcsr_3593(rt2x00dev);
ab7078ac3d920e drivers/net/wireless/rt2x00/rt2800lib.c Gabor Juhos 2013-07-08 9042 break;
98e71f44c51d0a drivers/net/wireless/ralink/rt2x00/rt2800lib.c Serge Vasilugin 2017-01-20 9043 case RT5350:
98e71f44c51d0a drivers/net/wireless/ralink/rt2x00/rt2800lib.c Serge Vasilugin 2017-01-20 9044 rt2800_init_rfcsr_5350(rt2x00dev);
98e71f44c51d0a drivers/net/wireless/ralink/rt2x00/rt2800lib.c Serge Vasilugin 2017-01-20 9045 break;
d5374ef13ebda6 drivers/net/wireless/rt2x00/rt2800lib.c Stanislaw Gruszka 2012-12-12 9046 case RT5390:
d5374ef13ebda6 drivers/net/wireless/rt2x00/rt2800lib.c Stanislaw Gruszka 2012-12-12 9047 rt2800_init_rfcsr_5390(rt2x00dev);
d5374ef13ebda6 drivers/net/wireless/rt2x00/rt2800lib.c Stanislaw Gruszka 2012-12-12 9048 break;
d5374ef13ebda6 drivers/net/wireless/rt2x00/rt2800lib.c Stanislaw Gruszka 2012-12-12 9049 case RT5392:
d5374ef13ebda6 drivers/net/wireless/rt2x00/rt2800lib.c Stanislaw Gruszka 2012-12-12 9050 rt2800_init_rfcsr_5392(rt2x00dev);
d5374ef13ebda6 drivers/net/wireless/rt2x00/rt2800lib.c Stanislaw Gruszka 2012-12-12 9051 break;
0c9e5fb9190ac4 drivers/net/wireless/rt2x00/rt2800lib.c Stanislaw Gruszka 2013-03-16 9052 case RT5592:
0c9e5fb9190ac4 drivers/net/wireless/rt2x00/rt2800lib.c Stanislaw Gruszka 2013-03-16 9053 rt2800_init_rfcsr_5592(rt2x00dev);
074f25295b78dc drivers/net/wireless/rt2x00/rt2800lib.c Stanislaw Gruszka 2013-04-17 9054 break;
41977e86c984fc drivers/net/wireless/ralink/rt2x00/rt2800lib.c Roman Yeryomin 2017-03-21 9055 case RT6352:
41977e86c984fc drivers/net/wireless/ralink/rt2x00/rt2800lib.c Roman Yeryomin 2017-03-21 9056 rt2800_init_rfcsr_6352(rt2x00dev);
41977e86c984fc drivers/net/wireless/ralink/rt2x00/rt2800lib.c Roman Yeryomin 2017-03-21 9057 break;
d5374ef13ebda6 drivers/net/wireless/rt2x00/rt2800lib.c Stanislaw Gruszka 2012-12-12 9058 }
fcf5154118849c drivers/net/wireless/rt2x00/rt2800lib.c Bartlomiej Zolnierkiewicz 2009-11-04 9059 }
b9a07ae9d9e096 drivers/net/wireless/rt2x00/rt2800lib.c Ivo van Doorn 2010-08-23 9060
:::::: The code at line 9012 was first introduced by commit
:::::: 074f25295b78dca7a0f65b87a16bebe493aab4f9 rt2800: cleanup rt2800_init_rfcsr
:::::: TO: Stanislaw Gruszka <stf_xl(a)wp.pl>
:::::: CC: John W. Linville <linville(a)tuxdriver.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
kernel/cgroup/misc.c:61 valid_type() warn: unsigned 'type' is never less than zero.
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: ad347abe4a9876b1f65f408ab467137e88f77eb4
commit: a72232eabdfcfe365a05a3eb392288b78d25a5ca cgroup: Add misc cgroup controller
date: 10 weeks ago
config: x86_64-randconfig-m001-20210611 (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>
smatch warnings:
kernel/cgroup/misc.c:61 valid_type() warn: unsigned 'type' is never less than zero.
kernel/cgroup/misc.c:210 misc_cg_max_show() warn: we never enter this loop
kernel/cgroup/misc.c:257 misc_cg_max_write() warn: we never enter this loop
kernel/cgroup/misc.c:299 misc_cg_current_show() warn: we never enter this loop
kernel/cgroup/misc.c:323 misc_cg_capacity_show() warn: we never enter this loop
kernel/cgroup/misc.c:376 misc_cg_alloc() warn: we never enter this loop
kernel/cgroup/misc.c:376 misc_cg_alloc() warn: unsigned 'i' is never less than zero.
kernel/cgroup/misc.c:376 misc_cg_alloc() warn: unsigned 'i' is never less than zero.
vim +/type +61 kernel/cgroup/misc.c
49
50 /**
51 * valid_type() - Check if @type is valid or not.
52 * @type: misc res type.
53 *
54 * Context: Any context.
55 * Return:
56 * * true - If valid type.
57 * * false - If not valid type.
58 */
59 static inline bool valid_type(enum misc_res_type type)
60 {
> 61 return type >= 0 && type < MISC_CG_RES_TYPES;
62 }
63
64 /**
65 * misc_cg_res_total_usage() - Get the current total usage of the resource.
66 * @type: misc res type.
67 *
68 * Context: Any context.
69 * Return: Current total usage of the resource.
70 */
71 unsigned long misc_cg_res_total_usage(enum misc_res_type type)
72 {
73 if (valid_type(type))
74 return atomic_long_read(&root_cg.res[type].usage);
75
76 return 0;
77 }
78 EXPORT_SYMBOL_GPL(misc_cg_res_total_usage);
79
80 /**
81 * misc_cg_set_capacity() - Set the capacity of the misc cgroup res.
82 * @type: Type of the misc res.
83 * @capacity: Supported capacity of the misc res on the host.
84 *
85 * If capacity is 0 then the charging a misc cgroup fails for that type.
86 *
87 * Context: Any context.
88 * Return:
89 * * %0 - Successfully registered the capacity.
90 * * %-EINVAL - If @type is invalid.
91 */
92 int misc_cg_set_capacity(enum misc_res_type type, unsigned long capacity)
93 {
94 if (!valid_type(type))
95 return -EINVAL;
96
97 WRITE_ONCE(misc_res_capacity[type], capacity);
98 return 0;
99 }
100 EXPORT_SYMBOL_GPL(misc_cg_set_capacity);
101
102 /**
103 * misc_cg_cancel_charge() - Cancel the charge from the misc cgroup.
104 * @type: Misc res type in misc cg to cancel the charge from.
105 * @cg: Misc cgroup to cancel charge from.
106 * @amount: Amount to cancel.
107 *
108 * Context: Any context.
109 */
110 static void misc_cg_cancel_charge(enum misc_res_type type, struct misc_cg *cg,
111 unsigned long amount)
112 {
113 WARN_ONCE(atomic_long_add_negative(-amount, &cg->res[type].usage),
114 "misc cgroup resource %s became less than 0",
115 misc_res_name[type]);
116 }
117
118 /**
119 * misc_cg_try_charge() - Try charging the misc cgroup.
120 * @type: Misc res type to charge.
121 * @cg: Misc cgroup which will be charged.
122 * @amount: Amount to charge.
123 *
124 * Charge @amount to the misc cgroup. Caller must use the same cgroup during
125 * the uncharge call.
126 *
127 * Context: Any context.
128 * Return:
129 * * %0 - If successfully charged.
130 * * -EINVAL - If @type is invalid or misc res has 0 capacity.
131 * * -EBUSY - If max limit will be crossed or total usage will be more than the
132 * capacity.
133 */
134 int misc_cg_try_charge(enum misc_res_type type, struct misc_cg *cg,
135 unsigned long amount)
136 {
137 struct misc_cg *i, *j;
138 int ret;
139 struct misc_res *res;
140 int new_usage;
141
142 if (!(valid_type(type) && cg && READ_ONCE(misc_res_capacity[type])))
143 return -EINVAL;
144
145 if (!amount)
146 return 0;
147
148 for (i = cg; i; i = parent_misc(i)) {
149 res = &i->res[type];
150
151 new_usage = atomic_long_add_return(amount, &res->usage);
152 if (new_usage > READ_ONCE(res->max) ||
153 new_usage > READ_ONCE(misc_res_capacity[type])) {
154 if (!res->failed) {
155 pr_info("cgroup: charge rejected by the misc controller for %s resource in ",
156 misc_res_name[type]);
157 pr_cont_cgroup_path(i->css.cgroup);
158 pr_cont("\n");
159 res->failed = true;
160 }
161 ret = -EBUSY;
162 goto err_charge;
163 }
164 }
165 return 0;
166
167 err_charge:
168 for (j = cg; j != i; j = parent_misc(j))
169 misc_cg_cancel_charge(type, j, amount);
170 misc_cg_cancel_charge(type, i, amount);
171 return ret;
172 }
173 EXPORT_SYMBOL_GPL(misc_cg_try_charge);
174
175 /**
176 * misc_cg_uncharge() - Uncharge the misc cgroup.
177 * @type: Misc res type which was charged.
178 * @cg: Misc cgroup which will be uncharged.
179 * @amount: Charged amount.
180 *
181 * Context: Any context.
182 */
183 void misc_cg_uncharge(enum misc_res_type type, struct misc_cg *cg,
184 unsigned long amount)
185 {
186 struct misc_cg *i;
187
188 if (!(amount && valid_type(type) && cg))
189 return;
190
191 for (i = cg; i; i = parent_misc(i))
192 misc_cg_cancel_charge(type, i, amount);
193 }
194 EXPORT_SYMBOL_GPL(misc_cg_uncharge);
195
196 /**
197 * misc_cg_max_show() - Show the misc cgroup max limit.
198 * @sf: Interface file
199 * @v: Arguments passed
200 *
201 * Context: Any context.
202 * Return: 0 to denote successful print.
203 */
204 static int misc_cg_max_show(struct seq_file *sf, void *v)
205 {
206 int i;
207 struct misc_cg *cg = css_misc(seq_css(sf));
208 unsigned long max;
209
> 210 for (i = 0; i < MISC_CG_RES_TYPES; i++) {
211 if (READ_ONCE(misc_res_capacity[i])) {
212 max = READ_ONCE(cg->res[i].max);
213 if (max == MAX_NUM)
214 seq_printf(sf, "%s max\n", misc_res_name[i]);
215 else
216 seq_printf(sf, "%s %lu\n", misc_res_name[i],
217 max);
218 }
219 }
220
221 return 0;
222 }
223
224 /**
225 * misc_cg_max_write() - Update the maximum limit of the cgroup.
226 * @of: Handler for the file.
227 * @buf: Data from the user. It should be either "max", 0, or a positive
228 * integer.
229 * @nbytes: Number of bytes of the data.
230 * @off: Offset in the file.
231 *
232 * User can pass data like:
233 * echo sev 23 > misc.max, OR
234 * echo sev max > misc.max
235 *
236 * Context: Any context.
237 * Return:
238 * * >= 0 - Number of bytes processed in the input.
239 * * -EINVAL - If buf is not valid.
240 * * -ERANGE - If number is bigger than the unsigned long capacity.
241 */
242 static ssize_t misc_cg_max_write(struct kernfs_open_file *of, char *buf,
243 size_t nbytes, loff_t off)
244 {
245 struct misc_cg *cg;
246 unsigned long max;
247 int ret = 0, i;
248 enum misc_res_type type = MISC_CG_RES_TYPES;
249 char *token;
250
251 buf = strstrip(buf);
252 token = strsep(&buf, " ");
253
254 if (!token || !buf)
255 return -EINVAL;
256
> 257 for (i = 0; i < MISC_CG_RES_TYPES; i++) {
258 if (!strcmp(misc_res_name[i], token)) {
259 type = i;
260 break;
261 }
262 }
263
264 if (type == MISC_CG_RES_TYPES)
265 return -EINVAL;
266
267 if (!strcmp(MAX_STR, buf)) {
268 max = MAX_NUM;
269 } else {
270 ret = kstrtoul(buf, 0, &max);
271 if (ret)
272 return ret;
273 }
274
275 cg = css_misc(of_css(of));
276
277 if (READ_ONCE(misc_res_capacity[type]))
278 WRITE_ONCE(cg->res[type].max, max);
279 else
280 ret = -EINVAL;
281
282 return ret ? ret : nbytes;
283 }
284
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[linux-next:master 7435/9209] include/linux/compiler_types.h:328:38: error: call to '__compiletime_assert_236' declared with attribute error: unexpected size in kmalloc_index()
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 25fe90f43fa312213b653dc1f12fd2d80f855883
commit: df2de13a32afec989c0e735beb3bc391b3de1dbd [7435/9209] mm, slub: change run-time assertion in kmalloc_index() to compile-time
config: sparc-randconfig-r005-20210611 (attached as .config)
compiler: sparc64-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/next/linux-next.git/commi...
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 df2de13a32afec989c0e735beb3bc391b3de1dbd
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc
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 <command-line>:
In function 'kmalloc_index',
inlined from 'kmalloc_node' at include/linux/slab.h:572:20,
inlined from 'bpf_map_kmalloc_node.isra.0.part.0' at include/linux/bpf.h:1319:9:
>> include/linux/compiler_types.h:328:38: error: call to '__compiletime_assert_236' declared with attribute error: unexpected size in kmalloc_index()
328 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:309:4: note: in definition of macro '__compiletime_assert'
309 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:328:2: note: in expansion of macro '_compiletime_assert'
328 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/slab.h:389:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
389 | BUILD_BUG_ON_MSG(1, "unexpected size in kmalloc_index()");
| ^~~~~~~~~~~~~~~~
vim +/__compiletime_assert_236 +328 include/linux/compiler_types.h
eb5c2d4b45e3d2 Will Deacon 2020-07-21 314
eb5c2d4b45e3d2 Will Deacon 2020-07-21 315 #define _compiletime_assert(condition, msg, prefix, suffix) \
eb5c2d4b45e3d2 Will Deacon 2020-07-21 316 __compiletime_assert(condition, msg, prefix, suffix)
eb5c2d4b45e3d2 Will Deacon 2020-07-21 317
eb5c2d4b45e3d2 Will Deacon 2020-07-21 318 /**
eb5c2d4b45e3d2 Will Deacon 2020-07-21 319 * compiletime_assert - break build and emit msg if condition is false
eb5c2d4b45e3d2 Will Deacon 2020-07-21 320 * @condition: a compile-time constant condition to check
eb5c2d4b45e3d2 Will Deacon 2020-07-21 321 * @msg: a message to emit if condition is false
eb5c2d4b45e3d2 Will Deacon 2020-07-21 322 *
eb5c2d4b45e3d2 Will Deacon 2020-07-21 323 * In tradition of POSIX assert, this macro will break the build if the
eb5c2d4b45e3d2 Will Deacon 2020-07-21 324 * supplied condition is *false*, emitting the supplied error message if the
eb5c2d4b45e3d2 Will Deacon 2020-07-21 325 * compiler has support to do so.
eb5c2d4b45e3d2 Will Deacon 2020-07-21 326 */
eb5c2d4b45e3d2 Will Deacon 2020-07-21 327 #define compiletime_assert(condition, msg) \
eb5c2d4b45e3d2 Will Deacon 2020-07-21 @328 _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
eb5c2d4b45e3d2 Will Deacon 2020-07-21 329
:::::: The code at line 328 was first introduced by commit
:::::: eb5c2d4b45e3d2d5d052ea6b8f1463976b1020d5 compiler.h: Move compiletime_assert() macros into compiler_types.h
:::::: TO: Will Deacon <will(a)kernel.org>
:::::: CC: Will Deacon <will(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[omap-audio:peter/linux-next-wip 1/62] sound/soc/ti/davinci-mcasp.c:863:56: warning: implicit conversion from 'int' to 'u8' (aka 'unsigned char') changes value from 384 to 128
by kernel test robot
tree: https://github.com/omap-audio/linux-audio peter/linux-next-wip
head: 4267b3ab8fe441bf25983bf8288fd3025f67702f
commit: d776d15bf481edbaf4c507e24260dfbf680d4e19 [1/62] ASoC: ti: davinci-mcasp: Fix DIT mode support
config: arm-randconfig-r035-20210611 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project d2012d965d60c3258b3a69d024491698f8aec386)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/omap-audio/linux-audio/commit/d776d15bf481edbaf4c507e2...
git remote add omap-audio https://github.com/omap-audio/linux-audio
git fetch --no-tags omap-audio peter/linux-next-wip
git checkout d776d15bf481edbaf4c507e24260dfbf680d4e19
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross 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 >>):
>> sound/soc/ti/davinci-mcasp.c:863:56: warning: implicit conversion from 'int' to 'u8' (aka 'unsigned char') changes value from 384 to 128 [-Wconstant-conversion]
u8 slots = mcasp->op_mode == DAVINCI_MCASP_DIT_MODE ? 384 : mcasp->tdm_slots;
~~~~~ ^~~
1 warning generated.
vim +863 sound/soc/ti/davinci-mcasp.c
855
856 static int mcasp_common_hw_param(struct davinci_mcasp *mcasp, int stream,
857 int period_words, int channels)
858 {
859 struct snd_dmaengine_dai_dma_data *dma_data = &mcasp->dma_data[stream];
860 int i;
861 u8 tx_ser = 0;
862 u8 rx_ser = 0;
> 863 u8 slots = mcasp->op_mode == DAVINCI_MCASP_DIT_MODE ? 384 : mcasp->tdm_slots;
864 u8 max_active_serializers = (channels + slots - 1) / slots;
865 u8 max_rx_serializers, max_tx_serializers;
866 int active_serializers, numevt;
867 u32 reg;
868 /* Default configuration */
869 if (mcasp->version < MCASP_VERSION_3)
870 mcasp_set_bits(mcasp, DAVINCI_MCASP_PWREMUMGT_REG, MCASP_SOFT);
871
872 if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
873 mcasp_set_reg(mcasp, DAVINCI_MCASP_TXSTAT_REG, 0xFFFFFFFF);
874 mcasp_clr_bits(mcasp, DAVINCI_MCASP_XEVTCTL_REG, TXDATADMADIS);
875 max_tx_serializers = max_active_serializers;
876 max_rx_serializers =
877 mcasp->active_serializers[SNDRV_PCM_STREAM_CAPTURE];
878 } else {
879 mcasp_set_reg(mcasp, DAVINCI_MCASP_RXSTAT_REG, 0xFFFFFFFF);
880 mcasp_clr_bits(mcasp, DAVINCI_MCASP_REVTCTL_REG, RXDATADMADIS);
881 max_tx_serializers =
882 mcasp->active_serializers[SNDRV_PCM_STREAM_PLAYBACK];
883 max_rx_serializers = max_active_serializers;
884 }
885
886 for (i = 0; i < mcasp->num_serializer; i++) {
887 mcasp_set_bits(mcasp, DAVINCI_MCASP_XRSRCTL_REG(i),
888 mcasp->serial_dir[i]);
889 if (mcasp->serial_dir[i] == TX_MODE &&
890 tx_ser < max_tx_serializers) {
891 mcasp_mod_bits(mcasp, DAVINCI_MCASP_XRSRCTL_REG(i),
892 mcasp->dismod, DISMOD_MASK);
893 set_bit(PIN_BIT_AXR(i), &mcasp->pdir);
894 tx_ser++;
895 } else if (mcasp->serial_dir[i] == RX_MODE &&
896 rx_ser < max_rx_serializers) {
897 clear_bit(PIN_BIT_AXR(i), &mcasp->pdir);
898 rx_ser++;
899 } else {
900 /* Inactive or unused pin, set it to inactive */
901 mcasp_mod_bits(mcasp, DAVINCI_MCASP_XRSRCTL_REG(i),
902 SRMOD_INACTIVE, SRMOD_MASK);
903 /* If unused, set DISMOD for the pin */
904 if (mcasp->serial_dir[i] != INACTIVE_MODE)
905 mcasp_mod_bits(mcasp,
906 DAVINCI_MCASP_XRSRCTL_REG(i),
907 mcasp->dismod, DISMOD_MASK);
908 clear_bit(PIN_BIT_AXR(i), &mcasp->pdir);
909 }
910 }
911
912 if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
913 active_serializers = tx_ser;
914 numevt = mcasp->txnumevt;
915 reg = mcasp->fifo_base + MCASP_WFIFOCTL_OFFSET;
916 } else {
917 active_serializers = rx_ser;
918 numevt = mcasp->rxnumevt;
919 reg = mcasp->fifo_base + MCASP_RFIFOCTL_OFFSET;
920 }
921
922 if (mcasp->op_mode == DAVINCI_MCASP_IIS_MODE) {
923 if (active_serializers < max_active_serializers) {
924 dev_warn(mcasp->dev, "stream has more channels (%d) than are "
925 "enabled in mcasp (%d)\n", channels,
926 active_serializers * slots);
927 return -EINVAL;
928 }
929 }
930
931 /* AFIFO is not in use */
932 if (!numevt) {
933 /* Configure the burst size for platform drivers */
934 if (active_serializers > 1) {
935 /*
936 * If more than one serializers are in use we have one
937 * DMA request to provide data for all serializers.
938 * For example if three serializers are enabled the DMA
939 * need to transfer three words per DMA request.
940 */
941 dma_data->maxburst = active_serializers;
942 } else {
943 dma_data->maxburst = 0;
944 }
945
946 goto out;
947 }
948
949 if (period_words % active_serializers) {
950 dev_err(mcasp->dev, "Invalid combination of period words and "
951 "active serializers: %d, %d\n", period_words,
952 active_serializers);
953 return -EINVAL;
954 }
955
956 /*
957 * Calculate the optimal AFIFO depth for platform side:
958 * The number of words for numevt need to be in steps of active
959 * serializers.
960 */
961 numevt = (numevt / active_serializers) * active_serializers;
962
963 while (period_words % numevt && numevt > 0)
964 numevt -= active_serializers;
965 if (numevt <= 0)
966 numevt = active_serializers;
967
968 mcasp_mod_bits(mcasp, reg, active_serializers, NUMDMA_MASK);
969 mcasp_mod_bits(mcasp, reg, NUMEVT(numevt), NUMEVT_MASK);
970
971 /* Configure the burst size for platform drivers */
972 if (numevt == 1)
973 numevt = 0;
974 dma_data->maxburst = numevt;
975
976 out:
977 mcasp->active_serializers[stream] = active_serializers;
978
979 return 0;
980 }
981
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[omap-audio:peter/linux-next-wip 56/62] sound/soc/ti/omap-mcasp.c:603:7: warning: variable 'fclk_rate' set but not used
by kernel test robot
tree: https://github.com/omap-audio/linux-audio peter/linux-next-wip
head: 4267b3ab8fe441bf25983bf8288fd3025f67702f
commit: 179ec2bc789e81f433d7749acfe9a3a7dbf182e4 [56/62] omap: mcasp: add omap-mcasp.* and add to Kconfig, Makefile
config: sparc-allyesconfig (attached as .config)
compiler: sparc64-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://github.com/omap-audio/linux-audio/commit/179ec2bc789e81f433d7749a...
git remote add omap-audio https://github.com/omap-audio/linux-audio
git fetch --no-tags omap-audio peter/linux-next-wip
git checkout 179ec2bc789e81f433d7749acfe9a3a7dbf182e4
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc
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 >>):
sound/soc/ti/omap-mcasp.c: In function 'asoc_mcasp_probe':
>> sound/soc/ti/omap-mcasp.c:603:7: warning: variable 'fclk_rate' set but not used [-Wunused-but-set-variable]
603 | long fclk_rate;
| ^~~~~~~~~
vim +/fclk_rate +603 sound/soc/ti/omap-mcasp.c
598
599 static int asoc_mcasp_probe(struct platform_device *pdev)
600 {
601 struct omap_mcasp *mcasp;
602 struct resource *res;
> 603 long fclk_rate;
604 int ret = 0;
605
606 mcasp = devm_kzalloc(&pdev->dev, sizeof(struct omap_mcasp), GFP_KERNEL);
607 if (!mcasp) {
608 dev_err(&pdev->dev, "cannot allocate memory\n");
609 return -ENOMEM;
610 }
611
612 spin_lock_init(&mcasp->lock);
613
614 omap_mcasp_dai_dma_params[0].filter_data = "axevt";
615
616 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
617 if (!res) {
618 dev_err(&pdev->dev, "no resource\n");
619 return -ENODEV;
620 }
621
622 mcasp->base = devm_ioremap_resource(&pdev->dev, res);
623 if (!mcasp->base) {
624 dev_err(&pdev->dev, "cannot remap\n");
625 return -ENOMEM;
626 }
627
628 mcasp->irq = platform_get_irq(pdev, 0);
629 if (mcasp->irq < 0) {
630 dev_err(&pdev->dev, "invalid IRQ number\n");
631 return mcasp->irq;
632 }
633
634 ret = devm_request_threaded_irq(&pdev->dev, mcasp->irq, NULL,
635 omap_mcasp_irq_handler,
636 IRQF_ONESHOT, "McASP", mcasp);
637 if (ret) {
638 dev_err(mcasp->dev, "IRQ request failed\n");
639 return ret;
640 }
641
642 mcasp->fclk = clk_get(&pdev->dev, "fck");
643 if (!mcasp->fclk) {
644 dev_err(mcasp->dev, "cant get fck\n");
645 return -ENODEV;
646 }
647
648 pm_runtime_enable(&pdev->dev);
649 pm_runtime_get_sync(&pdev->dev);
650
651 fclk_rate = clk_get_rate(mcasp->fclk);
652
653 platform_set_drvdata(pdev, mcasp);
654 mcasp->dev = &pdev->dev;
655
656 ret = snd_soc_register_component(&pdev->dev, &omap_mcasp_component,
657 &omap_mcasp_dai, 1);
658 if (ret < 0)
659 goto err_dai;
660
661 pm_runtime_put_sync(&pdev->dev);
662
663 return sdma_pcm_platform_register(&pdev->dev, "axevt", NULL);;
664
665 err_dai:
666 pm_runtime_put_sync(&pdev->dev);
667 pm_runtime_disable(&pdev->dev);
668 return ret;
669 }
670
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[intel-linux-intel-lts:5.10/preempt-rt 19/26] include/linux/seqlock.h:178:36: error: initialization of 'seqcount_spinlock_t *' {aka 'struct seqcount_spinlock *'} from incompatible pointer type 'seqcount_t *' {aka 'struct seqcount *'}
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.10/preempt-rt
head: ab2a4c18536ed3f3ec2fbd942657b31d6f63fe7c
commit: 85689867faad45d8385c0d0001395735c778d2e3 [19/26] Revert "xfrm: fix lock usage issue"
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-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://github.com/intel/linux-intel-lts/commit/85689867faad45d8385c0d000...
git remote add intel-linux-intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-linux-intel-lts 5.10/preempt-rt
git checkout 85689867faad45d8385c0d0001395735c778d2e3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Note: the intel-linux-intel-lts/5.10/preempt-rt HEAD ab2a4c18536ed3f3ec2fbd942657b31d6f63fe7c builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>):
In file included from include/linux/mmzone.h:16,
from include/linux/gfp.h:6,
from include/linux/mm.h:10,
from include/linux/bvec.h:14,
from include/linux/skbuff.h:17,
from include/net/xfrm.h:9,
from net/xfrm/xfrm_state.c:18:
net/xfrm/xfrm_state.c: In function 'xfrm_state_init':
>> include/linux/seqlock.h:178:36: error: initialization of 'seqcount_spinlock_t *' {aka 'struct seqcount_spinlock *'} from incompatible pointer type 'seqcount_t *' {aka 'struct seqcount *'} [-Werror=incompatible-pointer-types]
178 | seqcount_##lockname##_t *____s = (s); \
| ^
include/linux/seqlock.h:184:42: note: in expansion of macro 'seqcount_LOCKNAME_init'
184 | #define seqcount_spinlock_init(s, lock) seqcount_LOCKNAME_init(s, lock, spinlock)
| ^~~~~~~~~~~~~~~~~~~~~~
net/xfrm/xfrm_state.c:2666:2: note: in expansion of macro 'seqcount_spinlock_init'
2666 | seqcount_spinlock_init(&net->xfrm.xfrm_state_hash_generation,
| ^~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +178 include/linux/seqlock.h
55f3560df975f55 Ahmed S. Darwish 2020-07-20 156
ed3e453798d4f81 Mauro Carvalho Chehab 2020-10-13 157 /*
6dd699b13d53f26 Ahmed S. Darwish 2020-09-04 158 * typedef seqcount_LOCKNAME_t - sequence counter with LOCKNAME associated
a8772dccb2ec7b1 Peter Zijlstra 2020-07-23 159 * @seqcount: The real sequence counter
6dd699b13d53f26 Ahmed S. Darwish 2020-09-04 160 * @lock: Pointer to the associated lock
a8772dccb2ec7b1 Peter Zijlstra 2020-07-23 161 *
6dd699b13d53f26 Ahmed S. Darwish 2020-09-04 162 * A plain sequence counter with external writer synchronization by
6dd699b13d53f26 Ahmed S. Darwish 2020-09-04 163 * LOCKNAME @lock. The lock is associated to the sequence counter in the
a8772dccb2ec7b1 Peter Zijlstra 2020-07-23 164 * static initializer or init function. This enables lockdep to validate
a8772dccb2ec7b1 Peter Zijlstra 2020-07-23 165 * that the write side critical section is properly serialized.
6dd699b13d53f26 Ahmed S. Darwish 2020-09-04 166 *
6dd699b13d53f26 Ahmed S. Darwish 2020-09-04 167 * LOCKNAME: raw_spinlock, spinlock, rwlock, mutex, or ww_mutex.
a8772dccb2ec7b1 Peter Zijlstra 2020-07-23 168 */
a8772dccb2ec7b1 Peter Zijlstra 2020-07-23 169
a28e884b966e713 Randy Dunlap 2020-08-16 170 /*
e4e9ab3f9f91ad3 Peter Zijlstra 2020-07-23 171 * seqcount_LOCKNAME_init() - runtime initializer for seqcount_LOCKNAME_t
e4e9ab3f9f91ad3 Peter Zijlstra 2020-07-23 172 * @s: Pointer to the seqcount_LOCKNAME_t instance
6dd699b13d53f26 Ahmed S. Darwish 2020-09-04 173 * @lock: Pointer to the associated lock
e4e9ab3f9f91ad3 Peter Zijlstra 2020-07-23 174 */
e4e9ab3f9f91ad3 Peter Zijlstra 2020-07-23 175
267580db047ef42 peterz(a)infradead.org 2020-09-15 176 #define seqcount_LOCKNAME_init(s, _lock, lockname) \
267580db047ef42 peterz(a)infradead.org 2020-09-15 177 do { \
267580db047ef42 peterz(a)infradead.org 2020-09-15 @178 seqcount_##lockname##_t *____s = (s); \
267580db047ef42 peterz(a)infradead.org 2020-09-15 179 seqcount_init(&____s->seqcount); \
267580db047ef42 peterz(a)infradead.org 2020-09-15 180 __SEQ_LOCK(____s->lock = (_lock)); \
267580db047ef42 peterz(a)infradead.org 2020-09-15 181 } while (0)
267580db047ef42 peterz(a)infradead.org 2020-09-15 182
:::::: The code at line 178 was first introduced by commit
:::::: 267580db047ef428a70bef8287ca62c5a450c139 seqlock: Unbreak lockdep
:::::: TO: peterz(a)infradead.org <peterz(a)infradead.org>
:::::: CC: Peter Zijlstra <peterz(a)infradead.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[intel-linux-intel-lts:5.4/yocto 245/1142] kernel/trace/blktrace.c:548:13: sparse: sparse: cast removes address space '<asn:4>' of expression
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: eeb611e5394c56d45c5cc8f7dc484c9f19e93143
commit: 51accd393a8fb80ae3223bb67abef816bc299cb5 [245/1142] riscv/atomic: Fix sign extension for RV64I
config: riscv-randconfig-s032-20210611 (attached as .config)
compiler: riscv32-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://github.com/intel/linux-intel-lts/commit/51accd393a8fb80ae3223bb67...
git remote add intel-linux-intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-linux-intel-lts 5.4/yocto
git checkout 51accd393a8fb80ae3223bb67abef816bc299cb5
# 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=riscv
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 >>)
kernel/trace/blktrace.c:348:12: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct blk_trace *bt @@ got struct blk_trace [noderef] <asn:4> * @@
kernel/trace/blktrace.c:348:12: sparse: expected struct blk_trace *bt
kernel/trace/blktrace.c:348:12: sparse: got struct blk_trace [noderef] <asn:4> *
kernel/trace/blktrace.c:548:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct blk_trace [noderef] <asn:4> *_n_ @@ got struct blk_trace *[assigned] bt @@
kernel/trace/blktrace.c:548:13: sparse: expected struct blk_trace [noderef] <asn:4> *_n_
kernel/trace/blktrace.c:548:13: sparse: got struct blk_trace *[assigned] bt
>> kernel/trace/blktrace.c:548:13: sparse: sparse: cast removes address space '<asn:4>' of expression
kernel/trace/blktrace.c:1624:12: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct blk_trace *bt @@ got struct blk_trace [noderef] <asn:4> * @@
kernel/trace/blktrace.c:1624:12: sparse: expected struct blk_trace *bt
kernel/trace/blktrace.c:1624:12: sparse: got struct blk_trace [noderef] <asn:4> *
kernel/trace/blktrace.c:1657:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct blk_trace [noderef] <asn:4> *_n_ @@ got struct blk_trace *[assigned] bt @@
kernel/trace/blktrace.c:1657:13: sparse: expected struct blk_trace [noderef] <asn:4> *_n_
kernel/trace/blktrace.c:1657:13: sparse: got struct blk_trace *[assigned] bt
kernel/trace/blktrace.c:1657:13: sparse: sparse: cast removes address space '<asn:4>' of expression
vim +548 kernel/trace/blktrace.c
9908c30997b8a7 kernel/trace/blktrace.c Li Zefan 2009-04-14 471
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 472 /*
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 473 * Setup everything required to start tracing
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 474 */
a428d314ebcf65 kernel/trace/blktrace.c Omar Sandoval 2017-01-31 475 static int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev,
d0deef5b14af7d kernel/trace/blktrace.c Shawn Du 2009-04-14 476 struct block_device *bdev,
171044d449611c block/blktrace.c Arnd Bergmann 2007-10-09 477 struct blk_user_trace_setup *buts)
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 478 {
cdea01b2bf98af kernel/trace/blktrace.c Davidlohr Bueso 2015-10-30 479 struct blk_trace *bt = NULL;
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 480 struct dentry *dir = NULL;
ff14417c0a00c9 kernel/trace/blktrace.c Rasmus Villemoes 2015-06-25 481 int ret;
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 482
171044d449611c block/blktrace.c Arnd Bergmann 2007-10-09 483 if (!buts->buf_size || !buts->buf_nr)
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 484 return -EINVAL;
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 485
e1a413245a5646 kernel/trace/blktrace.c Liu Bo 2018-06-29 486 if (!blk_debugfs_root)
e1a413245a5646 kernel/trace/blktrace.c Liu Bo 2018-06-29 487 return -ENOENT;
e1a413245a5646 kernel/trace/blktrace.c Liu Bo 2018-06-29 488
0497b345e7d067 block/blktrace.c Jens Axboe 2008-10-01 489 strncpy(buts->name, name, BLKTRACE_BDEV_SIZE);
0497b345e7d067 block/blktrace.c Jens Axboe 2008-10-01 490 buts->name[BLKTRACE_BDEV_SIZE - 1] = '\0';
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 491
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 492 /*
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 493 * some device names have larger paths - convert the slashes
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 494 * to underscores for this to work as expected
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 495 */
ff14417c0a00c9 kernel/trace/blktrace.c Rasmus Villemoes 2015-06-25 496 strreplace(buts->name, '/', '_');
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 497
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 498 bt = kzalloc(sizeof(*bt), GFP_KERNEL);
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 499 if (!bt)
ad5dd5493a55e4 kernel/trace/blktrace.c Li Zefan 2009-03-27 500 return -ENOMEM;
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 501
ad5dd5493a55e4 kernel/trace/blktrace.c Li Zefan 2009-03-27 502 ret = -ENOMEM;
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 503 bt->sequence = alloc_percpu(unsigned long);
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 504 if (!bt->sequence)
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 505 goto err;
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 506
313e458f81ec38 block/blktrace.c Rusty Russell 2009-02-20 507 bt->msg_data = __alloc_percpu(BLK_TN_MAX_MSG, __alignof__(char));
64565911cdb57c block/blktrace.c Jens Axboe 2008-05-28 508 if (!bt->msg_data)
64565911cdb57c block/blktrace.c Jens Axboe 2008-05-28 509 goto err;
64565911cdb57c block/blktrace.c Jens Axboe 2008-05-28 510
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 511 ret = -ENOENT;
f48fc4d32e24c0 block/blktrace.c Jens Axboe 2009-01-05 512
6ac93117ab009d kernel/trace/blktrace.c Omar Sandoval 2017-01-31 513 dir = debugfs_lookup(buts->name, blk_debugfs_root);
6ac93117ab009d kernel/trace/blktrace.c Omar Sandoval 2017-01-31 514 if (!dir)
6ac93117ab009d kernel/trace/blktrace.c Omar Sandoval 2017-01-31 515 bt->dir = dir = debugfs_create_dir(buts->name, blk_debugfs_root);
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 516
6da127ad0918f9 block/blktrace.c Christof Schmitt 2008-01-11 517 bt->dev = dev;
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 518 atomic_set(&bt->dropped, 0);
a404d5576bbe58 kernel/trace/blktrace.c Jan Kara 2013-09-17 519 INIT_LIST_HEAD(&bt->running_list);
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 520
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 521 ret = -EIO;
939b366977d29b block/blktrace.c Arnaldo Carvalho de Melo 2009-02-03 522 bt->dropped_file = debugfs_create_file("dropped", 0444, dir, bt,
939b366977d29b block/blktrace.c Arnaldo Carvalho de Melo 2009-02-03 523 &blk_dropped_fops);
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 524
02c62304e6af60 block/blktrace.c Alan D. Brunelle 2008-06-11 525 bt->msg_file = debugfs_create_file("msg", 0222, dir, bt, &blk_msg_fops);
02c62304e6af60 block/blktrace.c Alan D. Brunelle 2008-06-11 526
171044d449611c block/blktrace.c Arnd Bergmann 2007-10-09 527 bt->rchan = relay_open("trace", dir, buts->buf_size,
171044d449611c block/blktrace.c Arnd Bergmann 2007-10-09 528 buts->buf_nr, &blk_relay_callbacks, bt);
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 529 if (!bt->rchan)
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 530 goto err;
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 531
171044d449611c block/blktrace.c Arnd Bergmann 2007-10-09 532 bt->act_mask = buts->act_mask;
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 533 if (!bt->act_mask)
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 534 bt->act_mask = (u16) -1;
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 535
9908c30997b8a7 kernel/trace/blktrace.c Li Zefan 2009-04-14 536 blk_trace_setup_lba(bt, bdev);
d0deef5b14af7d kernel/trace/blktrace.c Shawn Du 2009-04-14 537
d0deef5b14af7d kernel/trace/blktrace.c Shawn Du 2009-04-14 538 /* overwrite with user settings */
d0deef5b14af7d kernel/trace/blktrace.c Shawn Du 2009-04-14 539 if (buts->start_lba)
171044d449611c block/blktrace.c Arnd Bergmann 2007-10-09 540 bt->start_lba = buts->start_lba;
d0deef5b14af7d kernel/trace/blktrace.c Shawn Du 2009-04-14 541 if (buts->end_lba)
171044d449611c block/blktrace.c Arnd Bergmann 2007-10-09 542 bt->end_lba = buts->end_lba;
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 543
171044d449611c block/blktrace.c Arnd Bergmann 2007-10-09 544 bt->pid = buts->pid;
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 545 bt->trace_state = Blktrace_setup;
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 546
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 547 ret = -EBUSY;
cdea01b2bf98af kernel/trace/blktrace.c Davidlohr Bueso 2015-10-30 @548 if (cmpxchg(&q->blk_trace, NULL, bt))
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 549 goto err;
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 550
a6da0024ffc19e kernel/trace/blktrace.c Jens Axboe 2017-11-05 551 get_probe_ref();
cbe28296eb1ac4 kernel/trace/blktrace.c Li Zefan 2009-03-20 552
6ac93117ab009d kernel/trace/blktrace.c Omar Sandoval 2017-01-31 553 ret = 0;
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 554 err:
6ac93117ab009d kernel/trace/blktrace.c Omar Sandoval 2017-01-31 555 if (dir && !bt->dir)
6ac93117ab009d kernel/trace/blktrace.c Omar Sandoval 2017-01-31 556 dput(dir);
6ac93117ab009d kernel/trace/blktrace.c Omar Sandoval 2017-01-31 557 if (ret)
ad5dd5493a55e4 kernel/trace/blktrace.c Li Zefan 2009-03-27 558 blk_trace_free(bt);
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 559 return ret;
2056a782f8e7e6 block/blktrace.c Jens Axboe 2006-03-23 560 }
171044d449611c block/blktrace.c Arnd Bergmann 2007-10-09 561
:::::: The code at line 548 was first introduced by commit
:::::: cdea01b2bf98affb7e9c44530108a4a28535eee8 blktrace: re-write setting q->blk_trace
:::::: TO: Davidlohr Bueso <dave(a)stgolabs.ne>
:::::: CC: Jens Axboe <axboe(a)fb.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[net-next:master 183/184] drivers/net/ethernet/ibm/ibmvnic.c:855:2: warning: enumeration value 'VNIC_DOWN' not handled in switch
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head: 76cf404c40ae8efcf8c6405535a3f6f69e6ba2a5
commit: 53f8b1b25419a14b784feb6706bfe5bac03c5a75 [183/184] ibmvnic: Allow device probe if the device is not ready at boot
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-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/davem/net-next.git/commit...
git remote add net-next https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
git fetch --no-tags net-next master
git checkout 53f8b1b25419a14b784feb6706bfe5bac03c5a75
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
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 >>):
drivers/net/ethernet/ibm/ibmvnic.c: In function 'adapter_state_to_string':
>> drivers/net/ethernet/ibm/ibmvnic.c:855:2: warning: enumeration value 'VNIC_DOWN' not handled in switch [-Wswitch]
855 | switch (state) {
| ^~~~~~
drivers/net/ethernet/ibm/ibmvnic.c: In function 'reset_reason_to_string':
>> drivers/net/ethernet/ibm/ibmvnic.c:1958:2: warning: enumeration value 'VNIC_RESET_PASSIVE_INIT' not handled in switch [-Wswitch]
1958 | switch (reason) {
| ^~~~~~
In file included from include/linux/string.h:269,
from arch/powerpc/include/asm/paca.h:15,
from arch/powerpc/include/asm/current.h:13,
from include/linux/thread_info.h:22,
from include/asm-generic/preempt.h:5,
from ./arch/powerpc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:16,
from drivers/net/ethernet/ibm/ibmvnic.c:35:
In function 'strncpy',
inlined from 'handle_vpd_rsp' at drivers/net/ethernet/ibm/ibmvnic.c:4388:3:
include/linux/fortify-string.h:27:30: warning: '__builtin_strncpy' output truncated before terminating nul copying 3 bytes from a string of the same length [-Wstringop-truncation]
27 | #define __underlying_strncpy __builtin_strncpy
| ^
include/linux/fortify-string.h:38:9: note: in expansion of macro '__underlying_strncpy'
38 | return __underlying_strncpy(p, q, size);
| ^~~~~~~~~~~~~~~~~~~~
vim +/VNIC_DOWN +855 drivers/net/ethernet/ibm/ibmvnic.c
86f669b2b7491b Nathan Fontenot 2018-02-19 852
0666ef7f61ca76 Lijun Pan 2021-04-12 853 static const char *adapter_state_to_string(enum vnic_state state)
0666ef7f61ca76 Lijun Pan 2021-04-12 854 {
0666ef7f61ca76 Lijun Pan 2021-04-12 @855 switch (state) {
0666ef7f61ca76 Lijun Pan 2021-04-12 856 case VNIC_PROBING:
0666ef7f61ca76 Lijun Pan 2021-04-12 857 return "PROBING";
0666ef7f61ca76 Lijun Pan 2021-04-12 858 case VNIC_PROBED:
0666ef7f61ca76 Lijun Pan 2021-04-12 859 return "PROBED";
0666ef7f61ca76 Lijun Pan 2021-04-12 860 case VNIC_OPENING:
0666ef7f61ca76 Lijun Pan 2021-04-12 861 return "OPENING";
0666ef7f61ca76 Lijun Pan 2021-04-12 862 case VNIC_OPEN:
0666ef7f61ca76 Lijun Pan 2021-04-12 863 return "OPEN";
0666ef7f61ca76 Lijun Pan 2021-04-12 864 case VNIC_CLOSING:
0666ef7f61ca76 Lijun Pan 2021-04-12 865 return "CLOSING";
0666ef7f61ca76 Lijun Pan 2021-04-12 866 case VNIC_CLOSED:
0666ef7f61ca76 Lijun Pan 2021-04-12 867 return "CLOSED";
0666ef7f61ca76 Lijun Pan 2021-04-12 868 case VNIC_REMOVING:
0666ef7f61ca76 Lijun Pan 2021-04-12 869 return "REMOVING";
0666ef7f61ca76 Lijun Pan 2021-04-12 870 case VNIC_REMOVED:
0666ef7f61ca76 Lijun Pan 2021-04-12 871 return "REMOVED";
0666ef7f61ca76 Lijun Pan 2021-04-12 872 }
07b5dc1d515a9a Michal Suchanek 2021-05-20 873 return "UNKNOWN";
0666ef7f61ca76 Lijun Pan 2021-04-12 874 }
0666ef7f61ca76 Lijun Pan 2021-04-12 875
:::::: The code at line 855 was first introduced by commit
:::::: 0666ef7f61ca763897fdcd385d65555dd4764514 ibmvnic: print adapter state as a string
:::::: TO: Lijun Pan <lijunp213(a)gmail.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, 3 months
[PATCH 1/2] ima: Fix warning: no previous prototype for function 'ima_add_kexec_buffer'
by Lakshmi Ramasubramanian
The function prototype for ima_add_kexec_buffer() is present
in 'linux/ima.h'. But this header file is not included in
ima_kexec.c where the function is implemented. This results
in the following compiler warning when "-Wmissing-prototypes" flag
is turned on:
security/integrity/ima/ima_kexec.c:81:6: warning: no previous prototype
for function 'ima_add_kexec_buffer' [-Wmissing-prototypes]
Include the header file 'linux/ima.h' in ima_kexec.c to fix
the compiler warning.
Fixes: dce92f6b11c3 (arm64: Enable passing IMA log to next kernel on kexec)
Reported-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: Lakshmi Ramasubramanian <nramas(a)linux.microsoft.com>
---
security/integrity/ima/ima_kexec.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/security/integrity/ima/ima_kexec.c b/security/integrity/ima/ima_kexec.c
index 667887665823..f799cc278a9a 100644
--- a/security/integrity/ima/ima_kexec.c
+++ b/security/integrity/ima/ima_kexec.c
@@ -11,6 +11,7 @@
#include <linux/vmalloc.h>
#include <linux/kexec.h>
#include <linux/of.h>
+#include <linux/ima.h>
#include "ima.h"
#ifdef CONFIG_IMA_KEXEC
--
2.25.1
1 year, 3 months