* [melver:ctx-analysis/dev 8/35] drivers/tty/serial/ma35d1_serial.c:587 ma35d1serial_console_write() error: uninitialized symbol 'flags'.
@ 2025-11-18 8:47 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-11-18 8:47 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: elver@google.com
tree: https://git.kernel.org/pub/scm/linux/kernel/git/melver/linux.git ctx-analysis/dev
head: 171c60881ab1f2e223402792a86f1241143252ad
commit: 54cae7211bb4787e86543044548efc1daccddedb [8/35] locking/rwlock, spinlock: Support Clang's context analysis
:::::: branch date: 22 hours ago
:::::: commit date: 22 hours ago
config: m68k-randconfig-r071-20251118 (https://download.01.org/0day-ci/archive/20251118/202511181637.6QISxcYm-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 8.5.0
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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202511181637.6QISxcYm-lkp@intel.com/
New smatch warnings:
drivers/tty/serial/ma35d1_serial.c:587 ma35d1serial_console_write() error: uninitialized symbol 'flags'.
Old smatch warnings:
arch/m68k/include/asm/io_no.h:50 __cf_internalio() warn: always true condition '(addr <= 3758096384 + 536870912 - 1) => (0-u32max <= u32max)'
vim +/flags +587 drivers/tty/serial/ma35d1_serial.c
930cbf92db0184 Jacky Huang 2023-06-19 546
930cbf92db0184 Jacky Huang 2023-06-19 547 /*
930cbf92db0184 Jacky Huang 2023-06-19 548 * Print a string to the serial port trying not to disturb
930cbf92db0184 Jacky Huang 2023-06-19 549 * any possible real use of the port...
930cbf92db0184 Jacky Huang 2023-06-19 550 *
930cbf92db0184 Jacky Huang 2023-06-19 551 * The console_lock must be held when we get here.
930cbf92db0184 Jacky Huang 2023-06-19 552 */
930cbf92db0184 Jacky Huang 2023-06-19 553 static void ma35d1serial_console_write(struct console *co, const char *s, u32 count)
930cbf92db0184 Jacky Huang 2023-06-19 554 {
f0b9d97a77fa8f Andi Shyti 2023-12-04 555 struct uart_ma35d1_port *up;
930cbf92db0184 Jacky Huang 2023-06-19 556 unsigned long flags;
930cbf92db0184 Jacky Huang 2023-06-19 557 int locked = 1;
930cbf92db0184 Jacky Huang 2023-06-19 558 u32 ier;
930cbf92db0184 Jacky Huang 2023-06-19 559
f0b9d97a77fa8f Andi Shyti 2023-12-04 560 if ((co->index < 0) || (co->index >= MA35_UART_NR)) {
6b64f8e360c00f Colin Ian King 2023-12-08 561 pr_warn("Failed to write on console port %x, out of range\n",
f0b9d97a77fa8f Andi Shyti 2023-12-04 562 co->index);
f0b9d97a77fa8f Andi Shyti 2023-12-04 563 return;
f0b9d97a77fa8f Andi Shyti 2023-12-04 564 }
f0b9d97a77fa8f Andi Shyti 2023-12-04 565
f0b9d97a77fa8f Andi Shyti 2023-12-04 566 up = &ma35d1serial_ports[co->index];
f0b9d97a77fa8f Andi Shyti 2023-12-04 567
930cbf92db0184 Jacky Huang 2023-06-19 568 if (up->port.sysrq)
930cbf92db0184 Jacky Huang 2023-06-19 569 locked = 0;
930cbf92db0184 Jacky Huang 2023-06-19 570 else if (oops_in_progress)
1b42626add3950 Thomas Gleixner 2023-09-14 571 locked = uart_port_trylock_irqsave(&up->port, &flags);
930cbf92db0184 Jacky Huang 2023-06-19 572 else
1b42626add3950 Thomas Gleixner 2023-09-14 573 uart_port_lock_irqsave(&up->port, &flags);
930cbf92db0184 Jacky Huang 2023-06-19 574
930cbf92db0184 Jacky Huang 2023-06-19 575 /*
930cbf92db0184 Jacky Huang 2023-06-19 576 * First save the IER then disable the interrupts
930cbf92db0184 Jacky Huang 2023-06-19 577 */
930cbf92db0184 Jacky Huang 2023-06-19 578 ier = serial_in(up, MA35_IER_REG);
930cbf92db0184 Jacky Huang 2023-06-19 579 serial_out(up, MA35_IER_REG, 0);
930cbf92db0184 Jacky Huang 2023-06-19 580
930cbf92db0184 Jacky Huang 2023-06-19 581 uart_console_write(&up->port, s, count, ma35d1serial_console_putchar);
930cbf92db0184 Jacky Huang 2023-06-19 582
930cbf92db0184 Jacky Huang 2023-06-19 583 wait_for_xmitr(up);
930cbf92db0184 Jacky Huang 2023-06-19 584 serial_out(up, MA35_IER_REG, ier);
930cbf92db0184 Jacky Huang 2023-06-19 585
930cbf92db0184 Jacky Huang 2023-06-19 586 if (locked)
1b42626add3950 Thomas Gleixner 2023-09-14 @587 uart_port_unlock_irqrestore(&up->port, flags);
930cbf92db0184 Jacky Huang 2023-06-19 588 }
930cbf92db0184 Jacky Huang 2023-06-19 589
:::::: The code at line 587 was first introduced by commit
:::::: 1b42626add395027818ad8bfd45f5bdf6e063107 serial: ma35d1: Use port lock wrappers
:::::: TO: Thomas Gleixner <tglx@linutronix.de>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-11-18 8:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-18 8:47 [melver:ctx-analysis/dev 8/35] drivers/tty/serial/ma35d1_serial.c:587 ma35d1serial_console_write() error: uninitialized symbol 'flags' kernel test robot
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.