From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: linux-ide@vger.kernel.org
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 8/8] ide: cleanup init_ide_data()
Date: Sat, 22 Mar 2008 23:07:15 +0100 [thread overview]
Message-ID: <20080322220715.17636.8976.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20080322220623.17636.44337.sendpatchset@localhost.localdomain>
* Remove no longer need init_ide_data() call from ide_setup().
* Cleanup init_ide_data().
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ide/ide.c | 24 ------------------------
1 file changed, 24 deletions(-)
Index: b/drivers/ide/ide.c
===================================================================
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -157,32 +157,9 @@ static void ide_port_init_devices_data(i
}
}
-/*
- * init_ide_data() sets reasonable default values into all fields
- * of all instances of the hwifs and drives, but only on the first call.
- * Subsequent calls have no effect (they don't wipe out anything).
- *
- * This routine is normally called at driver initialization time,
- * but may also be called MUCH earlier during kernel "command-line"
- * parameter processing. As such, we cannot depend on any other parts
- * of the kernel (such as memory allocation) to be functioning yet.
- *
- * This is too bad, as otherwise we could dynamically allocate the
- * ide_drive_t structs as needed, rather than always consuming memory
- * for the max possible number (MAX_HWIFS * MAX_DRIVES) of them.
- *
- * FIXME: We should stuff the setup data into __init and copy the
- * relevant hwifs/allocate them properly during boot.
- */
-#define MAGIC_COOKIE 0x12345678
static void __init init_ide_data (void)
{
unsigned int index;
- static unsigned long magic_cookie = MAGIC_COOKIE;
-
- if (magic_cookie != MAGIC_COOKIE)
- return; /* already initialized */
- magic_cookie = 0;
/* Initialise all interface structures */
for (index = 0; index < MAX_HWIFS; ++index) {
@@ -733,7 +710,6 @@ EXPORT_SYMBOL(generic_ide_ioctl);
static int __init ide_setup(char *s)
{
printk(KERN_INFO "ide_setup: %s", s);
- init_ide_data ();
#ifdef CONFIG_BLK_DEV_IDEDOUBLER
if (!strcmp(s, "ide=doubler")) {
prev parent reply other threads:[~2008-03-22 21:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-22 22:06 [PATCH 1/8] ide: always auto-tune PIO in legacy VLB host drivers Bartlomiej Zolnierkiewicz
2008-03-22 22:06 ` [PATCH 2/8] cmd640: always auto-tune PIO Bartlomiej Zolnierkiewicz
2008-03-22 22:06 ` [PATCH 3/8] ide: remove IDE_HFLAG_NO_AUTOTUNE host flag Bartlomiej Zolnierkiewicz
2008-03-25 16:49 ` Sergei Shtylyov
2008-03-22 22:06 ` [PATCH 4/8] ide: remove obsoleted "hdx=autotune" kernel parameter Bartlomiej Zolnierkiewicz
2008-03-22 22:06 ` [PATCH 5/8] ide: add "nodma|noflush|noprobe|nowerr=" parameters Bartlomiej Zolnierkiewicz
2008-03-22 22:07 ` [PATCH 6/8] ide: add "cdrom=" and "chs=" parameters Bartlomiej Zolnierkiewicz
2008-03-22 22:07 ` [PATCH 7/8] ide: remove obsoleted "hdx=" kernel parameters Bartlomiej Zolnierkiewicz
2008-03-22 22:07 ` Bartlomiej Zolnierkiewicz [this message]
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=20080322220715.17636.8976.sendpatchset@localhost.localdomain \
--to=bzolnier@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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).