* [tglx-devel:serial 66/74] drivers/tty/serial/sunplus-uart.c:520:77: error: too few arguments to function call, expected 2, have 1
@ 2023-09-12 18:07 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-09-12 18:07 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: llvm, oe-kbuild-all
Hi Thomas,
FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git serial
head: 75adfb6dc779d7c86a2e31b3ca6b266b8a8ef854
commit: 058734f3427903c0908ccc406a41babd0d4b2e5d [66/74] serial: sunplus-uart: Use port lock wrappers
config: hexagon-randconfig-r022-20230912 (https://download.01.org/0day-ci/archive/20230913/202309130221.R243EQjR-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230913/202309130221.R243EQjR-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/202309130221.R243EQjR-lkp@intel.com/
All errors (new ones prefixed by >>):
12 | (void)(&__dummy == &__dummy2); \
| ~~~~~~~~ ^ ~~~~~~~~~
In file included from drivers/tty/serial/sunplus-uart.c:29:
include/linux/serial_core.h:639:41: error: incompatible pointer to integer conversion passing 'unsigned long *' to parameter of type 'unsigned long'; dereference with * [-Wint-conversion]
639 | return spin_trylock_irqsave(&up->lock, flags);
| ^~~~~
| *
include/linux/spinlock.h:421:49: note: expanded from macro 'spin_trylock_irqsave'
421 | raw_spin_trylock_irqsave(spinlock_check(lock), flags); \
| ^~~~~
include/linux/spinlock.h:298:17: note: expanded from macro 'raw_spin_trylock_irqsave'
298 | local_irq_save(flags); \
| ^~~~~
include/linux/irqflags.h:223:32: note: expanded from macro 'local_irq_save'
223 | if (!raw_irqs_disabled_flags(flags)) \
| ^~~~~
include/linux/irqflags.h:195:28: note: expanded from macro 'raw_irqs_disabled_flags'
195 | arch_irqs_disabled_flags(flags); \
| ^~~~~
arch/hexagon/include/asm/irqflags.h:24:59: note: passing argument to parameter 'flags' here
24 | static inline bool arch_irqs_disabled_flags(unsigned long flags)
| ^
In file included from drivers/tty/serial/sunplus-uart.c:29:
include/linux/serial_core.h:639:9: warning: comparison of distinct pointer types ('unsigned long *' and 'typeof (flags) *' (aka 'unsigned long **')) [-Wcompare-distinct-pointer-types]
639 | return spin_trylock_irqsave(&up->lock, flags);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/spinlock.h:421:2: note: expanded from macro 'spin_trylock_irqsave'
421 | raw_spin_trylock_irqsave(spinlock_check(lock), flags); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/spinlock.h:300:9: note: expanded from macro 'raw_spin_trylock_irqsave'
300 | 1 : ({ local_irq_restore(flags); 0; }); \
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/irqflags.h:229:8: note: expanded from macro 'local_irq_restore'
229 | if (!raw_irqs_disabled_flags(flags)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/irqflags.h:194:3: note: expanded from macro 'raw_irqs_disabled_flags'
194 | typecheck(unsigned long, flags); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/typecheck.h:12:18: note: expanded from macro 'typecheck'
12 | (void)(&__dummy == &__dummy2); \
| ~~~~~~~~ ^ ~~~~~~~~~
In file included from drivers/tty/serial/sunplus-uart.c:29:
include/linux/serial_core.h:639:41: error: incompatible pointer to integer conversion passing 'unsigned long *' to parameter of type 'unsigned long'; dereference with * [-Wint-conversion]
639 | return spin_trylock_irqsave(&up->lock, flags);
| ^~~~~
| *
include/linux/spinlock.h:421:49: note: expanded from macro 'spin_trylock_irqsave'
421 | raw_spin_trylock_irqsave(spinlock_check(lock), flags); \
| ^~~~~
include/linux/spinlock.h:300:27: note: expanded from macro 'raw_spin_trylock_irqsave'
300 | 1 : ({ local_irq_restore(flags); 0; }); \
| ^~~~~
include/linux/irqflags.h:229:32: note: expanded from macro 'local_irq_restore'
229 | if (!raw_irqs_disabled_flags(flags)) \
| ^~~~~
include/linux/irqflags.h:195:28: note: expanded from macro 'raw_irqs_disabled_flags'
195 | arch_irqs_disabled_flags(flags); \
| ^~~~~
arch/hexagon/include/asm/irqflags.h:24:59: note: passing argument to parameter 'flags' here
24 | static inline bool arch_irqs_disabled_flags(unsigned long flags)
| ^
In file included from drivers/tty/serial/sunplus-uart.c:29:
include/linux/serial_core.h:639:9: warning: comparison of distinct pointer types ('unsigned long *' and 'typeof (flags) *' (aka 'unsigned long **')) [-Wcompare-distinct-pointer-types]
639 | return spin_trylock_irqsave(&up->lock, flags);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/spinlock.h:421:2: note: expanded from macro 'spin_trylock_irqsave'
421 | raw_spin_trylock_irqsave(spinlock_check(lock), flags); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/spinlock.h:300:9: note: expanded from macro 'raw_spin_trylock_irqsave'
300 | 1 : ({ local_irq_restore(flags); 0; }); \
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/irqflags.h:231:3: note: expanded from macro 'local_irq_restore'
231 | raw_local_irq_restore(flags); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/irqflags.h:183:3: note: expanded from macro 'raw_local_irq_restore'
183 | typecheck(unsigned long, flags); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/typecheck.h:12:18: note: expanded from macro 'typecheck'
12 | (void)(&__dummy == &__dummy2); \
| ~~~~~~~~ ^ ~~~~~~~~~
In file included from drivers/tty/serial/sunplus-uart.c:29:
include/linux/serial_core.h:639:41: error: incompatible pointer to integer conversion passing 'unsigned long *' to parameter of type 'unsigned long'; dereference with * [-Wint-conversion]
639 | return spin_trylock_irqsave(&up->lock, flags);
| ^~~~~
| *
include/linux/spinlock.h:421:49: note: expanded from macro 'spin_trylock_irqsave'
421 | raw_spin_trylock_irqsave(spinlock_check(lock), flags); \
| ^~~~~
include/linux/spinlock.h:300:27: note: expanded from macro 'raw_spin_trylock_irqsave'
300 | 1 : ({ local_irq_restore(flags); 0; }); \
| ^~~~~
include/linux/irqflags.h:231:25: note: expanded from macro 'local_irq_restore'
231 | raw_local_irq_restore(flags); \
| ^~~~~
include/linux/irqflags.h:185:26: note: expanded from macro 'raw_local_irq_restore'
185 | arch_local_irq_restore(flags); \
| ^~~~~
arch/hexagon/include/asm/irqflags.h:44:57: note: passing argument to parameter 'flags' here
44 | static inline void arch_local_irq_restore(unsigned long flags)
| ^
>> drivers/tty/serial/sunplus-uart.c:520:77: error: too few arguments to function call, expected 2, have 1
520 | locked = uart_port_trylock_irqsave(&sunplus_console_ports[co->index]->port);
| ~~~~~~~~~~~~~~~~~~~~~~~~~ ^
include/linux/serial_core.h:637:20: note: 'uart_port_trylock_irqsave' declared here
637 | static inline bool uart_port_trylock_irqsave(struct uart_port *up, unsigned long *flags)
| ^
11 warnings and 6 errors generated.
vim +520 drivers/tty/serial/sunplus-uart.c
507
508 static void sunplus_console_write(struct console *co,
509 const char *s,
510 unsigned int count)
511 {
512 unsigned long flags;
513 int locked = 1;
514
515 local_irq_save(flags);
516
517 if (sunplus_console_ports[co->index]->port.sysrq)
518 locked = 0;
519 else if (oops_in_progress)
> 520 locked = uart_port_trylock_irqsave(&sunplus_console_ports[co->index]->port);
521 else
522 uart_port_lock(&sunplus_console_ports[co->index]->port);
523
524 uart_console_write(&sunplus_console_ports[co->index]->port, s, count,
525 sunplus_uart_console_putchar);
526
527 if (locked)
528 uart_port_unlock(&sunplus_console_ports[co->index]->port);
529
530 local_irq_restore(flags);
531 }
532
--
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:[~2023-09-12 18:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-12 18:07 [tglx-devel:serial 66/74] drivers/tty/serial/sunplus-uart.c:520:77: error: too few arguments to function call, expected 2, have 1 kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox