Linux Serial subsystem development
 help / color / mirror / Atom feed
* [PATCH 0/4] MIPS: Fix missing proto and passing arg warnings
@ 2024-02-15 17:17 Serge Semin
  2024-02-15 17:17 ` [PATCH 1/4] mips: cm: Add __mips_cm_l2sync_phys_base prototype declaration Serge Semin
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Serge Semin @ 2024-02-15 17:17 UTC (permalink / raw)
  To: Thomas Bogendoerfer, Greg Kroah-Hartman, Jiri Slaby,
	Arnd Bergmann, Jiaxun Yang
  Cc: Serge Semin, Alexey Malahov, Stephen Rothwell, Andrew Morton,
	linux-mips, linux-serial, linux-kernel

After getting my local tree rebased onto the kernel 6.8-rc3 the MIPS32
kernel build procedure produced a couple of warnings which I suggest to
fix in the framework of this series.

A first warning is of the "no previous prototype for `<func>`" type. In
particular my arch-specific code has the mips_cm_l2sync_phys_base() method
re-defined, but even though the function is global it' prototype isn't
declared anywhere. Fix that by adding the method prototype declaration to
the mips/include/asm/mips-cm.h header file. A similar solution was
provided for the methods:
__mips_cm_l2sync_phys_base()
mips_cm_phys_base()
__mips_cm_phys_base()
too (Please see the patches 1/4 and 2/4 notes section for an alternative
suggestion of the way to fix the warning).

One more case of the denoted warning I spotted in the self-extracting
kernel (so called zboot) with the debug printouts enabled. In particular
there are several putc() method re-definitions available in:
arch/mips/boot/compressed/uart-prom.c
arch/mips/boot/compressed/uart-16550.c
arch/mips/boot/compressed/uart-alchemy.c
All of these files lacked the prototype declaration what caused having the
"no previous prototype for ‘putc’" printed on my build with the next
configs enabled:
CONFIG_SYS_SUPPORTS_ZBOOT=y
CONFIG_SYS_SUPPORTS_ZBOOT_UART_PROM=y
CONFIG_ZBOOT_LOAD_ADDRESS=0x85100000
CONFIG_DEBUG_ZBOOT=y

The second warning is of the "passing argument <x> of ‘<func>’ from
incompatible pointer type" type which I discovered in the
drivers/tty/mips_ejtag_fdc.c driver. The problem most likely happened due
to the commit ce7cbd9a6c81 ("tty: mips_ejtag_fdc: use u8 for character
pointers").

That's it for today.) Thanks for review in advance. Any tests are very
welcome.

Cc: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
Cc: Stephen Rothwell <sfr@rothwell.id.au>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mips@vger.kernel.org
Cc: linux-serial@vger.kernel.org
Cc: linux-kernel@vger.kernel.org

Serge Semin (4):
  mips: cm: Add __mips_cm_l2sync_phys_base prototype declaration
  mips: cm: Add CM GCR and L2-sync base address getters declarations
  mips: zboot: Fix "no previous prototype" build warning
  tty: mips_ejtag_fdc: Fix passing incompatible pointer type warning

 arch/mips/boot/compressed/uart-16550.c   |  2 ++
 arch/mips/boot/compressed/uart-alchemy.c |  2 ++
 arch/mips/boot/compressed/uart-prom.c    |  2 ++
 arch/mips/include/asm/mips-cm.h          | 16 ++++++++++++++++
 arch/mips/kernel/mips-cm.c               |  2 +-
 drivers/tty/mips_ejtag_fdc.c             |  2 +-
 6 files changed, 24 insertions(+), 2 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2024-03-11 22:27 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-15 17:17 [PATCH 0/4] MIPS: Fix missing proto and passing arg warnings Serge Semin
2024-02-15 17:17 ` [PATCH 1/4] mips: cm: Add __mips_cm_l2sync_phys_base prototype declaration Serge Semin
2024-03-11 22:26   ` Andy Shevchenko
2024-02-15 17:17 ` [PATCH 2/4] mips: cm: Add CM GCR and L2-sync base address getters declarations Serge Semin
2024-02-20 17:24   ` Thomas Bogendoerfer
2024-02-21 18:39     ` Serge Semin
2024-02-23  9:06       ` Thomas Bogendoerfer
2024-02-23 10:38         ` Serge Semin
2024-02-15 17:17 ` [PATCH 3/4] mips: zboot: Fix "no previous prototype" build warning Serge Semin
2024-02-23  9:18   ` Thomas Bogendoerfer
2024-02-15 17:17 ` [PATCH 4/4] tty: mips_ejtag_fdc: Fix passing incompatible pointer type warning Serge Semin
2024-02-16  5:51   ` Jiri Slaby
2024-02-16 14:12     ` Serge Semin
2024-02-23  9:18   ` Thomas Bogendoerfer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox