linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: linux-m68k@vger.kernel.org, linux-kernel@vger.kernel.org,
	Adrian Bunk <bunk@kernel.org>
Subject: [patch 17/29] m68k/atari/debug.c: possible cleanups
Date: Thu, 17 Jul 2008 21:16:24 +0200	[thread overview]
Message-ID: <20080717191754.149215226@mail.of.borg> (raw)
In-Reply-To: 20080717191607.955742542@mail.of.borg

[-- Attachment #1: m68k-atari-debug.c-possible-cleanups.diff --]
[-- Type: text/plain, Size: 4127 bytes --]

From: Adrian Bunk <bunk@kernel.org>

This patch contains the following possible cleanups:
- make the following needlessly global functions (always) static:
  - atari_mfp_console_write()
  - atari_scc_console_write()
  - atari_midi_console_write()
  - atari_init_mfp_port()
  - atari_init_scc_port()
  - atari_init_midi_port()
- #if 0 the following unused functions:
  - atari_mfp_console_wait_key()
  - atari_scc_console_wait_key()
  - atari_midi_console_wait_key()
- remove the following unused variables:
  - atari_MFP_init_done
  - atari_SCC_init_done

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 arch/m68k/atari/debug.c |   37 +++++++------------------------------
 1 file changed, 7 insertions(+), 30 deletions(-)

--- a/arch/m68k/atari/debug.c
+++ b/arch/m68k/atari/debug.c
@@ -20,14 +20,6 @@
 #include <asm/atarihw.h>
 #include <asm/atariints.h>
 
-/* Flag that Modem1 port is already initialized and used */
-int atari_MFP_init_done;
-EXPORT_SYMBOL(atari_MFP_init_done);
-
-/* Flag that Modem1 port is already initialized and used */
-int atari_SCC_init_done;
-EXPORT_SYMBOL(atari_SCC_init_done);
-
 /* Can be set somewhere, if a SCC master reset has already be done and should
  * not be repeated; used by kgdb */
 int atari_SCC_reset_done;
@@ -47,8 +39,8 @@ static inline void ata_mfp_out(char c)
 	mfp.usart_dta = c;
 }
 
