From: Pavel Machek <pavel@ucw.cz>
To: alan@redhat.com, kernel list <linux-kernel@vger.kernel.org>
Subject: Kill dead code in ide
Date: Thu, 10 Oct 2002 10:22:59 +0200 [thread overview]
Message-ID: <20021010082259.GA682@elf.ucw.cz> (raw)
Hi!
Old swsusp code somehow creeped into 2.5.X IDE. It is not used by
anything. Here's patch to kill it (we have better replacement in there
;-).
Please apply,
Pavel
--- clean/drivers/ide/ide-disk.c 2002-10-08 21:25:24.000000000 +0200
+++ linux-swsusp/drivers/ide/ide-disk.c 2002-10-08 12:12:39.000000000 +0200
@@ -1795,78 +1795,6 @@
return 0;
}
-ide_startstop_t panic_box(ide_drive_t *drive)
-{
-#if 0
- panic("%s: Attempted to corrupt something: ide operation "
-#else
- printk(KERN_ERR "%s: Attempted to corrupt something: ide operation "
-#endif
- "was pending accross suspend/resume.\n", drive->name);
- return ide_stopped;
-}
-
-int ide_disks_busy(void)
-{
- int i;
- for (i=0; i<MAX_HWIFS; i++) {
- struct hwgroup_s *hwgroup = ide_hwifs[i].hwgroup;
- if (!hwgroup) continue;
- if ((hwgroup->handler) && (hwgroup->handler != panic_box))
- return 1;
- }
- return 0;
-}
-
-void ide_disk_suspend(void)
-{
- int i;
- while (ide_disks_busy()) {
- printk("*");
- schedule();
- }
- for (i=0; i<MAX_HWIFS; i++) {
- struct hwgroup_s *hwgroup = ide_hwifs[i].hwgroup;
-
- if (!hwgroup) continue;
- hwgroup->handler_save = hwgroup->handler;
- hwgroup->handler = panic_box;
- }
- driver_blocked = 1;
- if (ide_disks_busy())
- panic("How did you get that request through?!");
-}
-
-/* unsuspend and resume should be equal in the ideal world */
-
-void ide_disk_unsuspend(void)
-{
- int i;
- for (i=0; i<MAX_HWIFS; i++) {
- struct hwgroup_s *hwgroup = ide_hwifs[i].hwgroup;
-
- if (!hwgroup) continue;
- hwgroup->handler = NULL; /* hwgroup->handler_save; */
- hwgroup->handler_save = NULL;
- }
- driver_blocked = 0;
-}
-
-void ide_disk_resume(void)
-{
- int i;
- for (i=0; i<MAX_HWIFS; i++) {
- struct hwgroup_s *hwgroup = ide_hwifs[i].hwgroup;
-
- if (!hwgroup) continue;
- if (hwgroup->handler != panic_box)
- panic("Handler was not set to panic?");
- hwgroup->handler_save = NULL;
- hwgroup->handler = NULL;
- }
- driver_blocked = 0;
-}
-
module_init(idedisk_init);
module_exit(idedisk_exit);
MODULE_LICENSE("GPL");
--
Worst form of spam? Adding advertisment signatures ala sourceforge.net.
What goes next? Inserting advertisment *into* email?
reply other threads:[~2002-10-10 8:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20021010082259.GA682@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=alan@redhat.com \
--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