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 16/29] m68k/amiga/: possible cleanups
Date: Thu, 17 Jul 2008 21:16:23 +0200 [thread overview]
Message-ID: <20080717191753.849409197@mail.of.borg> (raw)
In-Reply-To: 20080717191607.955742542@mail.of.borg
[-- Attachment #1: m68k-amiga-possible-cleanups.diff --]
[-- Type: text/plain, Size: 4469 bytes --]
From: Adrian Bunk <bunk@kernel.org>
This patch contains the following possible cleanups:
- amiints.c: add a proper prototype for amiga_init_IRQ() in
include/asm-m68k/amigaints.h
- make the following needlessly global code static:
- config.c: amiga_model
- config.c: amiga_psfreq
- config.c: amiga_serial_console_write()
- #if 0 the following unused functions:
- config.c: amiga_serial_puts()
- config.c: amiga_serial_console_wait_key()
- config.c: amiga_serial_gets()
- remove the following unused variable:
- config.c: amiga_masterclock
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
arch/m68k/amiga/config.c | 20 ++++++--------------
include/asm-m68k/amigahw.h | 4 ----
include/asm-m68k/amigaints.h | 2 ++
3 files changed, 8 insertions(+), 18 deletions(-)
--- a/arch/m68k/amiga/config.c
+++ b/arch/m68k/amiga/config.c
@@ -36,14 +36,11 @@
#include <asm/machdep.h>
#include <asm/io.h>
-unsigned long amiga_model;
-EXPORT_SYMBOL(amiga_model);
+static unsigned long amiga_model;
unsigned long amiga_eclock;
EXPORT_SYMBOL(amiga_eclock);
-unsigned long amiga_masterclock;
-
unsigned long amiga_colorclock;
EXPORT_SYMBOL(amiga_colorclock);
@@ -53,7 +50,7 @@ EXPORT_SYMBOL(amiga_chipset);
unsigned char amiga_vblank;
EXPORT_SYMBOL(amiga_vblank);
-unsigned char amiga_psfreq;
+static unsigned char amiga_psfreq;
struct amiga_hw_present amiga_hw_present;
EXPORT_SYMBOL(amiga_hw_present);
@@ -94,8 +91,6 @@ static char *amiga_models[] __initdata =
static char amiga_model_name[13] = "Amiga ";
static void amiga_sched_init(irq_handler_t handler);
-/* amiga specific irq functions */
-extern void amiga_init_IRQ(void);
static void amiga_get_model(char *model);
static int amiga_get_hardware_list(char *buffer);
/* amiga specific timer functions */
@@ -109,8 +104,6 @@ static void amiga_reset(void);
extern void amiga_init_sound(void);
static void amiga_mem_console_write(struct console *co, const char *b,
unsigned int count);
-void amiga_serial_console_write(struct console *co, const char *s,
- unsigned int count);
#ifdef CONFIG_HEARTBEAT
static void amiga_heartbeat(int on);
#endif
@@ -420,8 +413,7 @@ void __init config_amiga(void)
mach_heartbeat = amiga_heartbeat;
#endif
- /* Fill in the clock values (based on the 700 kHz E-Clock) */
- amiga_masterclock = 40*amiga_eclock; /* 28 MHz */
+ /* Fill in the clock value (based on the 700 kHz E-Clock) */
amiga_colorclock = 5*amiga_eclock; /* 3.5 MHz */
/* clear all DMA bits */
@@ -819,8 +811,8 @@ static void amiga_serial_putc(char c)
;
}
-void amiga_serial_console_write(struct console *co, const char *s,
- unsigned int count)
+static void amiga_serial_console_write(struct console *co, const char *s,
+ unsigned int count)
{
while (count--) {
if (*s == '\n')
@@ -829,7 +821,7 @@ void amiga_serial_console_write(struct c
}
}
-#ifdef CONFIG_SERIAL_CONSOLE
+#if 0
void amiga_serial_puts(const char *s)
{
amiga_serial_console_write(NULL, s, strlen(s));
--- a/include/asm-m68k/amigahw.h
+++ b/include/asm-m68k/amigahw.h
@@ -22,8 +22,6 @@
* Different Amiga models
*/
-extern unsigned long amiga_model;
-
#define AMI_UNKNOWN (0)
#define AMI_500 (1)
#define AMI_500PLUS (2)
@@ -59,11 +57,9 @@ extern unsigned long amiga_chipset;
*/
extern unsigned long amiga_eclock; /* 700 kHz E Peripheral Clock */
-extern unsigned long amiga_masterclock; /* 28 MHz Master Clock */
extern unsigned long amiga_colorclock; /* 3.5 MHz Color Clock */
extern unsigned long amiga_chip_size; /* Chip RAM Size (bytes) */
extern unsigned char amiga_vblank; /* VBLANK Frequency */
-extern unsigned char amiga_psfreq; /* Power Supply Frequency */
#define AMIGAHW_DECLARE(name) unsigned name : 1
--- a/include/asm-m68k/amigaints.h
+++ b/include/asm-m68k/amigaints.h
@@ -98,6 +98,8 @@
#define CIA_ICR_ALL 0x1f
#define CIA_ICR_SETCLR 0x80
+extern void amiga_init_IRQ(void);
+
/* to access the interrupt control registers of CIA's use only
** these functions, they behave exactly like the amiga os routines
*/
--
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
next prev 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 ` Geert Uytterhoeven [this message]
2008-07-17 19:16 ` [patch 17/29] m68k/atari/debug.c: possible cleanups Geert Uytterhoeven
2008-07-20 20:06 ` 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=20080717191753.849409197@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).