-void atari_mfp_console_write(struct console *co, const char *str,
-			     unsigned int count)
+static void atari_mfp_console_write(struct console *co, const char *str,
+				    unsigned int count)
 {
 	while (count--) {
 		if (*str == '\n')
@@ -66,8 +58,8 @@ static inline void ata_scc_out(char c)
 	scc.cha_b_data = c;
 }
 
-void atari_scc_console_write(struct console *co, const char *str,
-			     unsigned int count)
+static void atari_scc_console_write(struct console *co, const char *str,
+				    unsigned int count)
 {
 	while (count--) {
 		if (*str == '\n')
@@ -83,8 +75,8 @@ static inline void ata_midi_out(char c)
 	acia.mid_data = c;
 }
 
-void atari_midi_console_write(struct console *co, const char *str,
-			      unsigned int count)
+static void atari_midi_console_write(struct console *co, const char *str,
+				     unsigned int count)
 {
 	while (count--) {
 		if (*str == '\n')
@@ -136,7 +128,7 @@ static void atari_par_console_write(stru
 	}
 }
 
-#ifdef CONFIG_SERIAL_CONSOLE
+#if 0
 int atari_mfp_console_wait_key(struct console *co)
 {
 	while (!(mfp.rcv_stat & 0x80))	/* wait for rx buf filled */
@@ -166,11 +158,7 @@ int atari_midi_console_wait_key(struct c
  * SCC serial ports. They're used by the debugging interface, kgdb, and the
  * serial console code.
  */
-#ifndef CONFIG_SERIAL_CONSOLE
 static void __init atari_init_mfp_port(int cflag)
-#else
-void atari_init_mfp_port(int cflag)
-#endif
 {
 	/*
 	 * timer values for 1200...115200 bps; > 38400 select 110, 134, or 150
@@ -193,8 +181,6 @@ void atari_init_mfp_port(int cflag)
 	mfp.tim_dt_d = baud_table[baud];
 	mfp.tim_ct_cd |= 0x01;		/* start timer D, 1:4 */
 	mfp.trn_stat |= 0x01;		/* enable TX */
-
-	atari_MFP_init_done = 1;
 }
 
 #define SCC_WRITE(reg, val)				\
@@ -214,11 +200,7 @@ void atari_init_mfp_port(int cflag)
 			MFPDELAY();			\
 	} while (0)
 
-#ifndef CONFIG_SERIAL_CONSOLE
 static void __init atari_init_scc_port(int cflag)
-#else
-void atari_init_scc_port(int cflag)
-#endif
 {
 	extern int atari_SCC_reset_done;
 	static int clksrc_table[9] =
@@ -277,14 +259,9 @@ void atari_init_scc_port(int cflag)
 	SCC_WRITE(5, reg5 | 8);
 
 	atari_SCC_reset_done = 1;
-	atari_SCC_init_done = 1;
 }
 
-#ifndef CONFIG_SERIAL_CONSOLE
 static void __init atari_init_midi_port(int cflag)
-#else
-void atari_init_midi_port(int cflag)
-#endif
 {
 	int baud = cflag & CBAUD;
 	int csize = ((cflag & CSIZE) == CS8) ? 0x10 : 0x00;

-- 
Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


  parent reply	other threads:[~2008-07-17 19:31 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-17 19:16 [patch 00/29] m68k patches for 2.6.27 Geert Uytterhoeven
2008-07-17 19:16 ` [patch 01/29] m68k: remove CVS keywords Geert Uytterhoeven
2008-07-17 19:16 ` [patch 02/29] ariadne: use netstats in net_device structure Geert Uytterhoeven
2008-07-17 19:45   ` Jeff Garzik
2008-07-17 19:16 ` [patch 03/29] m68k: Return -ENODEV if no device is found Geert Uytterhoeven
2008-07-17 19:16 ` [patch 04/29] m68k: vmlinux-std/sun3.lds.S cleanup - use PAGE_SIZE macro Geert Uytterhoeven
2008-07-17 19:16 ` [patch 05/29] m68k: Allow no CPU/platform type for allnoconfig Geert Uytterhoeven
2008-07-17 19:16 ` [patch 06/29] m68k: remove -traditional Geert Uytterhoeven
2008-07-17 19:16 ` [patch 07/29] m68k: make multi_defconfig the default defconfig Geert Uytterhoeven
2008-07-17 19:16 ` [patch 08/29] m68k: remove AP1000 code Geert Uytterhoeven
2008-07-17 19:16 ` [patch 09/29] ZORRO: Replace deprecated __initcall with equivalent device_initcall Geert Uytterhoeven
2008-07-17 19:16 ` [patch 10/29] zorro: use memory_read_from_buffer Geert Uytterhoeven
2008-07-17 19:16 ` [patch 11/29] amifb: Register Amiga-specific video modes with sysfs Geert Uytterhoeven
2008-07-17 19:16 ` [patch 12/29] atafb: Register Atari-specific " Geert Uytterhoeven
2008-07-17 19:16 ` [patch 13/29] drivers/video/c2p.c: add MODULE_LICENSE Geert Uytterhoeven
2008-07-17 19:16 ` [patch 14/29] export amiga_vblank Geert Uytterhoeven
2008-07-17 19:16 ` [patch 15/29] export c2p Geert Uytterhoeven
2008-07-17 19:16 ` [patch 16/29] m68k/amiga/: possible cleanups Geert Uytterhoeven
2008-07-17 19:16 ` Geert Uytterhoeven [this message]
2008-07-20 20:06   ` [patch 17/29] m68k/atari/debug.c: " Michael Schmitz
2008-07-21  0:11     ` Geert Uytterhoeven
2008-07-17 19:16 ` [patch 18/29] m68k/mac/: " Geert Uytterhoeven
2008-07-17 19:16 ` [patch 19/29] m68k/q40/config.c: make functions static Geert Uytterhoeven
2008-07-17 19:16 ` [patch 20/29] m68k/sun3/: possible cleanups Geert Uytterhoeven
2008-07-17 19:16 ` [patch 21/29] m68k: remove stale ARCH_SUN4 #define Geert Uytterhoeven
2008-07-17 19:16 ` [patch 22/29] m68k/apollo: Add missing call to apollo_parse_bootinfo() Geert Uytterhoeven
2008-07-17 19:16 ` [patch 23/29] m68k/Mac: remove the unused ADB_KEYBOARD option Geert Uytterhoeven
2008-07-17 19:16 ` [patch 24/29] m68k/Atari: remove the dead ATARI_SCC{,_DMA} options Geert Uytterhoeven
2008-07-17 19:16 ` [patch 25/29] m68k/Apollo: remove the unused APOLLO_ELPLUS option Geert Uytterhoeven
2008-07-17 19:16 ` [patch 26/29] arch/m68k/mm/motorola.c: Eliminate NULL test and memset after alloc_bootmem Geert Uytterhoeven
2008-07-17 19:16 ` [patch 27/29] arch/m68k/mm/sun3mmu.c: " Geert Uytterhoeven
2008-07-17 19:16 ` [patch 28/29] dio: use dio_match_device() in dio_bus_match() Geert Uytterhoeven
2008-07-17 19:16 ` [patch 29/29] initrd: Fix virtual/physical mix-up in overwrite test Geert Uytterhoeven
2008-07-24 15:35   ` Atsushi Nemoto
2008-07-24 18:49     ` Geert Uytterhoeven
2008-07-25 16:27       ` Atsushi Nemoto
2008-07-25 19:22         ` Geert Uytterhoeven
2008-07-26 14:46           ` Atsushi Nemoto

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=20080717191754.149215226@mail.of.borg \
    --to=geert@linux-m68k.org \
    --cc=akpm@linux-foundation.org \
    --cc=bunk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).