Commit Graph

1215869 Commits

Author SHA1 Message Date
Geert Uytterhoeven
8851453123 m68k: Fix indentation by 7 spaces in <asm/io_mm.h>
Indentation should use TABs, not spaces.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/r/41ca6ab21459164a52f5f468c32ef09aee7ba3d3.1696602993.git.geert@linux-m68k.org
2023-10-16 14:30:39 +02:00
Geert Uytterhoeven
48ceb35e72 m68k: defconfig: Update virt_defconfig for v6.6-rc3
- Enable CONFIG_DRM_FBDEV_EMULATION and CONFIG_FB_DEVICE (no longer
    auto-enabled since commit bb6c4507fe ("drm: fix up fbdev
    Kconfig defaults")),
  - Drop CONFIG_FRAMEBUFFER_CONSOLE=y (auto-enabled since commit
    bb6c4507fe ("drm: fix up fbdev Kconfig defaults")).

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/r/6f30b86b83b972e9902b62295f397a20512d5507.1695977960.git.geert@linux-m68k.org
2023-10-06 10:03:04 +02:00
Geert Uytterhoeven
7e02d701b9 m68k: defconfig: Update defconfigs for v6.6-rc1
- Enable modular build of the new device model tests,
  - Enable modular build of the glob self-test on configs that didn't
    have it yet (visible since commit b67abaad4d ("kunit: Allow
    kunit test modules to use test filtering")),
  - Replace CONFIG_FB=y by CONFIG_FRAMEBUFFER_CONSOLE=y on the virt
    platform (the former is no longer needed since commit
    55bffc8170 ("fbdev: Split frame buffer support in FB and
    FB_CORE symbols")), the latter is no longer auto-enabled since
    commit a5ae331edb ("drm: Drop select FRAMEBUFFER_CONSOLE for
    DRM_FBDEV_EMULATION")).

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/r/43ef623c9053862d93fbc746689d4897b35597ef.1694442486.git.geert@linux-m68k.org
2023-10-06 10:03:04 +02:00
Arnd Bergmann
c7db3832ff m68k: io: Mark mmio read addresses as const
Passing constant __iomem tokens into the readl() family of helpers
or any of the others causes a warning on m68k:

    include/asm-generic/io.h: In function 'ioread8_rep':
    arch/m68k/include/asm/io_mm.h:375:44: warning: passing argument 1 of 'raw_insb' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
	 375 | #define readsb(port, buf, nr)     raw_insb((port), (u8

Add a 'const' modifier to the pointers to shut up the warnings here.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202309251926.bPl23AhG-lkp@intel.com/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/r/20230925155328.443664-1-arnd@kernel.org
[geert: Fix missed rom_in_{8,be16,le16}()]
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2023-10-06 10:03:04 +02:00
Geert Uytterhoeven
b038c6abf9 m68k: Replace GPL 2.0+ README.legal boilerplate with SPDX
Upstream Linux never had a "README.legal" file, but it was present
in early source releases of Linux/m68k.  It contained a simple copyright
notice and a link to a version of the "COPYING" file that predated the
addition of the "only valid GPL version is v2" clause.

Get rid of the references to non-existent files by replacing the
boilerplate with SPDX license identifiers.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Greg Ungerer <gerg@linux-m68k.org>
Link: https://lore.kernel.org/r/23430c233728ab02ec0af8e714994398d383137a.1695031668.git.geert@linux-m68k.org
2023-10-06 10:03:04 +02:00
Geert Uytterhoeven
72e70a0e7a m68k: sun3: Change led_pattern[] to unsigned char
The values stored in led_pattern[] are only used for passing to
sun3_leds(), which takes an "unsigned char".
Change the type of led_pattern[] accordingly, to reduce kernel size.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/r/794c5d543dbdae8336a13ef2459adafaaadb7d86.1695031620.git.geert@linux-m68k.org
2023-10-06 10:03:04 +02:00
Rolf Eike Beer
ec177486cb m68k: Add missing types to asm/irq.h
As reported in commit f8b648bf66 ("net: sunhme: move asm includes to
below linux includes") when including this <asm/*> header before the
needed <linux/*> headers the compilation will fail because of missing
types:

    arch/m68k/include/asm/irq.h:66:20: warning: ‘struct pt_regs’ declared inside parameter list will not be visible outside of this definition or declaration
       66 |             struct pt_regs *));
	  |                    ^~~~~~~
    arch/m68k/include/asm/irq.h:78:11: error: expected ‘;’ before ‘void’
       78 | asmlinkage void do_IRQ(int irq, struct pt_regs *regs);
	  |           ^~~~~
	  |           ;
    arch/m68k/include/asm/irq.h:78:40: warning: ‘struct pt_regs’ declared inside parameter list will not be visible outside of this definition or declaration
       78 | asmlinkage void do_IRQ(int irq, struct pt_regs *regs);
	  |                                        ^~~~~~~
    arch/m68k/include/asm/irq.h:79:8: error: unknown type name ‘atomic_t’
       79 | extern atomic_t irq_err_count;
	  |        ^~~~~~~~

Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/r/5971770.lOV4Wx5bFT@eto.sf-tec.de
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2023-10-06 10:03:04 +02:00
Geert Uytterhoeven
c50b1fc110 m68k: sun3/3x: Add and use "sun3.h"
When building with W=1:

    arch/m68k/sun3/idprom.c:86:6: warning: no previous prototype for ‘sun3_get_model’ [-Wmissing-prototypes]
       86 | void sun3_get_model(char *model)
	  |      ^~~~~~~~~~~~~~
    arch/m68k/sun3/config.c:53:24: warning: no previous prototype for ‘sun3_init’ [-Wmissing-prototypes]
       53 | asmlinkage void __init sun3_init(void)
	  |                        ^~~~~~~~~
    arch/m68k/sun3/mmu_emu.c:117:6: warning: no previous prototype for ‘print_pte_vaddr’ [-Wmissing-prototypes]
      117 | void print_pte_vaddr (unsigned long vaddr)
	  |      ^~~~~~~~~~~~~~~
    arch/m68k/sun3/mmu_emu.c:126:13: warning: no previous prototype for ‘mmu_emu_init’ [-Wmissing-prototypes]
      126 | void __init mmu_emu_init(unsigned long bootmem_end)
	  |             ^~~~~~~~~~~~
    arch/m68k/sun3/mmu_emu.c:353:5: warning: no previous prototype for ‘mmu_emu_handle_fault’ [-Wmissing-prototypes]
      353 | int mmu_emu_handle_fault (unsigned long vaddr, int read_flag, int kernel_fault)
	  |     ^~~~~~~~~~~~~~~~~~~~
    arch/m68k/sun3/leds.c:6:6: warning: no previous prototype for ‘sun3_leds’ [-Wmissing-prototypes]
	6 | void sun3_leds(unsigned char byte)
	  |      ^~~~~~~~~
    arch/m68k/sun3/intersil.c:27:5: warning: no previous prototype for ‘sun3_hwclk’ [-Wmissing-prototypes]
       27 | int sun3_hwclk(int set, struct rtc_time *t)
	  |     ^~~~~~~~~~
    arch/m68k/sun3x/config.c:30:6: warning: no previous prototype for ‘sun3_leds’ [-Wmissing-prototypes]
       30 | void sun3_leds(unsigned char byte)
	  |      ^~~~~~~~~

Fix this by introducing a new header file "sun3.h" for holding the
prototypes of functions implemented in arch/m68k/sun3/ and
arch/m68k/sun3x/.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/87856ef9ef8955f459fb691faca921c0a688bc80.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:04 +02:00
Geert Uytterhoeven
f9b34638c0 m68k: sun3x: Make dvma_print() static
There was never a user of dvma_print() outside arch/m68k/sun3x/dvma.c.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/0a038ac68ee553b1928a975dc0ae1c16803a0ac0.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:04 +02:00
Geert Uytterhoeven
6548f013fa m68k: sun3x: Make sun3x_halt() static
When building with W=1:

    arch/m68k/sun3x/prom.c:33:6: warning: no previous prototype for ‘sun3x_halt’ [-Wmissing-prototypes]
       33 | void sun3x_halt(void)
	  |      ^~~~~~~~~~

Fix this by making sun3x_halt() static.
The function body was moved to arch/m68k/sun3x/prom.c in v2.4.5.2.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/0ba2883aaff2e4fc5e570bfee87c58e483668b26.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:04 +02:00
Geert Uytterhoeven
1dbda52ef9 m68k: sun3x: Do not mark dvma_map_iommu() inline
dvma_map_iommu() is called from the common Sun3/3x DVMA management code,
but never from inside arch/m68k/sun3x/dvma.c.  Hence it does not make
sense to mark it inline.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/0884fd1f5d6775535bf20b13cc74283df4955e49.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:04 +02:00
Geert Uytterhoeven
873f7a1781 m68k: sun3x: Fix signature of sun3_leds()
The sun3_leds() implementation for Sun3 in arch/m68k/sun3/leds.c, and
the prototype in arch/m68k/sun3/sun3ints.c take an "unsigned char", not
an "int".  Align the dummy implementation for Sun3x with the Sun3
variant and the common caller.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/5214afb67eac58b8adae5710aea0980c2644ff24.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:04 +02:00
Geert Uytterhoeven
88be4a461e m68k: sun3: Make sun3_platform_init() static
When building with W=1:

    arch/m68k/sun3/config.c:201:12: warning: no previous prototype for ‘sun3_platform_init’ [-Wmissing-prototypes]
      202 | int __init sun3_platform_init(void)
	  |            ^~~~~~~~~~~~~~~~~~

Fix this by making sun3_platform_init() static.
There was never a user outside arch/m68k/sun3/config.c.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/f35e6376d01b11f21f677cb980093e8410d2c33b.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:04 +02:00
Geert Uytterhoeven
dc52d2db89 m68k: sun3: Make print_pte() static
When building with W=1:

    arch/m68k/sun3/mmu_emu.c:70:6: warning: no previous prototype for ‘print_pte’ [-Wmissing-prototypes]
       70 | void print_pte (pte_t pte)
	  |      ^~~~~~~~~

Fix this by making print_pte() static.
There was never a user outside arch/m68k/sun3/mmu_emu.c.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/a56c70e85584efb3681cb7e94aff167299dfa5e4.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:04 +02:00
Geert Uytterhoeven
dc40c42977 m68k: sun3: Annotate prom_printf() with __printf()
When building with W=1:

    arch/m68k/sun3/prom/printf.c: In function ‘prom_printf’:
    arch/m68k/sun3/prom/printf.c:35:9: warning: function ‘prom_printf’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
       35 |         vsprintf(ppbuf, fmt, args);
	  |         ^~~~~~~~

Fix this by annotating prom_printf() with __printf(1, 2).

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/61017c012617e6f633ac9f9a3c2659ae38e1f2fb.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:04 +02:00
Geert Uytterhoeven
66ed28ea09 m68k: sun3: Remove unused vsprintf() return value in prom_printf()
When building with W=1:

    arch/m68k/sun3/prom/printf.c: In function ‘prom_printf’:
    arch/m68k/sun3/prom/printf.c:28:13: warning: variable ‘i’ set but not used [-Wunused-but-set-variable]
       28 |         int i;
	  |             ^

As the return value of vsprintf() is unused, and serves no practical
purpose here, fix this by removing the variable.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/94a1e61b1651ff05f4a59655d9b8c1ac5338f60c.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:03 +02:00
Geert Uytterhoeven
f9d49824c0 m68k: sun3: Remove unused start_page in sun3_bootmem_alloc()
When building with W=1:

    arch/m68k/sun3/config.c: In function ‘sun3_bootmem_alloc’:
    arch/m68k/sun3/config.c:110:23: warning: variable ‘start_page’ set but not used [-Wunused-but-set-variable]
      112 |         unsigned long start_page;
	  |                       ^~~~~~~~~~

Fix this by removing the variable and the assignment, now the last user
is gone.

Fixes: 1008a11590 ("m68k: switch to MEMBLOCK + NO_BOOTMEM")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/361c4562350c8739f6c0da34f7c416b2678fae7c.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:03 +02:00
Geert Uytterhoeven
2fde1934ae m68k: sun3: Remove unused orig_baddr in free_baddr()
When building with W=1:

    arch/m68k/sun3/sun3dvma.c: In function ‘free_baddr’:
    arch/m68k/sun3/sun3dvma.c:208:23: warning: variable ‘orig_baddr’ set but not used [-Wunused-but-set-variable]
      196 |         unsigned long orig_baddr;
	  |                       ^~~~~~~~~~

Fix this by removing the unused variable and assignment, which were
futile since their introduction in v2.4.5.2.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/c705b6186241dfe9a5bdcb71720b8697fa5c801f.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:03 +02:00
Geert Uytterhoeven
a428664189 m68k: sun3: Add missing asmlinkage to sun3_init()
sun3_init() is called from assembly code, so it should be marked
asmlinkage for documentation purposes.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/9a174020de2c55e108be9bd25fcdec3e48d655c4.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:03 +02:00
Geert Uytterhoeven
bdc1656c08 m68k: sun3: Fix signature of sun3_get_model()
The mach_get_model() callback takes a "char *", not an
"unsigned char *".

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/c635afb4542ab54c3dbd4fa2fbed07a2665a2f4e.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:03 +02:00
Geert Uytterhoeven
2e195ea7e9 m68k: sun3: Fix context restore in flush_tlb_range()
When building with W=1:

    In file included from arch/m68k/kernel/traps.c:42:
    arch/m68k/include/asm/tlbflush.h: In function ‘flush_tlb_range’:
    arch/m68k/include/asm/tlbflush.h:191:28: warning: variable ‘oldctx’ set but not used [-Wunused-but-set-variable]
      191 |         unsigned char seg, oldctx;
	  |                            ^~~~~~

Indeed, the old context is saved, but never restored.  Fix this by
adding the missing call to sun3_put_context().

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/ea859b7850e061e0f7fb3fca64d9f8e6d1c0d2ad.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:03 +02:00
Geert Uytterhoeven
4ebe8459cd m68k: sun3: Improve Sun3/3x DVMA abstraction in <asm/dvma.h>
When building with W=1:

    arch/m68k/sun3/dvma.c:65:13: warning: no previous prototype for ‘sun3_dvma_init’ [-Wmissing-prototypes]
       65 | void __init sun3_dvma_init(void)
	  |             ^~~~~~~~~~~~~~

    arch/m68k/sun3x/dvma.c:178:6: warning: no previous prototype for ‘dvma_unmap_iommu’ [-Wmissing-prototypes]
      179 | void dvma_unmap_iommu(unsigned long baddr, int len)
	  |      ^~~~~~~~~~~~~~~~

Fix this by moving the declarations for sun3_dvma_init() and
dvma_unmap_iommu() to <asm/dvma.h>.  Avoid #ifdefs in callers by
providing dummy static inline functions.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/ec93ed1b28b75674ae9a0b42de083a9bb140f0b3.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:03 +02:00
Geert Uytterhoeven
2926da2bea m68k: sun3/3x: Include <asm/config.h> for config_sun3*()
When building with W=1:

    arch/m68k/sun3/config.c:123:13: warning: no previous prototype for ‘config_sun3’ [-Wmissing-prototypes]
      126 | void __init config_sun3(void)
	  |             ^~~~~~~~~~~
    arch/m68k/sun3x/config.c:42:13: warning: no previous prototype for ‘config_sun3x’ [-Wmissing-prototypes]
       42 | void __init config_sun3x(void)
	  |             ^~~~~~~~~~~~

Fix this by including <asm/config.h>

Fixes: 91d7b75a58 ("m68k: Add asm/config.h")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/b9178e864d6c5e06c177d53bc4cce6d689f94d78.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:03 +02:00
Geert Uytterhoeven
bbe6980c33 m68k: q40: Add and use "q40.h"
When building with W=1:

    arch/m68k/q40/q40ints.c:84:13: warning: no previous prototype for ‘q40_init_IRQ’ [-Wmissing-prototypes]
       84 | void __init q40_init_IRQ(void)
	  |             ^~~~~~~~~~~~
    arch/m68k/q40/q40ints.c:112:6: warning: no previous prototype for ‘q40_mksound’ [-Wmissing-prototypes]
      112 | void q40_mksound(unsigned int hz, unsigned int ticks)
	  |      ^~~~~~~~~~~
    arch/m68k/q40/q40ints.c:152:6: warning: no previous prototype for ‘q40_sched_init’ [-Wmissing-prototypes]
      152 | void q40_sched_init (void)
	  |      ^~~~~~~~~~~~~~

Fix this by introducing a new header file "q40.h" for holding the
prototypes of functions implemented in arch/m68k/q40/.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/7f983ce079b176e1e1ac2a7d0c35b36197c5fa6b.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:03 +02:00
Geert Uytterhoeven
dcec33c1fc m68k: mvme16x: Add and use "mvme16x.h"
When building with W=1:

    arch/m68k/mvme16x/config.c:208:6: warning: no previous prototype for ‘mvme16x_cons_write’ [-Wmissing-prototypes]
      208 | void mvme16x_cons_write(struct console *co, const char *str, unsigned count)
	  |      ^~~~~~~~~~~~~~~~~~

Fix this by introducing a new header file "mvme16x.h" for holding the
prototypes of functions implemented in arch/m68k/mvme16x/.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/6200cc3b26fad215c4524748af04692e38c5ecd2.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:03 +02:00
Geert Uytterhoeven
0c2a527e28 m68k: mvme16x: Remove unused sink in mvme16x_cons_write()
When building with W=1:

    arch/m68k/mvme16x/config.c: In function ‘mvme16x_cons_write’:
    arch/m68k/mvme16x/config.c:211:25: warning: variable ‘sink’ set but not used [-Wunused-but-set-variable]
      211 |         volatile u_char sink;
	  |                         ^~~~

Fix this by removing the unused variable and assignment.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/22c4d1978f811d7f4495eeb269ce06304717627a.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:03 +02:00
Geert Uytterhoeven
7f5514b4ed m68k: mvme147: Make mvme147_init_IRQ() static
When building with W=1:

    arch/m68k/mvme147/config.c:76:13: warning: no previous prototype for ‘mvme147_init_IRQ’ [-Wmissing-prototypes]
       76 | void __init mvme147_init_IRQ(void)
	  |             ^~~~~~~~~~~~~~~~

Fix this by making mvme147_init_IRQ() static.
The function body was moved to arch/m68k/mvme147/config.c in v2.6.18.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/853e29ca81761032c3af132fffbd583b667234a6.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:03 +02:00
Geert Uytterhoeven
c43278f073 m68k: mac: Add and use "mac.h"
When building with W=1:

    arch/m68k/mac/iop.c:235:13: warning: no previous prototype for ‘iop_init’ [-Wmissing-prototypes]
      235 | void __init iop_init(void)
	  |             ^~~~~~~~
    arch/m68k/mac/via.c:112:13: warning: no previous prototype for ‘via_init’ [-Wmissing-prototypes]
      111 | void __init via_init(void)
	  |             ^~~~~~~~
    arch/m68k/mac/via.c:623:13: warning: no previous prototype for ‘via_init_clock’ [-Wmissing-prototypes]
      593 | void __init via_init_clock(void)
	  |             ^~~~~~~~~~~~~~
    arch/m68k/mac/oss.c:37:13: warning: no previous prototype for ‘oss_init’ [-Wmissing-prototypes]
       37 | void __init oss_init(void)
	  |             ^~~~~~~~
    arch/m68k/mac/psc.c:76:13: warning: no previous prototype for ‘psc_init’ [-Wmissing-prototypes]
       76 | void __init psc_init(void)
	  |             ^~~~~~~~
    arch/m68k/mac/baboon.c:25:13: warning: no previous prototype for ‘baboon_init’ [-Wmissing-prototypes]
       25 | void __init baboon_init(void)
	  |             ^~~~~~~~~~~
    arch/m68k/mac/macboing.c:155:6: warning: no previous prototype for ‘mac_mksound’ [-Wmissing-prototypes]
      155 | void mac_mksound( unsigned int freq, unsigned int length )
	  |      ^~~~~~~~~~~
    arch/m68k/mac/misc.c:608:5: warning: no previous prototype for ‘mac_hwclk’ [-Wmissing-prototypes]
      608 | int mac_hwclk(int op, struct rtc_time *t)
	  |     ^~~~~~~~~

Fix this by introducing a new header file "mac.h" for holding the
prototypes of functions implemented in arch/m68k/mac/.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/d1fe0014a9e472a305333de4fa17f335c93d73af.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:03 +02:00
Geert Uytterhoeven
a53652fa78 m68k: mac: Make mac_platform_init() static
When building with W=1:

    arch/m68k/mac/config.c:961:12: warning: no previous prototype for ‘mac_platform_init’ [-Wmissing-prototypes]
      961 | int __init mac_platform_init(void)
	  |            ^~~~~~~~~~~~~~~~~

Fix this by making mac_platform_init() static.
There was never a user outside arch/m68k/mac/config.c.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/f5f069f94c369b7de223bb5e1a21837807fde982.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:03 +02:00
Geert Uytterhoeven
4dae1950b4 m68k: mac: Remove unused yday in unmktime()
When building with W=1:

    arch/m68k/mac/misc.c: In function ‘unmktime’:
    arch/m68k/mac/misc.c:557:33: warning: variable ‘yday’ set but not used [-Wunused-but-set-variable]
      557 |         int days, rem, y, wday, yday;
	  |                                 ^~~~

Fix this by removing the unused variable and assignment.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/b25c42eac8beb0862f1b2041e817cb421ec66b4e.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:03 +02:00
Geert Uytterhoeven
f5d1d6d258 m68k: mac: Remove unused sine_data[]
When building with W=1:

    arch/m68k/mac/macboing.c:29:26: warning: ‘sine_data’ defined but not used [-Wunused-const-variable=]
       29 | static const signed char sine_data[] = {
	  |                          ^~~~~~~~~

The predefined sine table was superseded by a table calculated at
run-time in v2.2.0.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/75dbc0a141490daf9febfb8cb4a43ae87fbe3352.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:03 +02:00
Geert Uytterhoeven
5a368e9c02 m68k: hp300: Include "time.h" for hp300_sched_init()
When building with W=1:

    arch/m68k/hp300/time.c:101:13: warning: no previous prototype for ‘hp300_sched_init’ [-Wmissing-prototypes]
      101 | void __init hp300_sched_init(void)
	  |             ^~~~~~~~~~~~~~~~

Fix this by including "time.h".

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/630ee35241dc753a30b69adedc2ffa8fc6d551dd.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:03 +02:00
Geert Uytterhoeven
18fe6bf505 m68k: bvme6000: Make bvme6000_abort_int() static
When building with W=1:

    arch/m68k/bvme6000/config.c:133:13: warning: no previous prototype for ‘bvme6000_abort_int’ [-Wmissing-prototypes]
      133 | irqreturn_t bvme6000_abort_int (int irq, void *dev_id)
	  |             ^~~~~~~~~~~~~~~~~~

Fix this by making bvme6000_abort_int() static.
There was never a user outside arch/m68k/bvme6000/config.c.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/4da40748e1d7d56b73840a1d7ab1cb9c9a59cef2.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:02 +02:00
Geert Uytterhoeven
676ca3c3fd m68k: apollo: Add and use "apollo.h"
When building with W=1:

    arch/m68k/apollo/dn_ints.c:43:13: warning: no previous prototype for ‘dn_init_IRQ’ [-Wmissing-prototypes]
       43 | void __init dn_init_IRQ(void)
	  |             ^~~~~~~~~~~

Fix this by introducing a new header file "apollo.h" for holding the
prototypes of functions implemented in arch/m68k/apollo/.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/d78eceb83b8dd1931be1789204898060664e23f6.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:02 +02:00
Geert Uytterhoeven
7509c04afe m68k: apollo: Replace set but not used variable by READ_ONCE()
When building with W=1:

    arch/m68k/apollo/config.c: In function ‘dn_timer_int’:
    arch/m68k/apollo/config.c:171:32: warning: variable ‘x’ set but not used [-Wunused-but-set-variable]
      149 |         volatile unsigned char x;
	  |                                ^

Fix this by using READ_ONCE(), and removing the variable.
As READ_ONCE() casts to volatile internally, remove the existing cast.
Deduplicate the remaining casts by introducing an intermediary.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/d0299797d6bf747eca2da998c6c6256485a9f52e.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:02 +02:00
Geert Uytterhoeven
55775fe94d m68k: apollo: Make local reset, serial, and irq functions static
When building with W=1:

    arch/m68k/apollo/config.c:132:6: warning: no previous prototype for ‘dn_serial_print’ [-Wmissing-prototypes]
      110 | void dn_serial_print (const char *str)
	  |      ^~~~~~~~~~~~~~~
    arch/m68k/apollo/dn_ints.c:8:14: warning: no previous prototype for ‘apollo_irq_startup’ [-Wmissing-prototypes]
	8 | unsigned int apollo_irq_startup(struct irq_data *data)
	  |              ^~~~~~~~~~~~~~~~~~
    arch/m68k/apollo/dn_ints.c:19:6: warning: no previous prototype for ‘apollo_irq_shutdown’ [-Wmissing-prototypes]
       19 | void apollo_irq_shutdown(struct irq_data *data)
	  |      ^~~~~~~~~~~~~~~~~~~
    arch/m68k/apollo/dn_ints.c:29:6: warning: no previous prototype for ‘apollo_irq_eoi’ [-Wmissing-prototypes]
       29 | void apollo_irq_eoi(struct irq_data *data)
	  |      ^~~~~~~~~~~~~~

Fix this by making all local functions static.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/d2b3a6785d3e80069fea85921c72cf0b7afb8493.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:02 +02:00
Geert Uytterhoeven
93c12e3096 m68k: apollo: Remove unused debug console functions
When building with W=1:

    arch/m68k/apollo/config.c:111:5: warning: no previous prototype for ‘dn_serial_console_wait_key’ [-Wmissing-prototypes]
      111 | int dn_serial_console_wait_key(struct console *co) {
	  |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
    arch/m68k/apollo/config.c:118:6: warning: no previous prototype for ‘dn_serial_console_write’ [-Wmissing-prototypes]
      118 | void dn_serial_console_write (struct console *co, const char *str,unsigned int count)
	  |      ^~~~~~~~~~~~~~~~~~~~~~~
    arch/m68k/apollo/config.c:238:6: warning: no previous prototype for ‘dn_dummy_waitbut’ [-Wmissing-prototypes]
      240 | void dn_dummy_waitbut(void) {
	  |      ^~~~~~~~~~~~~~~~

Fix this by removing these unused functions.
The last user of dn_serial_console_write() was removed in v2.3.41.
The other functions never had any users.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/5da9036914a5c84c20b6af55f1801f0c734a96bb.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:02 +02:00
Geert Uytterhoeven
5642236099 m68k: atari: Add and use "atari.h"
When building with W=1:

    arch/m68k/atari/time.c:59:1: warning: no previous prototype for ‘atari_sched_init’ [-Wmissing-prototypes]
       59 | atari_sched_init(void)
	  | ^~~~~~~~~~~~~~~~
    arch/m68k/atari/time.c:140:5: warning: no previous prototype for ‘atari_mste_hwclk’ [-Wmissing-prototypes]
      140 | int atari_mste_hwclk( int op, struct rtc_time *t )
	  |     ^~~~~~~~~~~~~~~~
    arch/m68k/atari/time.c:199:5: warning: no previous prototype for ‘atari_tt_hwclk’ [-Wmissing-prototypes]
      199 | int atari_tt_hwclk( int op, struct rtc_time *t )
	  |     ^~~~~~~~~~~~~~
    arch/m68k/atari/ataints.c:267:13: warning: no previous prototype for ‘atari_init_IRQ’ [-Wmissing-prototypes]
      267 | void __init atari_init_IRQ(void)
	  |             ^~~~~~~~~~~~~~
    arch/m68k/atari/atasound.c:36:6: warning: no previous prototype for ‘atari_microwire_cmd’ [-Wmissing-prototypes]
       36 | void atari_microwire_cmd (int cmd)
	  |      ^~~~~~~~~~~~~~~~~~~
    arch/m68k/atari/atasound.c:53:6: warning: no previous prototype for ‘atari_mksound’ [-Wmissing-prototypes]
       53 | void atari_mksound (unsigned int hz, unsigned int ticks)
	  |      ^~~~~~~~~~~~~

Fix this by introducing a new header file "atari.h" for holding the
prototypes of functions implemented in arch/m68k/atari/.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/336e4a478ccbfd7e3e91cdbd27636947587a23a6.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:02 +02:00
Geert Uytterhoeven
839ff3451a m68k: atari: Make atari_stram_map_pages() static
When building with W=1:

    arch/m68k/atari/stram.c:118:12: warning: no previous prototype for ‘atari_stram_map_pages’ [-Wmissing-prototypes]
      118 | int __init atari_stram_map_pages(void)
	  |            ^~~~~~~~~~~~~~~~~~~~~

Fix this by making atari_stram_map_pages() static.
There was never a user outside arch/m68k/atari/stram.c.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/fa86b6d7e54d96ac52f574ed00f96e339f46990f.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:02 +02:00
Geert Uytterhoeven
7849b9122e m68k: atari: Make atari_platform_init() static
When building with W=1:

    arch/m68k/atari/config.c:883:12: warning: no previous prototype for ‘atari_platform_init’ [-Wmissing-prototypes]
      883 | int __init atari_platform_init(void)
	  |            ^~~~~~~~~~~~~~~~~~~

Fix this by making atari_platform_init() static.
There was never a user outside arch/m68k/atari/config.c.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/417b46ec1945212c0b1fcc8b0f4074bae9a8b0b4.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:02 +02:00
Geert Uytterhoeven
e9f72cff89 m68k: atari: Make ikbd_reset() static
When building with W=1:

    arch/m68k/atari/atakeyb.c:335:6: warning: no previous prototype for ‘ikbd_reset’ [-Wmissing-prototypes]
      335 | void ikbd_reset(void)
	  |      ^~~~~~~~~~

Fix this by making ikbd_reset() static.
There was never a user outside arch/m68k/atari/atakey.c.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/6babf691fff55f913808ad845e66f60ab00063b2.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:02 +02:00
Geert Uytterhoeven
4ad69503d8 m68k: atari: Document data parameter of stdma_try_lock()
When building with W=1:

    arch/m68k/atari/stdma.c:69: warning: Function parameter or member 'data' not described in 'stdma_try_lock'

Fix this by documenting the data parameter.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/a69dd3ab0a224e40ce5ce7b30981e2d7a0285a83.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:02 +02:00
Geert Uytterhoeven
090c65639a m68k: amiga: Add and use "amiga.h"
When building with W=1:

    arch/m68k/amiga/amisound.c:48:13: warning: no previous prototype for ‘amiga_init_sound’ [-Wmissing-prototypes]
       48 | void __init amiga_init_sound(void)
	  |             ^~~~~~~~~~~~~~~~
    arch/m68k/amiga/amisound.c:71:6: warning: no previous prototype for ‘amiga_mksound’ [-Wmissing-prototypes]
       71 | void amiga_mksound( unsigned int hz, unsigned int ticks )
	  |      ^~~~~~~~~~~~~

Fix this by introducing a new header file "amiga.h" for holding the
prototypes of functions implemented in arch/m68k/amiga/.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/7e9395e1de1c9a34d16ea40a522057f05bbee400.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:02 +02:00
Geert Uytterhoeven
ac0b559132 m68k: amiga: pcmcia: Replace set but not used variable by READ_ONCE()
When building with W=1:

    arch/m68k/amiga/pcmcia.c: In function ‘pcmcia_reset’:
    arch/m68k/amiga/pcmcia.c:29:23: warning: variable ‘b’ set but not used [-Wunused-but-set-variable]
       29 |         unsigned char b;
	  |                       ^

Fix this by using READ_ONCE(), and removing the variable.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/1436fa6b329c2212aaf020055afbb97e64b6f039.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:02 +02:00
Geert Uytterhoeven
45dacf07fb m68k: emu: Mark version[] __maybe_unused
When building with W=1:

    arch/m68k/emu/nfeth.c:42:19: warning: ‘version’ defined but not used [-Wunused-const-variable=]
       42 | static const char version[] =
	  |                   ^~~~~~~

Fix this while obeying the wishes of the original copyright holders by
marking version[] with __maybe_unused.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/051731639b4c8e296ec4017595051885cc551c23.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:02 +02:00
Geert Uytterhoeven
6156086e55 m68k: emu: Remove unused vsnprintf() return value in nfprint()
When building with W=1:

    arch/m68k/emu/natfeat.c: In function ‘nfprint’:
    arch/m68k/emu/natfeat.c:59:13: warning: variable ‘n’ set but not used [-Wunused-but-set-variable]
       59 |         int n;
	  |             ^

As the return value of vsnprintf() is unused, and serves no practical
purpose here, fix this by removing the variable.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/a8b6b17ff352cc560d1848a92d171bb0f44ccb27.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:02 +02:00
Geert Uytterhoeven
217614e937 m68k: mm: Add and use "fault.h"
When building with W=1:

    arch/m68k/mm/fault.c:22:5: warning: no previous prototype for ‘send_fault_sig’ [-Wmissing-prototypes]
       22 | int send_fault_sig(struct pt_regs *regs)
	  |     ^~~~~~~~~~~~~~
    arch/m68k/mm/fault.c:68:5: warning: no previous prototype for ‘do_page_fault’ [-Wmissing-prototypes]
       68 | int do_page_fault(struct pt_regs *regs, unsigned long address,
	  |     ^~~~~~~~~~~~~

Fix this by introducing a new header file "fault.h" for holding the
prototypes of functions implemented in arch/m68k/mm/fault.c.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/ef004b8cfe4aac892aa0fb7714c2ed81a02a9b89.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:02 +02:00
Geert Uytterhoeven
87d7186e61 m68k: mm: Move paging_init() to common <asm/pgtable.h>
When building with W=1:

    arch/m68k/mm/motorola.c:414:13: warning: no previous prototype for ‘paging_init’ [-Wmissing-prototypes]
      414 | void __init paging_init(void)
	  |             ^~~~~~~~~~~
    arch/m68k/mm/sun3mmu.c:36:13: warning: no previous prototype for ‘paging_init’ [-Wmissing-prototypes]
       36 | void __init paging_init(void)
	  |             ^~~~~~~~~~~

Fix this by consolidating the multiple prototypes into the common
<asm/pgtable.h>.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/1b03fde54f205e972e19959b8e335022205d538c.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:02 +02:00
Geert Uytterhoeven
2c0bb8cb99 m68k: mm: Include <asm/hwtest.h> for hwreg_()
When building with W=1:

    arch/m68k/mm/hwtest.c:29:5: warning: no previous prototype for ‘hwreg_present’ [-Wmissing-prototypes]
       29 | int hwreg_present(volatile void *regp)
	  |     ^~~~~~~~~~~~~
    arch/m68k/mm/hwtest.c:62:5: warning: no previous prototype for ‘hwreg_write’ [-Wmissing-prototypes]
       62 | int hwreg_write(volatile void *regp, unsigned short val)
	  |     ^~~~~~~~~~~

Fix this by including <asm/hwtest.h>.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/fbd87d8e8d1e8cbe7d56941a8a1d7d82b53010d0.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:02 +02:00
Geert Uytterhoeven
53cab6a2b3 m68k: kernel: Add and use "vectors.h"
When building with W=1:

    arch/m68k/kernel/vectors.c:52:13: warning: no previous prototype for ‘base_trap_init’ [-Wmissing-prototypes]
       52 | void __init base_trap_init(void)
	  |             ^~~~~~~~~~~~~~

Fix this by introducing a new header file "vectors.h" for holding the
prototypes of functions implemented in arch/m68k/kernel/vectors.c.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/bd0a2f65bc1681dc45e2b24951bd89f9ddbe2eef.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:01 +02:00