From: kernel test robot <lkp@intel.com>
To: Alexey Gladkov <legion@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [legion:patchset/cons-font-info/v1.0 1/5] drivers/tty/vt/vt_ioctl.c:483:3: error: a label can only be part of a statement and a declaration is not a statement
Date: Mon, 4 Mar 2024 07:29:19 +0800 [thread overview]
Message-ID: <202403040754.RKosvxAE-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/legion/linux.git patchset/cons-font-info/v1.0
head: 06733914c1d2d19ebb61cdf6cd96d0a45d4da6ba
commit: 784438040507c68171fd2c47597f8ab85c8e6ab8 [1/5] VT: Add KDFONTINFO ioctl
config: x86_64-randconfig-121-20240303 (https://download.01.org/0day-ci/archive/20240304/202403040754.RKosvxAE-lkp@intel.com/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240304/202403040754.RKosvxAE-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202403040754.RKosvxAE-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/tty/vt/vt_ioctl.c: In function 'vt_k_ioctl':
>> drivers/tty/vt/vt_ioctl.c:483:3: error: a label can only be part of a statement and a declaration is not a statement
struct console_font_info fnt_info;
^~~~~~
vim +483 drivers/tty/vt/vt_ioctl.c
355
356 /* Linux m68k/i386 interface for setting the keyboard delay/repeat rate */
357
358 case KDKBDREP:
359 {
360 struct kbd_repeat kbrep;
361
362 if (!capable(CAP_SYS_TTY_CONFIG))
363 return -EPERM;
364
365 if (copy_from_user(&kbrep, up, sizeof(struct kbd_repeat)))
366 return -EFAULT;
367
368 ret = kbd_rate(&kbrep);
369 if (ret)
370 return ret;
371 if (copy_to_user(up, &kbrep, sizeof(struct kbd_repeat)))
372 return -EFAULT;
373 break;
374 }
375
376 case KDSETMODE:
377 if (!perm)
378 return -EPERM;
379
380 console_lock();
381 ret = vt_kdsetmode(vc, arg);
382 console_unlock();
383 return ret;
384
385 case KDGETMODE:
386 return put_user(vc->vc_mode, (int __user *)arg);
387
388 case KDMAPDISP:
389 case KDUNMAPDISP:
390 /*
391 * these work like a combination of mmap and KDENABIO.
392 * this could be easily finished.
393 */
394 return -EINVAL;
395
396 case KDSKBMODE:
397 if (!perm)
398 return -EPERM;
399 ret = vt_do_kdskbmode(console, arg);
400 if (ret)
401 return ret;
402 tty_ldisc_flush(tty);
403 break;
404
405 case KDGKBMODE:
406 return put_user(vt_do_kdgkbmode(console), (int __user *)arg);
407
408 /* this could be folded into KDSKBMODE, but for compatibility
409 reasons it is not so easy to fold KDGKBMETA into KDGKBMODE */
410 case KDSKBMETA:
411 return vt_do_kdskbmeta(console, arg);
412
413 case KDGKBMETA:
414 /* FIXME: should review whether this is worth locking */
415 return put_user(vt_do_kdgkbmeta(console), (int __user *)arg);
416
417 case KDGETKEYCODE:
418 case KDSETKEYCODE:
419 if(!capable(CAP_SYS_TTY_CONFIG))
420 perm = 0;
421 return vt_do_kbkeycode_ioctl(cmd, up, perm);
422
423 case KDGKBENT:
424 case KDSKBENT:
425 return vt_do_kdsk_ioctl(cmd, up, perm, console);
426
427 case KDGKBSENT:
428 case KDSKBSENT:
429 return vt_do_kdgkb_ioctl(cmd, up, perm);
430
431 /* Diacritical processing. Handled in keyboard.c as it has
432 to operate on the keyboard locks and structures */
433 case KDGKBDIACR:
434 case KDGKBDIACRUC:
435 case KDSKBDIACR:
436 case KDSKBDIACRUC:
437 return vt_do_diacrit(cmd, up, perm);
438
439 /* the ioctls below read/set the flags usually shown in the leds */
440 /* don't use them - they will go away without warning */
441 case KDGKBLED:
442 case KDSKBLED:
443 case KDGETLED:
444 case KDSETLED:
445 return vt_do_kdskled(console, cmd, arg, perm);
446
447 /*
448 * A process can indicate its willingness to accept signals
449 * generated by pressing an appropriate key combination.
450 * Thus, one can have a daemon that e.g. spawns a new console
451 * upon a keypress and then changes to it.
452 * See also the kbrequest field of inittab(5).
453 */
454 case KDSIGACCEPT:
455 if (!perm || !capable(CAP_KILL))
456 return -EPERM;
457 if (!valid_signal(arg) || arg < 1 || arg == SIGKILL)
458 return -EINVAL;
459
460 spin_lock_irq(&vt_spawn_con.lock);
461 put_pid(vt_spawn_con.pid);
462 vt_spawn_con.pid = get_pid(task_pid(current));
463 vt_spawn_con.sig = arg;
464 spin_unlock_irq(&vt_spawn_con.lock);
465 break;
466
467 case KDFONTOP: {
468 struct console_font_op op;
469
470 if (copy_from_user(&op, up, sizeof(op)))
471 return -EFAULT;
472 if (!perm && op.op != KD_FONT_OP_GET)
473 return -EPERM;
474 ret = con_font_op(vc, &op);
475 if (ret)
476 return ret;
477 if (copy_to_user(up, &op, sizeof(op)))
478 return -EFAULT;
479 break;
480 }
481
482 case KDFONTINFO:
> 483 struct console_font_info fnt_info;
484
485 if (copy_from_user(&fnt_info, up, sizeof(fnt_info)))
486 return -EFAULT;
487 ret = con_font_info(vc, &fnt_info);
488 if (ret)
489 return ret;
490 if (copy_to_user(up, &fnt_info, sizeof(fnt_info)))
491 return -EFAULT;
492 break;
493
494 default:
495 return -ENOIOCTLCMD;
496 }
497
498 return 0;
499 }
500
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-03-03 23:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202403040754.RKosvxAE-lkp@intel.com \
--to=lkp@intel.com \
--cc=legion@kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.