[linux-rt-devel:linux-5.10.y-rt 250/279] kernel/trace/trace_branch.c:62:2: error: 'trace_ctx' undeclared; did you mean
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-5.10.y-rt
head: 822f2ce254f44f8e65ccb2cdbd7cf4cf2208a3ff
commit: e7dc055a10416e0c6eabd518d6ed89da38eca0f1 [250/279] tracing: Merge irqflags + preemt counter, add RT bits (update)
config: i386-randconfig-a005-20210216 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/com...
git remote add linux-rt-devel https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git
git fetch --no-tags linux-rt-devel linux-5.10.y-rt
git checkout e7dc055a10416e0c6eabd518d6ed89da38eca0f1
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Note: the linux-rt-devel/linux-5.10.y-rt HEAD 822f2ce254f44f8e65ccb2cdbd7cf4cf2208a3ff builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>):
kernel/trace/trace_branch.c: In function 'probe_likely_condition':
>> kernel/trace/trace_branch.c:62:2: error: 'trace_ctx' undeclared (first use in this function); did you mean 'trace_reg'?
62 | trace_ctx = _tracing_gen_ctx_flags(flags);
| ^~~~~~~~~
| trace_reg
kernel/trace/trace_branch.c:62:2: note: each undeclared identifier is reported only once for each function it appears in
kernel/trace/trace_branch.c:40:15: warning: unused variable 'pc' [-Wunused-variable]
40 | unsigned int pc;
| ^~
kernel/trace/trace_branch.c: At top level:
kernel/trace/trace_branch.c:205:6: warning: no previous prototype for 'ftrace_likely_update' [-Wmissing-prototypes]
205 | void ftrace_likely_update(struct ftrace_likely_data *f, int val,
| ^~~~~~~~~~~~~~~~~~~~
vim +62 kernel/trace/trace_branch.c
29
30 static void
31 probe_likely_condition(struct ftrace_likely_data *f, int val, int expect)
32 {
33 struct trace_event_call *call = &event_branch;
34 struct trace_array *tr = branch_tracer;
35 struct trace_buffer *buffer;
36 struct trace_array_cpu *data;
37 struct ring_buffer_event *event;
38 struct trace_branch *entry;
39 unsigned long flags;
40 unsigned int pc;
41 const char *p;
42
43 if (current->trace_recursion & TRACE_BRANCH_BIT)
44 return;
45
46 /*
47 * I would love to save just the ftrace_likely_data pointer, but
48 * this code can also be used by modules. Ugly things can happen
49 * if the module is unloaded, and then we go and read the
50 * pointer. This is slower, but much safer.
51 */
52
53 if (unlikely(!tr))
54 return;
55
56 raw_local_irq_save(flags);
57 current->trace_recursion |= TRACE_BRANCH_BIT;
58 data = this_cpu_ptr(tr->array_buffer.data);
59 if (atomic_read(&data->disabled))
60 goto out;
61
> 62 trace_ctx = _tracing_gen_ctx_flags(flags);
63 buffer = tr->array_buffer.buffer;
64 event = trace_buffer_lock_reserve(buffer, TRACE_BRANCH,
65 sizeof(*entry), trace_ctx);
66 if (!event)
67 goto out;
68
69 entry = ring_buffer_event_data(event);
70
71 /* Strip off the path, only save the file */
72 p = f->data.file + strlen(f->data.file);
73 while (p >= f->data.file && *p != '/')
74 p--;
75 p++;
76
77 strncpy(entry->func, f->data.func, TRACE_FUNC_SIZE);
78 strncpy(entry->file, p, TRACE_FILE_SIZE);
79 entry->func[TRACE_FUNC_SIZE] = 0;
80 entry->file[TRACE_FILE_SIZE] = 0;
81 entry->constant = f->constant;
82 entry->line = f->data.line;
83 entry->correct = val == expect;
84
85 if (!call_filter_check_discard(call, entry, buffer, event))
86 trace_buffer_unlock_commit_nostack(buffer, event);
87
88 out:
89 current->trace_recursion &= ~TRACE_BRANCH_BIT;
90 raw_local_irq_restore(flags);
91 }
92
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
[brgl-linux:gpio/for-next 71/71] drivers/gpio/gpio-pcf857x.c:335:41: error: expected ';' before 'if'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git gpio/for-next
head: ab94f4c529bc92340a54ca2925330e25d2ba16f7
commit: ab94f4c529bc92340a54ca2925330e25d2ba16f7 [71/71] gpio: pcf857x: Fix missing first interrupt
config: arc-randconfig-s032-20210218 (attached as .config)
compiler: arc-elf-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-215-g0fb77bb6-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git/commit/?id...
git remote add brgl-linux https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git
git fetch --no-tags brgl-linux gpio/for-next
git checkout ab94f4c529bc92340a54ca2925330e25d2ba16f7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arc
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 >>):
drivers/gpio/gpio-pcf857x.c: In function 'pcf857x_probe':
>> drivers/gpio/gpio-pcf857x.c:335:41: error: expected ';' before 'if'
335 | gpio->status = gpio->read(gpio->client)
| ^
| ;
......
338 | if (client->irq) {
| ~~
At top level:
drivers/gpio/gpio-pcf857x.c:224:13: warning: 'pcf857x_irq_bus_sync_unlock' defined but not used [-Wunused-function]
224 | static void pcf857x_irq_bus_sync_unlock(struct irq_data *data)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-pcf857x.c:217:13: warning: 'pcf857x_irq_bus_lock' defined but not used [-Wunused-function]
217 | static void pcf857x_irq_bus_lock(struct irq_data *data)
| ^~~~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-pcf857x.c:210:13: warning: 'pcf857x_irq_disable' defined but not used [-Wunused-function]
210 | static void pcf857x_irq_disable(struct irq_data *data)
| ^~~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-pcf857x.c:203:13: warning: 'pcf857x_irq_enable' defined but not used [-Wunused-function]
203 | static void pcf857x_irq_enable(struct irq_data *data)
| ^~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-pcf857x.c:196:12: warning: 'pcf857x_irq_set_wake' defined but not used [-Wunused-function]
196 | static int pcf857x_irq_set_wake(struct irq_data *data, unsigned int on)
| ^~~~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-pcf857x.c:194:13: warning: 'noop' defined but not used [-Wunused-function]
194 | static void noop(struct irq_data *data) { }
| ^~~~
drivers/gpio/gpio-pcf857x.c:169:20: warning: 'pcf857x_irq' defined but not used [-Wunused-function]
169 | static irqreturn_t pcf857x_irq(int irq, void *data)
| ^~~~~~~~~~~
vim +335 drivers/gpio/gpio-pcf857x.c
232
233 static int pcf857x_probe(struct i2c_client *client,
234 const struct i2c_device_id *id)
235 {
236 struct pcf857x_platform_data *pdata = dev_get_platdata(&client->dev);
237 struct device_node *np = client->dev.of_node;
238 struct pcf857x *gpio;
239 unsigned int n_latch = 0;
240 int status;
241
242 if (IS_ENABLED(CONFIG_OF) && np)
243 of_property_read_u32(np, "lines-initial-states", &n_latch);
244 else if (pdata)
245 n_latch = pdata->n_latch;
246 else
247 dev_dbg(&client->dev, "no platform data\n");
248
249 /* Allocate, initialize, and register this gpio_chip. */
250 gpio = devm_kzalloc(&client->dev, sizeof(*gpio), GFP_KERNEL);
251 if (!gpio)
252 return -ENOMEM;
253
254 mutex_init(&gpio->lock);
255
256 gpio->chip.base = pdata ? pdata->gpio_base : -1;
257 gpio->chip.can_sleep = true;
258 gpio->chip.parent = &client->dev;
259 gpio->chip.owner = THIS_MODULE;
260 gpio->chip.get = pcf857x_get;
261 gpio->chip.set = pcf857x_set;
262 gpio->chip.direction_input = pcf857x_input;
263 gpio->chip.direction_output = pcf857x_output;
264 gpio->chip.ngpio = id->driver_data;
265
266 /* NOTE: the OnSemi jlc1562b is also largely compatible with
267 * these parts, notably for output. It has a low-resolution
268 * DAC instead of pin change IRQs; and its inputs can be the
269 * result of comparators.
270 */
271
272 /* 8574 addresses are 0x20..0x27; 8574a uses 0x38..0x3f;
273 * 9670, 9672, 9764, and 9764a use quite a variety.
274 *
275 * NOTE: we don't distinguish here between *4 and *4a parts.
276 */
277 if (gpio->chip.ngpio == 8) {
278 gpio->write = i2c_write_le8;
279 gpio->read = i2c_read_le8;
280
281 if (!i2c_check_functionality(client->adapter,
282 I2C_FUNC_SMBUS_BYTE))
283 status = -EIO;
284
285 /* fail if there's no chip present */
286 else
287 status = i2c_smbus_read_byte(client);
288
289 /* '75/'75c addresses are 0x20..0x27, just like the '74;
290 * the '75c doesn't have a current source pulling high.
291 * 9671, 9673, and 9765 use quite a variety of addresses.
292 *
293 * NOTE: we don't distinguish here between '75 and '75c parts.
294 */
295 } else if (gpio->chip.ngpio == 16) {
296 gpio->write = i2c_write_le16;
297 gpio->read = i2c_read_le16;
298
299 if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C))
300 status = -EIO;
301
302 /* fail if there's no chip present */
303 else
304 status = i2c_read_le16(client);
305
306 } else {
307 dev_dbg(&client->dev, "unsupported number of gpios\n");
308 status = -EINVAL;
309 }
310
311 if (status < 0)
312 goto fail;
313
314 gpio->chip.label = client->name;
315
316 gpio->client = client;
317 i2c_set_clientdata(client, gpio);
318
319 /* NOTE: these chips have strange "quasi-bidirectional" I/O pins.
320 * We can't actually know whether a pin is configured (a) as output
321 * and driving the signal low, or (b) as input and reporting a low
322 * value ... without knowing the last value written since the chip
323 * came out of reset (if any). We can't read the latched output.
324 *
325 * In short, the only reliable solution for setting up pin direction
326 * is to do it explicitly. The setup() method can do that, but it
327 * may cause transient glitching since it can't know the last value
328 * written (some pins may need to be driven low).
329 *
330 * Using n_latch avoids that trouble. When left initialized to zero,
331 * our software copy of the "latch" then matches the chip's all-ones
332 * reset state. Otherwise it flags pins to be driven low.
333 */
334 gpio->out = ~n_latch;
> 335 gpio->status = gpio->read(gpio->client)
336
337 /* Enable irqchip if we have an interrupt */
338 if (client->irq) {
339 struct gpio_irq_chip *girq;
340
341 gpio->irqchip.name = "pcf857x";
342 gpio->irqchip.irq_enable = pcf857x_irq_enable;
343 gpio->irqchip.irq_disable = pcf857x_irq_disable;
344 gpio->irqchip.irq_ack = noop;
345 gpio->irqchip.irq_mask = noop;
346 gpio->irqchip.irq_unmask = noop;
347 gpio->irqchip.irq_set_wake = pcf857x_irq_set_wake;
348 gpio->irqchip.irq_bus_lock = pcf857x_irq_bus_lock;
349 gpio->irqchip.irq_bus_sync_unlock = pcf857x_irq_bus_sync_unlock;
350
351 status = devm_request_threaded_irq(&client->dev, client->irq,
352 NULL, pcf857x_irq, IRQF_ONESHOT |
353 IRQF_TRIGGER_FALLING | IRQF_SHARED,
354 dev_name(&client->dev), gpio);
355 if (status)
356 goto fail;
357
358 girq = &gpio->chip.irq;
359 girq->chip = &gpio->irqchip;
360 /* This will let us handle the parent IRQ in the driver */
361 girq->parent_handler = NULL;
362 girq->num_parents = 0;
363 girq->parents = NULL;
364 girq->default_type = IRQ_TYPE_NONE;
365 girq->handler = handle_level_irq;
366 girq->threaded = true;
367 }
368
369 status = devm_gpiochip_add_data(&client->dev, &gpio->chip, gpio);
370 if (status < 0)
371 goto fail;
372
373 /* Let platform code set up the GPIOs and their users.
374 * Now is the first time anyone could use them.
375 */
376 if (pdata && pdata->setup) {
377 status = pdata->setup(client,
378 gpio->chip.base, gpio->chip.ngpio,
379 pdata->context);
380 if (status < 0)
381 dev_warn(&client->dev, "setup --> %d\n", status);
382 }
383
384 dev_info(&client->dev, "probed\n");
385
386 return 0;
387
388 fail:
389 dev_dbg(&client->dev, "probe error %d for '%s'\n", status,
390 client->name);
391
392 return status;
393 }
394
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
Re: {standard input}:577: Error: unsupported relocation against base
by Feng Tang
Hi Christophe and Michael,
On Mon, Jan 18, 2021 at 10:24:08PM +0800, Christophe Leroy wrote:
>
>
> Le 05/01/2021 ? 11:58, kernel test robot a 閏rit :
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head: e71ba9452f0b5b2e8dc8aa5445198cd9214a6a62
> > commit: 8b8319b181fd9d6821703fef1228b4dcde613a16 powerpc/44x: Don't support 440 when CONFIG_PPC_47x is set
>
> I see no link with that commit. Looks like the problem has been existing for some time.
> It exists on the commit before that one, it exists on v5.9 and it exists on v5.10 with that commit
> reverted.
Yes, this seems to be a long-standing issue, and we just double checked
this compile error.
It happend when compiling arch/powerpc/platforms/44x/fsp2.c, macro
'mfdcr' requirs an instant number as parameter, while is not met by
show_plbopb_regs(). Changing show_plbopb_regs() from function to
a macro fixes the error, as the patch below:
Thanks,
Feng
From 3bcb9638afc873d0e803aea1aad4f77bf1c2f6f6 Mon Sep 17 00:00:00 2001
From: Feng Tang <feng.tang(a)intel.com>
Date: Fri, 5 Feb 2021 16:08:43 +0800
Subject: [PATCH] powerpc/44x/fsp2: fix a compiling error regarding macro
'mdfcr'
0day's kbuild test found error:
"
CC arch/powerpc/platforms/44x/fsp2.o
{standard input}:577: Error: unsupported relocation against base
{standard input}:580: Error: unsupported relocation against base
{standard input}:583: Error: unsupported relocation against base
"
The reason is macro 'mfdcr' requirs an instant number as parameter,
which is not met by show_plbopb_regs().
Fix it by converting show_plbopb_regs() from function to macro.
Reported-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: Feng Tang <feng.tang(a)intel.com>
---
arch/powerpc/platforms/44x/fsp2.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/arch/powerpc/platforms/44x/fsp2.c b/arch/powerpc/platforms/44x/fsp2.c
index b299e43..4732669 100644
--- a/arch/powerpc/platforms/44x/fsp2.c
+++ b/arch/powerpc/platforms/44x/fsp2.c
@@ -66,15 +66,15 @@ static void l2regs(void)
pr_err("LOG5: 0x%08x\n", mfl2(L2LOG5));
}
-static void show_plbopb_regs(u32 base, int num)
-{
- pr_err("\nPLBOPB Bridge %d:\n", num);
- pr_err("GESR0: 0x%08x\n", mfdcr(base + PLB4OPB_GESR0));
- pr_err("GESR1: 0x%08x\n", mfdcr(base + PLB4OPB_GESR1));
- pr_err("GESR2: 0x%08x\n", mfdcr(base + PLB4OPB_GESR2));
- pr_err("GEARU: 0x%08x\n", mfdcr(base + PLB4OPB_GEARU));
- pr_err("GEAR: 0x%08x\n", mfdcr(base + PLB4OPB_GEAR));
-}
+#define show_plbopb_regs(base, num) \
+ { \
+ pr_err("\nPLBOPB Bridge %d:\n", num); \
+ pr_err("GESR0: 0x%08x\n", mfdcr(base + PLB4OPB_GESR0)); \
+ pr_err("GESR1: 0x%08x\n", mfdcr(base + PLB4OPB_GESR1)); \
+ pr_err("GESR2: 0x%08x\n", mfdcr(base + PLB4OPB_GESR2)); \
+ pr_err("GEARU: 0x%08x\n", mfdcr(base + PLB4OPB_GEARU)); \
+ pr_err("GEAR: 0x%08x\n", mfdcr(base + PLB4OPB_GEAR)); \
+ }
static irqreturn_t bus_err_handler(int irq, void *data)
{
--
2.7.4
> > date: 5 weeks ago
> > config: powerpc-randconfig-p002-20210105 (attached as .config)
> > compiler: powerpc-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/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 8b8319b181fd9d6821703fef1228b4dcde613a16
> > # 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 errors (new ones prefixed by >>):
> >
> > {standard input}: Assembler messages:
> >>> {standard input}:577: Error: unsupported relocation against base
> > {standard input}:580: Error: unsupported relocation against base
> > {standard input}:583: Error: unsupported relocation against base
> > {standard input}:586: Error: unsupported relocation against base
> > {standard input}:589: Error: unsupported relocation against base
> > {standard input}:592: Error: unsupported relocation against base
> > {standard input}:595: Error: unsupported relocation against base
> > {standard input}:598: Error: unsupported relocation against base
> > {standard input}:601: Error: unsupported relocation against base
> > {standard input}:604: Error: unsupported relocation against base
> > {standard input}:607: Error: unsupported relocation against base
> > {standard input}:610: Error: unsupported relocation against base
> > {standard input}:613: Error: unsupported relocation against base
> > {standard input}:616: Error: unsupported relocation against base
> > {standard input}:619: Error: unsupported relocation against base
> > {standard input}:622: Error: unsupported relocation against base
> > {standard input}:625: Error: unsupported relocation against base
> > {standard input}:628: Error: unsupported relocation against base
> > {standard input}:631: Error: unsupported relocation against base
> > {standard input}:634: Error: unsupported relocation against base
> >
> > ---
> > 0-DAY CI Kernel Test Service, Intel Corporation
> > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
> >
>
1 year, 7 months
[linux-next:master 9088/11791] drivers/virt/acrn/hsm.c:389:3: error: implicit declaration of function 'remove_cpu'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: ff90dfd2579b2c7bc1f0baa0cb99c918c6c1ec64
commit: 279dcf693ac76c9d16b91ffc41280babaff26bb2 [9088/11791] virt: acrn: Introduce an interface for Service VM to control vCPU
config: x86_64-randconfig-r031-20210218 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# 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 279dcf693ac76c9d16b91ffc41280babaff26bb2
# save the attached .config to linux build tree
make 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 >>):
drivers/virt/acrn/hsm.c: In function 'remove_cpu_store':
>> drivers/virt/acrn/hsm.c:389:3: error: implicit declaration of function 'remove_cpu' [-Werror=implicit-function-declaration]
389 | remove_cpu(cpu);
| ^~~~~~~~~~
>> drivers/virt/acrn/hsm.c:402:2: error: implicit declaration of function 'add_cpu' [-Werror=implicit-function-declaration]
402 | add_cpu(cpu);
| ^~~~~~~
cc1: some warnings being treated as errors
vim +/remove_cpu +389 drivers/virt/acrn/hsm.c
374
375 static ssize_t remove_cpu_store(struct device *dev,
376 struct device_attribute *attr,
377 const char *buf, size_t count)
378 {
379 u64 cpu, lapicid;
380 int ret;
381
382 if (kstrtoull(buf, 0, &cpu) < 0)
383 return -EINVAL;
384
385 if (cpu >= num_possible_cpus() || cpu == 0 || !cpu_is_hotpluggable(cpu))
386 return -EINVAL;
387
388 if (cpu_online(cpu))
> 389 remove_cpu(cpu);
390
391 lapicid = cpu_data(cpu).apicid;
392 dev_dbg(dev, "Try to remove cpu %lld with lapicid %lld\n", cpu, lapicid);
393 ret = hcall_sos_remove_cpu(lapicid);
394 if (ret < 0) {
395 dev_err(dev, "Failed to remove cpu %lld!\n", cpu);
396 goto fail_remove;
397 }
398
399 return count;
400
401 fail_remove:
> 402 add_cpu(cpu);
403 return ret;
404 }
405 static DEVICE_ATTR_WO(remove_cpu);
406
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
arch/arm/kernel/sys_oabi-compat.c:257:6: error: implicit declaration of function 'ep_op_has_event'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f40ddce88593482919761f74910f42f4b84c004b
commit: c281634c865202e2776b0250678ff93c771947ff ARM: compat: remove KERNEL_DS usage in sys_oabi_epoll_ctl()
date: 10 months ago
config: arm-randconfig-m031-20210218 (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/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 c281634c865202e2776b0250678ff93c771947ff
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 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 errors (new ones prefixed by >>):
arch/arm/kernel/sys_oabi-compat.c:142:17: warning: no previous prototype for 'sys_oabi_stat64' [-Wmissing-prototypes]
142 | asmlinkage long sys_oabi_stat64(const char __user * filename,
| ^~~~~~~~~~~~~~~
arch/arm/kernel/sys_oabi-compat.c:152:17: warning: no previous prototype for 'sys_oabi_lstat64' [-Wmissing-prototypes]
152 | asmlinkage long sys_oabi_lstat64(const char __user * filename,
| ^~~~~~~~~~~~~~~~
arch/arm/kernel/sys_oabi-compat.c:162:17: warning: no previous prototype for 'sys_oabi_fstat64' [-Wmissing-prototypes]
162 | asmlinkage long sys_oabi_fstat64(unsigned long fd,
| ^~~~~~~~~~~~~~~~
arch/arm/kernel/sys_oabi-compat.c:172:17: warning: no previous prototype for 'sys_oabi_fstatat64' [-Wmissing-prototypes]
172 | asmlinkage long sys_oabi_fstatat64(int dfd,
| ^~~~~~~~~~~~~~~~~~
arch/arm/kernel/sys_oabi-compat.c:229:17: warning: no previous prototype for 'sys_oabi_fcntl64' [-Wmissing-prototypes]
229 | asmlinkage long sys_oabi_fcntl64(unsigned int fd, unsigned int cmd,
| ^~~~~~~~~~~~~~~~
arch/arm/kernel/sys_oabi-compat.c:251:17: warning: no previous prototype for 'sys_oabi_epoll_ctl' [-Wmissing-prototypes]
251 | asmlinkage long sys_oabi_epoll_ctl(int epfd, int op, int fd,
| ^~~~~~~~~~~~~~~~~~
In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/wait.h:7,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from include/uapi/linux/aio_abi.h:31,
from include/linux/syscalls.h:74,
from arch/arm/kernel/sys_oabi-compat.c:73:
arch/arm/kernel/sys_oabi-compat.c: In function 'sys_oabi_epoll_ctl':
>> arch/arm/kernel/sys_oabi-compat.c:257:6: error: implicit declaration of function 'ep_op_has_event' [-Werror=implicit-function-declaration]
257 | if (ep_op_has_event(op) &&
| ^~~~~~~~~~~~~~~
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~
arch/arm/kernel/sys_oabi-compat.c:257:2: note: in expansion of macro 'if'
257 | if (ep_op_has_event(op) &&
| ^~
>> arch/arm/kernel/sys_oabi-compat.c:264:9: error: implicit declaration of function 'do_epoll_ctl'; did you mean 'sys_epoll_ctl'? [-Werror=implicit-function-declaration]
264 | return do_epoll_ctl(epfd, op, fd, &kernel, false);
| ^~~~~~~~~~~~
| sys_epoll_ctl
arch/arm/kernel/sys_oabi-compat.c: At top level:
arch/arm/kernel/sys_oabi-compat.c:267:17: warning: no previous prototype for 'sys_oabi_epoll_wait' [-Wmissing-prototypes]
267 | asmlinkage long sys_oabi_epoll_wait(int epfd,
| ^~~~~~~~~~~~~~~~~~~
arch/arm/kernel/sys_oabi-compat.c:309:17: warning: no previous prototype for 'sys_oabi_semtimedop' [-Wmissing-prototypes]
309 | asmlinkage long sys_oabi_semtimedop(int semid,
| ^~~~~~~~~~~~~~~~~~~
arch/arm/kernel/sys_oabi-compat.c:352:17: warning: no previous prototype for 'sys_oabi_semop' [-Wmissing-prototypes]
352 | asmlinkage long sys_oabi_semop(int semid, struct oabi_sembuf __user *tsops,
| ^~~~~~~~~~~~~~
arch/arm/kernel/sys_oabi-compat.c:358:16: warning: no previous prototype for 'sys_oabi_ipc' [-Wmissing-prototypes]
358 | asmlinkage int sys_oabi_ipc(uint call, int first, int second, int third,
| ^~~~~~~~~~~~
arch/arm/kernel/sys_oabi-compat.c:376:17: warning: no previous prototype for 'sys_oabi_bind' [-Wmissing-prototypes]
376 | asmlinkage long sys_oabi_bind(int fd, struct sockaddr __user *addr, int addrlen)
| ^~~~~~~~~~~~~
arch/arm/kernel/sys_oabi-compat.c:386:17: warning: no previous prototype for 'sys_oabi_connect' [-Wmissing-prototypes]
386 | asmlinkage long sys_oabi_connect(int fd, struct sockaddr __user *addr, int addrlen)
| ^~~~~~~~~~~~~~~~
arch/arm/kernel/sys_oabi-compat.c:396:17: warning: no previous prototype for 'sys_oabi_sendto' [-Wmissing-prototypes]
396 | asmlinkage long sys_oabi_sendto(int fd, void __user *buff,
| ^~~~~~~~~~~~~~~
arch/arm/kernel/sys_oabi-compat.c:409:17: warning: no previous prototype for 'sys_oabi_sendmsg' [-Wmissing-prototypes]
409 | asmlinkage long sys_oabi_sendmsg(int fd, struct user_msghdr __user *msg, unsigned flags)
| ^~~~~~~~~~~~~~~~
arch/arm/kernel/sys_oabi-compat.c:435:17: warning: no previous prototype for 'sys_oabi_socketcall' [-Wmissing-prototypes]
435 | asmlinkage long sys_oabi_socketcall(int call, unsigned long __user *args)
| ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/ep_op_has_event +257 arch/arm/kernel/sys_oabi-compat.c
> 73 #include <linux/syscalls.h>
74 #include <linux/errno.h>
75 #include <linux/fs.h>
76 #include <linux/cred.h>
77 #include <linux/fcntl.h>
78 #include <linux/eventpoll.h>
79 #include <linux/sem.h>
80 #include <linux/socket.h>
81 #include <linux/net.h>
82 #include <linux/ipc.h>
83 #include <linux/uaccess.h>
84 #include <linux/slab.h>
85
86 struct oldabi_stat64 {
87 unsigned long long st_dev;
88 unsigned int __pad1;
89 unsigned long __st_ino;
90 unsigned int st_mode;
91 unsigned int st_nlink;
92
93 unsigned long st_uid;
94 unsigned long st_gid;
95
96 unsigned long long st_rdev;
97 unsigned int __pad2;
98
99 long long st_size;
100 unsigned long st_blksize;
101 unsigned long long st_blocks;
102
103 unsigned long st_atime;
104 unsigned long st_atime_nsec;
105
106 unsigned long st_mtime;
107 unsigned long st_mtime_nsec;
108
109 unsigned long st_ctime;
110 unsigned long st_ctime_nsec;
111
112 unsigned long long st_ino;
113 } __attribute__ ((packed,aligned(4)));
114
115 static long cp_oldabi_stat64(struct kstat *stat,
116 struct oldabi_stat64 __user *statbuf)
117 {
118 struct oldabi_stat64 tmp;
119
120 tmp.st_dev = huge_encode_dev(stat->dev);
121 tmp.__pad1 = 0;
122 tmp.__st_ino = stat->ino;
123 tmp.st_mode = stat->mode;
124 tmp.st_nlink = stat->nlink;
125 tmp.st_uid = from_kuid_munged(current_user_ns(), stat->uid);
126 tmp.st_gid = from_kgid_munged(current_user_ns(), stat->gid);
127 tmp.st_rdev = huge_encode_dev(stat->rdev);
128 tmp.st_size = stat->size;
129 tmp.st_blocks = stat->blocks;
130 tmp.__pad2 = 0;
131 tmp.st_blksize = stat->blksize;
132 tmp.st_atime = stat->atime.tv_sec;
133 tmp.st_atime_nsec = stat->atime.tv_nsec;
134 tmp.st_mtime = stat->mtime.tv_sec;
135 tmp.st_mtime_nsec = stat->mtime.tv_nsec;
136 tmp.st_ctime = stat->ctime.tv_sec;
137 tmp.st_ctime_nsec = stat->ctime.tv_nsec;
138 tmp.st_ino = stat->ino;
139 return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0;
140 }
141
142 asmlinkage long sys_oabi_stat64(const char __user * filename,
143 struct oldabi_stat64 __user * statbuf)
144 {
145 struct kstat stat;
146 int error = vfs_stat(filename, &stat);
147 if (!error)
148 error = cp_oldabi_stat64(&stat, statbuf);
149 return error;
150 }
151
152 asmlinkage long sys_oabi_lstat64(const char __user * filename,
153 struct oldabi_stat64 __user * statbuf)
154 {
155 struct kstat stat;
156 int error = vfs_lstat(filename, &stat);
157 if (!error)
158 error = cp_oldabi_stat64(&stat, statbuf);
159 return error;
160 }
161
162 asmlinkage long sys_oabi_fstat64(unsigned long fd,
163 struct oldabi_stat64 __user * statbuf)
164 {
165 struct kstat stat;
166 int error = vfs_fstat(fd, &stat);
167 if (!error)
168 error = cp_oldabi_stat64(&stat, statbuf);
169 return error;
170 }
171
172 asmlinkage long sys_oabi_fstatat64(int dfd,
173 const char __user *filename,
174 struct oldabi_stat64 __user *statbuf,
175 int flag)
176 {
177 struct kstat stat;
178 int error;
179
180 error = vfs_fstatat(dfd, filename, &stat, flag);
181 if (error)
182 return error;
183 return cp_oldabi_stat64(&stat, statbuf);
184 }
185
186 struct oabi_flock64 {
187 short l_type;
188 short l_whence;
189 loff_t l_start;
190 loff_t l_len;
191 pid_t l_pid;
192 } __attribute__ ((packed,aligned(4)));
193
194 static long do_locks(unsigned int fd, unsigned int cmd,
195 unsigned long arg)
196 {
197 struct flock64 kernel;
198 struct oabi_flock64 user;
199 mm_segment_t fs;
200 long ret;
201
202 if (copy_from_user(&user, (struct oabi_flock64 __user *)arg,
203 sizeof(user)))
204 return -EFAULT;
205 kernel.l_type = user.l_type;
206 kernel.l_whence = user.l_whence;
207 kernel.l_start = user.l_start;
208 kernel.l_len = user.l_len;
209 kernel.l_pid = user.l_pid;
210
211 fs = get_fs();
212 set_fs(KERNEL_DS);
213 ret = sys_fcntl64(fd, cmd, (unsigned long)&kernel);
214 set_fs(fs);
215
216 if (!ret && (cmd == F_GETLK64 || cmd == F_OFD_GETLK)) {
217 user.l_type = kernel.l_type;
218 user.l_whence = kernel.l_whence;
219 user.l_start = kernel.l_start;
220 user.l_len = kernel.l_len;
221 user.l_pid = kernel.l_pid;
222 if (copy_to_user((struct oabi_flock64 __user *)arg,
223 &user, sizeof(user)))
224 ret = -EFAULT;
225 }
226 return ret;
227 }
228
229 asmlinkage long sys_oabi_fcntl64(unsigned int fd, unsigned int cmd,
230 unsigned long arg)
231 {
232 switch (cmd) {
233 case F_OFD_GETLK:
234 case F_OFD_SETLK:
235 case F_OFD_SETLKW:
236 case F_GETLK64:
237 case F_SETLK64:
238 case F_SETLKW64:
239 return do_locks(fd, cmd, arg);
240
241 default:
242 return sys_fcntl64(fd, cmd, arg);
243 }
244 }
245
246 struct oabi_epoll_event {
247 __u32 events;
248 __u64 data;
249 } __attribute__ ((packed,aligned(4)));
250
251 asmlinkage long sys_oabi_epoll_ctl(int epfd, int op, int fd,
252 struct oabi_epoll_event __user *event)
253 {
254 struct oabi_epoll_event user;
255 struct epoll_event kernel;
256
> 257 if (ep_op_has_event(op) &&
258 copy_from_user(&user, event, sizeof(user)))
259 return -EFAULT;
260
261 kernel.events = user.events;
262 kernel.data = user.data;
263
> 264 return do_epoll_ctl(epfd, op, fd, &kernel, false);
265 }
266
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
Re: [net-next PATCH v6 07/15] net: mdiobus: Introduce fwnode_mdiobus_register_phy()
by kernel test robot
Hi Calvin,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on net-next/master]
url: https://github.com/0day-ci/linux/commits/Calvin-Johnson/ACPI-support-for-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 06b334f08b4f0e53be64160392be4c37db28a413
config: i386-randconfig-a013-20210217 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/5de2672fd295f915600e7391cea819d3d...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Calvin-Johnson/ACPI-support-for-dpaa2-driver/20210218-133805
git checkout 5de2672fd295f915600e7391cea819d3dbe7b642
# save the attached .config to linux build tree
make W=1 ARCH=i386
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 >>):
ld: drivers/net/phy/mdio_bus.o: in function `fwnode_mdiobus_register_phy':
>> drivers/net/phy/mdio_bus.c:132: undefined reference to `phy_device_create'
vim +132 drivers/net/phy/mdio_bus.c
109
110 int fwnode_mdiobus_register_phy(struct mii_bus *bus,
111 struct fwnode_handle *child, u32 addr)
112 {
113 struct mii_timestamper *mii_ts = NULL;
114 struct phy_device *phy;
115 bool is_c45 = false;
116 u32 phy_id;
117 int rc;
118
119 if (is_of_node(child)) {
120 mii_ts = of_find_mii_timestamper(to_of_node(child));
121 if (IS_ERR(mii_ts))
122 return PTR_ERR(mii_ts);
123 }
124
125 rc = fwnode_property_match_string(child, "compatible", "ethernet-phy-ieee802.3-c45");
126 if (rc >= 0)
127 is_c45 = true;
128
129 if (is_c45 || fwnode_get_phy_id(child, &phy_id))
130 phy = get_phy_device(bus, addr, is_c45);
131 else
> 132 phy = phy_device_create(bus, addr, phy_id, 0, NULL);
133 if (IS_ERR(phy)) {
134 if (mii_ts)
135 unregister_mii_timestamper(mii_ts);
136 return PTR_ERR(phy);
137 }
138
139 if (is_acpi_node(child)) {
140 phy->irq = bus->irq[addr];
141
142 /* Associate the fwnode with the device structure so it
143 * can be looked up later.
144 */
145 phy->mdio.dev.fwnode = child;
146
147 /* All data is now stored in the phy struct, so register it */
148 rc = phy_device_register(phy);
149 if (rc) {
150 phy_device_free(phy);
151 fwnode_handle_put(phy->mdio.dev.fwnode);
152 return rc;
153 }
154 } else if (is_of_node(child)) {
155 rc = of_mdiobus_phy_device_register(bus, phy, to_of_node(child), addr);
156 if (rc) {
157 if (mii_ts)
158 unregister_mii_timestamper(mii_ts);
159 phy_device_free(phy);
160 return rc;
161 }
162 }
163
164 /* phy->mii_ts may already be defined by the PHY driver. A
165 * mii_timestamper probed via the device tree will still have
166 * precedence.
167 */
168 if (mii_ts)
169 phy->mii_ts = mii_ts;
170 return 0;
171 }
172 EXPORT_SYMBOL(fwnode_mdiobus_register_phy);
173
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
Re: [PATCH V3 XRT Alveo 18/18] fpga: xrt: Kconfig and Makefile updates for XRT drivers
by kernel test robot
Hi Lizhi,
I love your patch! Yet something to improve:
[auto build test ERROR on linux/master]
[also build test ERROR on linus/master v5.11 next-20210217]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Lizhi-Hou/XRT-Alveo-driver-overv...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 2ab38c17aac10bf55ab3efde4c4db3893d8691d2
config: parisc-randconfig-r025-20210218 (attached as .config)
compiler: hppa64-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/0day-ci/linux/commit/9069f42b5fcafe471ceb1047ee5398309...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Lizhi-Hou/XRT-Alveo-driver-overview/20210218-151631
git checkout 9069f42b5fcafe471ceb1047ee53983098b2edba
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross 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 >>):
drivers/fpga/xrt/lib/main.c: In function 'xleaf_register_driver':
>> drivers/fpga/xrt/lib/main.c:144:8: error: implicit declaration of function 'vzalloc'; did you mean 'kvzalloc'? [-Werror=implicit-function-declaration]
144 | map = vzalloc(sizeof(*map));
| ^~~~~~~
| kvzalloc
>> drivers/fpga/xrt/lib/main.c:144:6: warning: assignment to 'struct xrt_drv_map *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
144 | map = vzalloc(sizeof(*map));
| ^
drivers/fpga/xrt/lib/main.c: In function 'xleaf_unregister_driver':
>> drivers/fpga/xrt/lib/main.c:181:2: error: implicit declaration of function 'vfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration]
181 | vfree(map);
| ^~~~~
| kvfree
cc1: some warnings being treated as errors
vim +144 drivers/fpga/xrt/lib/main.c
898da78383bc51 Lizhi Hou 2021-02-17 127
898da78383bc51 Lizhi Hou 2021-02-17 128 int xleaf_register_driver(enum xrt_subdev_id id,
898da78383bc51 Lizhi Hou 2021-02-17 129 struct platform_driver *drv,
898da78383bc51 Lizhi Hou 2021-02-17 130 struct xrt_subdev_endpoints *eps)
898da78383bc51 Lizhi Hou 2021-02-17 131 {
898da78383bc51 Lizhi Hou 2021-02-17 132 struct xrt_drv_map *map;
898da78383bc51 Lizhi Hou 2021-02-17 133
898da78383bc51 Lizhi Hou 2021-02-17 134 mutex_lock(&xrt_lib_lock);
898da78383bc51 Lizhi Hou 2021-02-17 135
898da78383bc51 Lizhi Hou 2021-02-17 136 map = xrt_drv_find_map_by_id_nolock(id);
898da78383bc51 Lizhi Hou 2021-02-17 137 if (map) {
898da78383bc51 Lizhi Hou 2021-02-17 138 mutex_unlock(&xrt_lib_lock);
898da78383bc51 Lizhi Hou 2021-02-17 139 pr_err("Id %d already has a registered driver, 0x%p\n",
898da78383bc51 Lizhi Hou 2021-02-17 140 id, map->drv);
898da78383bc51 Lizhi Hou 2021-02-17 141 return -EEXIST;
898da78383bc51 Lizhi Hou 2021-02-17 142 }
898da78383bc51 Lizhi Hou 2021-02-17 143
898da78383bc51 Lizhi Hou 2021-02-17 @144 map = vzalloc(sizeof(*map));
898da78383bc51 Lizhi Hou 2021-02-17 145 if (!map) {
898da78383bc51 Lizhi Hou 2021-02-17 146 mutex_unlock(&xrt_lib_lock);
898da78383bc51 Lizhi Hou 2021-02-17 147 return -ENOMEM;
898da78383bc51 Lizhi Hou 2021-02-17 148 }
898da78383bc51 Lizhi Hou 2021-02-17 149 map->id = id;
898da78383bc51 Lizhi Hou 2021-02-17 150 map->drv = drv;
898da78383bc51 Lizhi Hou 2021-02-17 151 map->eps = eps;
898da78383bc51 Lizhi Hou 2021-02-17 152
898da78383bc51 Lizhi Hou 2021-02-17 153 xrt_drv_register_driver(map);
898da78383bc51 Lizhi Hou 2021-02-17 154
898da78383bc51 Lizhi Hou 2021-02-17 155 list_add(&map->list, &xrt_drv_maps);
898da78383bc51 Lizhi Hou 2021-02-17 156
898da78383bc51 Lizhi Hou 2021-02-17 157 mutex_unlock(&xrt_lib_lock);
898da78383bc51 Lizhi Hou 2021-02-17 158
898da78383bc51 Lizhi Hou 2021-02-17 159 return 0;
898da78383bc51 Lizhi Hou 2021-02-17 160 }
898da78383bc51 Lizhi Hou 2021-02-17 161 EXPORT_SYMBOL_GPL(xleaf_register_driver);
898da78383bc51 Lizhi Hou 2021-02-17 162
898da78383bc51 Lizhi Hou 2021-02-17 163 void xleaf_unregister_driver(enum xrt_subdev_id id)
898da78383bc51 Lizhi Hou 2021-02-17 164 {
898da78383bc51 Lizhi Hou 2021-02-17 165 struct xrt_drv_map *map;
898da78383bc51 Lizhi Hou 2021-02-17 166
898da78383bc51 Lizhi Hou 2021-02-17 167 mutex_lock(&xrt_lib_lock);
898da78383bc51 Lizhi Hou 2021-02-17 168
898da78383bc51 Lizhi Hou 2021-02-17 169 map = xrt_drv_find_map_by_id_nolock(id);
898da78383bc51 Lizhi Hou 2021-02-17 170 if (!map) {
898da78383bc51 Lizhi Hou 2021-02-17 171 mutex_unlock(&xrt_lib_lock);
898da78383bc51 Lizhi Hou 2021-02-17 172 pr_err("Id %d has no registered driver\n", id);
898da78383bc51 Lizhi Hou 2021-02-17 173 return;
898da78383bc51 Lizhi Hou 2021-02-17 174 }
898da78383bc51 Lizhi Hou 2021-02-17 175
898da78383bc51 Lizhi Hou 2021-02-17 176 list_del(&map->list);
898da78383bc51 Lizhi Hou 2021-02-17 177
898da78383bc51 Lizhi Hou 2021-02-17 178 mutex_unlock(&xrt_lib_lock);
898da78383bc51 Lizhi Hou 2021-02-17 179
898da78383bc51 Lizhi Hou 2021-02-17 180 xrt_drv_unregister_driver(map);
898da78383bc51 Lizhi Hou 2021-02-17 @181 vfree(map);
898da78383bc51 Lizhi Hou 2021-02-17 182 }
898da78383bc51 Lizhi Hou 2021-02-17 183 EXPORT_SYMBOL_GPL(xleaf_unregister_driver);
898da78383bc51 Lizhi Hou 2021-02-17 184
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
[driver-core:debugfs_remove_return_value 2/8] drivers/net/wireless/broadcom/b43/debugfs.c:661:28: error: void value not ignored as it ought to be
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git debugfs_remove_return_value
head: 5187c2360ee1d023078e4302dad32fda1e895772
commit: 72f2bf74b31aae983fb200aa7e84a05943bf27fc [2/8] debugfs: remove return value of debugfs_create_bool()
config: x86_64-randconfig-c002-20210216 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git/co...
git remote add driver-core https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
git fetch --no-tags driver-core debugfs_remove_return_value
git checkout 72f2bf74b31aae983fb200aa7e84a05943bf27fc
# save the attached .config to linux build tree
make 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 >>):
drivers/net/wireless/broadcom/b43/debugfs.c: In function 'b43_add_dynamic_debug':
>> drivers/net/wireless/broadcom/b43/debugfs.c:661:28: error: void value not ignored as it ought to be
661 | e->dyn_debug_dentries[id] = \
| ^
drivers/net/wireless/broadcom/b43/debugfs.c:666:2: note: in expansion of macro 'add_dyn_dbg'
666 | add_dyn_dbg("debug_xmitpower", B43_DBG_XMITPOWER, false);
| ^~~~~~~~~~~
>> drivers/net/wireless/broadcom/b43/debugfs.c:661:28: error: void value not ignored as it ought to be
661 | e->dyn_debug_dentries[id] = \
| ^
drivers/net/wireless/broadcom/b43/debugfs.c:667:2: note: in expansion of macro 'add_dyn_dbg'
667 | add_dyn_dbg("debug_dmaoverflow", B43_DBG_DMAOVERFLOW, false);
| ^~~~~~~~~~~
>> drivers/net/wireless/broadcom/b43/debugfs.c:661:28: error: void value not ignored as it ought to be
661 | e->dyn_debug_dentries[id] = \
| ^
drivers/net/wireless/broadcom/b43/debugfs.c:668:2: note: in expansion of macro 'add_dyn_dbg'
668 | add_dyn_dbg("debug_dmaverbose", B43_DBG_DMAVERBOSE, false);
| ^~~~~~~~~~~
>> drivers/net/wireless/broadcom/b43/debugfs.c:661:28: error: void value not ignored as it ought to be
661 | e->dyn_debug_dentries[id] = \
| ^
drivers/net/wireless/broadcom/b43/debugfs.c:669:2: note: in expansion of macro 'add_dyn_dbg'
669 | add_dyn_dbg("debug_pwork_fast", B43_DBG_PWORK_FAST, false);
| ^~~~~~~~~~~
>> drivers/net/wireless/broadcom/b43/debugfs.c:661:28: error: void value not ignored as it ought to be
661 | e->dyn_debug_dentries[id] = \
| ^
drivers/net/wireless/broadcom/b43/debugfs.c:670:2: note: in expansion of macro 'add_dyn_dbg'
670 | add_dyn_dbg("debug_pwork_stop", B43_DBG_PWORK_STOP, false);
| ^~~~~~~~~~~
>> drivers/net/wireless/broadcom/b43/debugfs.c:661:28: error: void value not ignored as it ought to be
661 | e->dyn_debug_dentries[id] = \
| ^
drivers/net/wireless/broadcom/b43/debugfs.c:671:2: note: in expansion of macro 'add_dyn_dbg'
671 | add_dyn_dbg("debug_lo", B43_DBG_LO, false);
| ^~~~~~~~~~~
>> drivers/net/wireless/broadcom/b43/debugfs.c:661:28: error: void value not ignored as it ought to be
661 | e->dyn_debug_dentries[id] = \
| ^
drivers/net/wireless/broadcom/b43/debugfs.c:672:2: note: in expansion of macro 'add_dyn_dbg'
672 | add_dyn_dbg("debug_firmware", B43_DBG_FIRMWARE, false);
| ^~~~~~~~~~~
>> drivers/net/wireless/broadcom/b43/debugfs.c:661:28: error: void value not ignored as it ought to be
661 | e->dyn_debug_dentries[id] = \
| ^
drivers/net/wireless/broadcom/b43/debugfs.c:673:2: note: in expansion of macro 'add_dyn_dbg'
673 | add_dyn_dbg("debug_keys", B43_DBG_KEYS, false);
| ^~~~~~~~~~~
>> drivers/net/wireless/broadcom/b43/debugfs.c:661:28: error: void value not ignored as it ought to be
661 | e->dyn_debug_dentries[id] = \
| ^
drivers/net/wireless/broadcom/b43/debugfs.c:674:2: note: in expansion of macro 'add_dyn_dbg'
674 | add_dyn_dbg("debug_verbose_stats", B43_DBG_VERBOSESTATS, false);
| ^~~~~~~~~~~
vim +661 drivers/net/wireless/broadcom/b43/debugfs.c
e4d6b7951812d9 drivers/net/wireless/b43/debugfs.c Michael Buesch 2007-09-18 654
e4d6b7951812d9 drivers/net/wireless/b43/debugfs.c Michael Buesch 2007-09-18 655 static void b43_add_dynamic_debug(struct b43_wldev *dev)
e4d6b7951812d9 drivers/net/wireless/b43/debugfs.c Michael Buesch 2007-09-18 656 {
e4d6b7951812d9 drivers/net/wireless/b43/debugfs.c Michael Buesch 2007-09-18 657 struct b43_dfsentry *e = dev->dfsentry;
e4d6b7951812d9 drivers/net/wireless/b43/debugfs.c Michael Buesch 2007-09-18 658
e4d6b7951812d9 drivers/net/wireless/b43/debugfs.c Michael Buesch 2007-09-18 659 #define add_dyn_dbg(name, id, initstate) do { \
e4d6b7951812d9 drivers/net/wireless/b43/debugfs.c Michael Buesch 2007-09-18 660 e->dyn_debug[id] = (initstate); \
e9bdcdc7cdf028 drivers/net/wireless/broadcom/b43/debugfs.c Greg Kroah-Hartman 2019-01-22 @661 e->dyn_debug_dentries[id] = \
e9bdcdc7cdf028 drivers/net/wireless/broadcom/b43/debugfs.c Greg Kroah-Hartman 2019-01-22 662 debugfs_create_bool(name, 0600, e->subdir, \
e4d6b7951812d9 drivers/net/wireless/b43/debugfs.c Michael Buesch 2007-09-18 663 &(e->dyn_debug[id])); \
e4d6b7951812d9 drivers/net/wireless/b43/debugfs.c Michael Buesch 2007-09-18 664 } while (0)
e4d6b7951812d9 drivers/net/wireless/b43/debugfs.c Michael Buesch 2007-09-18 665
621a5f7ad9cd1c drivers/net/wireless/b43/debugfs.c Viresh Kumar 2015-09-26 666 add_dyn_dbg("debug_xmitpower", B43_DBG_XMITPOWER, false);
621a5f7ad9cd1c drivers/net/wireless/b43/debugfs.c Viresh Kumar 2015-09-26 667 add_dyn_dbg("debug_dmaoverflow", B43_DBG_DMAOVERFLOW, false);
621a5f7ad9cd1c drivers/net/wireless/b43/debugfs.c Viresh Kumar 2015-09-26 668 add_dyn_dbg("debug_dmaverbose", B43_DBG_DMAVERBOSE, false);
621a5f7ad9cd1c drivers/net/wireless/b43/debugfs.c Viresh Kumar 2015-09-26 669 add_dyn_dbg("debug_pwork_fast", B43_DBG_PWORK_FAST, false);
621a5f7ad9cd1c drivers/net/wireless/b43/debugfs.c Viresh Kumar 2015-09-26 670 add_dyn_dbg("debug_pwork_stop", B43_DBG_PWORK_STOP, false);
621a5f7ad9cd1c drivers/net/wireless/b43/debugfs.c Viresh Kumar 2015-09-26 671 add_dyn_dbg("debug_lo", B43_DBG_LO, false);
621a5f7ad9cd1c drivers/net/wireless/b43/debugfs.c Viresh Kumar 2015-09-26 672 add_dyn_dbg("debug_firmware", B43_DBG_FIRMWARE, false);
621a5f7ad9cd1c drivers/net/wireless/b43/debugfs.c Viresh Kumar 2015-09-26 673 add_dyn_dbg("debug_keys", B43_DBG_KEYS, false);
621a5f7ad9cd1c drivers/net/wireless/b43/debugfs.c Viresh Kumar 2015-09-26 674 add_dyn_dbg("debug_verbose_stats", B43_DBG_VERBOSESTATS, false);
e4d6b7951812d9 drivers/net/wireless/b43/debugfs.c Michael Buesch 2007-09-18 675
:::::: The code at line 661 was first introduced by commit
:::::: e9bdcdc7cdf02819ea3f4205c7286ab97a9e1a1b b43: no need to check return value of debugfs_create functions
:::::: TO: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
:::::: CC: Kalle Valo <kvalo(a)codeaurora.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
[ti:ti-linux-5.4.y 9094/13391] drivers/mtd/spi-nor/spi-nor.c:5721:18: error: implicit declaration of function 'of_read_number'
by kernel test robot
Hi Pratyush,
FYI, the error/warning still remains.
tree: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-linux-5.4.y
head: 26692c45bd67ced28dc36459ce28adea53187341
commit: 6f9db649f76819bbe6b9ee1a7758717d0f2e01ee [9094/13391] HACK: mtd: spi-nor: Look for PHY pattern partition
config: x86_64-randconfig-a005-20210215 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
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
git remote add ti git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git
git fetch --no-tags ti ti-linux-5.4.y
git checkout 6f9db649f76819bbe6b9ee1a7758717d0f2e01ee
# 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 errors (new ones prefixed by >>):
>> drivers/mtd/spi-nor/spi-nor.c:5721:18: error: implicit declaration of function 'of_read_number' [-Werror,-Wimplicit-function-declaration]
op.addr.val = of_read_number(reg, a_cells);
^
1 error generated.
vim +/of_read_number +5721 drivers/mtd/spi-nor/spi-nor.c
5556
5557 int spi_nor_scan(struct spi_nor *nor, const char *name,
5558 const struct spi_nor_hwcaps *hwcaps)
5559 {
5560 const struct flash_info *info;
5561 struct device *dev = nor->dev;
5562 struct mtd_info *mtd = &nor->mtd;
5563 struct device_node *np = spi_nor_get_flash_node(nor);
5564 struct device_node *child;
5565 struct spi_nor_flash_parameter *params = &nor->params;
5566 struct spi_mem_op op;
5567 int ret;
5568 int i;
5569
5570 ret = spi_nor_check(nor);
5571 if (ret)
5572 return ret;
5573
5574 /* Reset SPI protocol for all commands. */
5575 nor->reg_proto = SNOR_PROTO_1_1_1;
5576 nor->read_proto = SNOR_PROTO_1_1_1;
5577 nor->write_proto = SNOR_PROTO_1_1_1;
5578
5579 /*
5580 * We need the bounce buffer early to read/write registers when going
5581 * through the spi-mem layer (buffers have to be DMA-able).
5582 * For spi-mem drivers, we'll reallocate a new buffer if
5583 * nor->page_size turns out to be greater than PAGE_SIZE (which
5584 * shouldn't happen before long since NOR pages are usually less
5585 * than 1KB) after spi_nor_scan() returns.
5586 */
5587 nor->bouncebuf_size = PAGE_SIZE;
5588 nor->bouncebuf = devm_kmalloc(dev, nor->bouncebuf_size,
5589 GFP_KERNEL);
5590 if (!nor->bouncebuf)
5591 return -ENOMEM;
5592
5593 info = spi_nor_get_flash_info(nor, name);
5594 if (IS_ERR(info))
5595 return PTR_ERR(info);
5596
5597 nor->info = info;
5598
5599 spi_nor_debugfs_init(nor, info);
5600
5601 mutex_init(&nor->lock);
5602
5603 /*
5604 * Make sure the XSR_RDY flag is set before calling
5605 * spi_nor_wait_till_ready(). Xilinx S3AN share MFR
5606 * with Atmel spi-nor
5607 */
5608 if (info->flags & SPI_NOR_XSR_RDY)
5609 nor->flags |= SNOR_F_READY_XSR_RDY;
5610
5611 if (info->flags & SPI_NOR_HAS_LOCK)
5612 nor->flags |= SNOR_F_HAS_LOCK;
5613
5614 /*
5615 * Atmel, SST, Intel/Numonyx, and others serial NOR tend to power up
5616 * with the software protection bits set.
5617 */
5618 if (JEDEC_MFR(nor->info) == SNOR_MFR_ATMEL ||
5619 JEDEC_MFR(nor->info) == SNOR_MFR_INTEL ||
5620 JEDEC_MFR(nor->info) == SNOR_MFR_SST ||
5621 nor->info->flags & SPI_NOR_HAS_LOCK)
5622 nor->clear_sr_bp = spi_nor_clear_sr_bp;
5623
5624 /* Init flash parameters based on flash_info struct and SFDP */
5625 spi_nor_init_params(nor);
5626
5627 if (!mtd->name)
5628 mtd->name = dev_name(dev);
5629 mtd->priv = nor;
5630 mtd->type = MTD_NORFLASH;
5631 mtd->writesize = 1;
5632 mtd->flags = MTD_CAP_NORFLASH;
5633 mtd->size = params->size;
5634 mtd->_erase = spi_nor_erase;
5635 mtd->_read = spi_nor_read;
5636 mtd->_suspend = spi_nor_suspend;
5637 mtd->_resume = spi_nor_resume;
5638
5639 if (nor->params.locking_ops) {
5640 mtd->_lock = spi_nor_lock;
5641 mtd->_unlock = spi_nor_unlock;
5642 mtd->_is_locked = spi_nor_is_locked;
5643 }
5644
5645 /* sst nor chips use AAI word program */
5646 if (info->flags & SST_WRITE)
5647 mtd->_write = sst_write;
5648 else
5649 mtd->_write = spi_nor_write;
5650
5651 if (info->flags & USE_FSR)
5652 nor->flags |= SNOR_F_USE_FSR;
5653 if (info->flags & SPI_NOR_HAS_TB)
5654 nor->flags |= SNOR_F_HAS_SR_TB;
5655 if (info->flags & NO_CHIP_ERASE)
5656 nor->flags |= SNOR_F_NO_OP_CHIP_ERASE;
5657 if (info->flags & USE_CLSR)
5658 nor->flags |= SNOR_F_USE_CLSR;
5659
5660 if (info->flags & SPI_NOR_NO_ERASE)
5661 mtd->flags |= MTD_NO_ERASE;
5662
5663 mtd->dev.parent = dev;
5664 nor->page_size = params->page_size;
5665 mtd->writebufsize = nor->page_size;
5666
5667 if (of_property_read_bool(np, "broken-flash-reset"))
5668 nor->flags |= SNOR_F_BROKEN_RESET;
5669
5670 /*
5671 * Configure the SPI memory:
5672 * - select op codes for (Fast) Read, Page Program and Sector Erase.
5673 * - set the number of dummy cycles (mode cycles + wait states).
5674 * - set the SPI protocols for register and memory accesses.
5675 */
5676 ret = spi_nor_setup(nor, hwcaps);
5677 if (ret)
5678 return ret;
5679
5680 if (info->flags & SPI_NOR_4B_OPCODES)
5681 nor->flags |= SNOR_F_4B_OPCODES;
5682
5683 ret = spi_nor_set_addr_width(nor);
5684 if (ret)
5685 return ret;
5686
5687 /* Send all the required SPI flash commands to initialize device */
5688 ret = spi_nor_init(nor);
5689 if (ret)
5690 return ret;
5691
5692 /*
5693 * Find out if a PHY pattern partition is present.
5694 *
5695 * TODO: Teach the mtd core to find the partition for us so we don't
5696 * have to repeat the parsing logic here that mtd already has.
5697 */
5698 child = NULL;
5699 do {
5700 int len;
5701 char *label = NULL;
5702
5703 child = of_get_next_child(np, child);
5704 if (child)
5705 label = (char *)of_get_property(child, "label", &len);
5706
5707 if (label && !strcmp(label, "ospi.phypattern")) {
5708 const __be32 *reg;
5709 int a_cells, s_cells;
5710
5711 reg = of_get_property(child, "reg", &len);
5712 if (!reg)
5713 continue;
5714
5715 a_cells = of_n_addr_cells(child);
5716 s_cells = of_n_size_cells(child);
5717 if (len / 4 != a_cells + s_cells)
5718 continue;
5719
5720 op = spi_nor_spimem_read_op(nor);
> 5721 op.addr.val = of_read_number(reg, a_cells);
5722 spi_mem_set_calibration_read_op(nor->spimem, &op);
5723 break;
5724 }
5725 } while (child);
5726
5727 dev_info(dev, "%s (%lld Kbytes)\n", info->name,
5728 (long long)mtd->size >> 10);
5729
5730 dev_dbg(dev,
5731 "mtd .name = %s, .size = 0x%llx (%lldMiB), "
5732 ".erasesize = 0x%.8x (%uKiB) .numeraseregions = %d\n",
5733 mtd->name, (long long)mtd->size, (long long)(mtd->size >> 20),
5734 mtd->erasesize, mtd->erasesize / 1024, mtd->numeraseregions);
5735
5736 if (mtd->numeraseregions)
5737 for (i = 0; i < mtd->numeraseregions; i++)
5738 dev_dbg(dev,
5739 "mtd.eraseregions[%d] = { .offset = 0x%llx, "
5740 ".erasesize = 0x%.8x (%uKiB), "
5741 ".numblocks = %d }\n",
5742 i, (long long)mtd->eraseregions[i].offset,
5743 mtd->eraseregions[i].erasesize,
5744 mtd->eraseregions[i].erasesize / 1024,
5745 mtd->eraseregions[i].numblocks);
5746 return 0;
5747 }
5748 EXPORT_SYMBOL_GPL(spi_nor_scan);
5749
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
[ti:ti-linux-5.4.y 8676/13391] net/core/sock.c:3092:28: error: 'SCM_REDUNDANT' undeclared
by kernel test robot
Hi WingMan,
FYI, the error/warning still remains.
tree: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-linux-5.4.y
head: 26692c45bd67ced28dc36459ce28adea53187341
commit: 37ab3ad1acdc652a6694e6f45e67767a8a80592b [8676/13391] net: socket: pass on redundant net info to sock_recv_errqueue
config: alpha-randconfig-r011-20210218 (attached as .config)
compiler: alpha-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
git remote add ti git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git
git fetch --no-tags ti ti-linux-5.4.y
git checkout 37ab3ad1acdc652a6694e6f45e67767a8a80592b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=alpha
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 include/net/inet_sock.h:22,
from include/net/ip.h:27,
from include/linux/errqueue.h:6,
from net/core/sock.c:91:
include/net/sock.h: In function 'sock_recv_redundant_info':
include/net/sock.h:2457:29: error: 'SCM_REDUNDANT' undeclared (first use in this function)
2457 | put_cmsg(msg, SOL_SOCKET, SCM_REDUNDANT, sizeof(*sred), sred);
| ^~~~~~~~~~~~~
include/net/sock.h:2457:29: note: each undeclared identifier is reported only once for each function it appears in
net/core/sock.c: In function 'sock_recv_errqueue':
>> net/core/sock.c:3092:28: error: 'SCM_REDUNDANT' undeclared (first use in this function)
3092 | put_cmsg(msg, SOL_SOCKET, SCM_REDUNDANT, sizeof(*sred), sred);
| ^~~~~~~~~~~~~
vim +/SCM_REDUNDANT +3092 net/core/sock.c
3066
3067 int sock_recv_errqueue(struct sock *sk, struct msghdr *msg, int len,
3068 int level, int type)
3069 {
3070 struct sock_exterr_skb *serr;
3071 struct sk_buff *skb;
3072 int copied, err;
3073 struct skb_redundant_info *sred;
3074
3075 err = -EAGAIN;
3076 skb = sock_dequeue_err_skb(sk);
3077 if (skb == NULL)
3078 goto out;
3079
3080 copied = skb->len;
3081 if (copied > len) {
3082 msg->msg_flags |= MSG_TRUNC;
3083 copied = len;
3084 }
3085 err = skb_copy_datagram_msg(skb, 0, msg, copied);
3086 if (err)
3087 goto out_free_skb;
3088
3089 sock_recv_timestamp(msg, sk, skb);
3090
3091 sred = skb_redinfo(skb);
> 3092 put_cmsg(msg, SOL_SOCKET, SCM_REDUNDANT, sizeof(*sred), sred);
3093
3094 serr = SKB_EXT_ERR(skb);
3095 put_cmsg(msg, level, type, sizeof(serr->ee), &serr->ee);
3096
3097 msg->msg_flags |= MSG_ERRQUEUE;
3098 err = copied;
3099
3100 out_free_skb:
3101 kfree_skb(skb);
3102 out:
3103 return err;
3104 }
3105 EXPORT_SYMBOL(sock_recv_errqueue);
3106
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months