diff mbox series

[2/4] ARM: footbridge: remove leftover from personal-server

Message ID 20220818211550.3272321-3-arnd@kernel.org (mailing list archive)
State New, archived
Headers show
Series ARM: footbridge: cleanups | expand

Commit Message

Arnd Bergmann Aug. 18, 2022, 9:15 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de>

The machine was removed a while ago, and the checks are
now useless.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-footbridge/isa.c | 11 +++++------
 drivers/tty/serial/21285.c     |  3 ---
 2 files changed, 5 insertions(+), 9 deletions(-)

Comments

Christoph Hellwig Aug. 21, 2022, 5:55 a.m. UTC | #1
On Thu, Aug 18, 2022 at 11:15:48PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The machine was removed a while ago, and the checks are
> now useless.

Curious, should entries for removed machines be kept in the mach-types
file?  Because that makes it really easy to leave dead code like this
around.

The patch itself looks fine:

Reviewed-by: Christoph Hellwig <hch@lst.de>
Arnd Bergmann Aug. 24, 2022, 10:37 a.m. UTC | #2
On Sun, Aug 21, 2022 at 7:55 AM Christoph Hellwig <hch@lst.de> wrote:
>
> On Thu, Aug 18, 2022 at 11:15:48PM +0200, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > The machine was removed a while ago, and the checks are
> > now useless.
>
> Curious, should entries for removed machines be kept in the mach-types
> file?  Because that makes it really easy to leave dead code like this
> around.

A long time ago it was common to add the entries in mach-types before
the Kconfig symbol got merged, an  Russell just updated the list
periodically to drop stale entries. As we remove most board files in
a coming release, we should probably do this as part of the bigger
cleanup then.

        Arnd
Russell King (Oracle) Aug. 24, 2022, 10:47 a.m. UTC | #3
On Wed, Aug 24, 2022 at 12:37:15PM +0200, Arnd Bergmann wrote:
> On Sun, Aug 21, 2022 at 7:55 AM Christoph Hellwig <hch@lst.de> wrote:
> >
> > On Thu, Aug 18, 2022 at 11:15:48PM +0200, Arnd Bergmann wrote:
> > > From: Arnd Bergmann <arnd@arndb.de>
> > >
> > > The machine was removed a while ago, and the checks are
> > > now useless.
> >
> > Curious, should entries for removed machines be kept in the mach-types
> > file?  Because that makes it really easy to leave dead code like this
> > around.
> 
> A long time ago it was common to add the entries in mach-types before
> the Kconfig symbol got merged, an  Russell just updated the list
> periodically to drop stale entries. As we remove most board files in
> a coming release, we should probably do this as part of the bigger
> cleanup then.

The scripting I have for it doesn't understand "board was removed from
the kernel" so if I ever run the script in the future (unlikely) it'll
get re-added.
diff mbox series

Patch

diff --git a/arch/arm/mach-footbridge/isa.c b/arch/arm/mach-footbridge/isa.c
index 3375ac23c046..84caccddce44 100644
--- a/arch/arm/mach-footbridge/isa.c
+++ b/arch/arm/mach-footbridge/isa.c
@@ -80,12 +80,11 @@  static int __init footbridge_isa_init(void)
 	int err = 0;
 
 	/* Personal server doesn't have RTC */
-	if (!machine_is_personal_server()) {
-		isa_rtc_init();
-		err = platform_device_register(&rtc_device);
-		if (err)
-			printk(KERN_ERR "Unable to register RTC device: %d\n", err);
-	}
+	isa_rtc_init();
+	err = platform_device_register(&rtc_device);
+	if (err)
+		printk(KERN_ERR "Unable to register RTC device: %d\n", err);
+
 	err = platform_device_register(&serial_device);
 	if (err)
 		printk(KERN_ERR "Unable to register serial device: %d\n", err);
diff --git a/drivers/tty/serial/21285.c b/drivers/tty/serial/21285.c
index 7520cc02fd4d..65d6af755567 100644
--- a/drivers/tty/serial/21285.c
+++ b/drivers/tty/serial/21285.c
@@ -461,9 +461,6 @@  static int __init serial21285_console_setup(struct console *co, char *options)
 	int parity = 'n';
 	int flow = 'n';
 
-	if (machine_is_personal_server())
-		baud = 57600;
-
 	/*
 	 * Check whether an invalid uart number has been specified, and
 	 * if so, search for the first available port that does have