All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mikael Pettersson <mikpe@csd.uu.se>
To: marcelo@conectiva.com.br
Cc: alan@lxorguk.ukuu.org.uk, linux-kernel@vger.kernel.org
Subject: Re: 2.4.21-pre1 broke the ide-tape driver
Date: Fri, 20 Dec 2002 19:04:01 +0100 (MET)	[thread overview]
Message-ID: <200212201804.TAA12661@harpo.it.uu.se> (raw)

On Thu, 19 Dec 2002 18:08:15 -0200 (BRST), Marcelo Tosatti wrote:
>> - ide-disk/ide-floppy do the test&call inside the loop rather than after,
>>   so possibly the call should be moved into the loop, and augmented
>>   to be "if (drive && drive->proc) ide_remove_proc_entries(...)".
>
>Yes... here is a patch which moves the ide_remove_proc_entries inside the
>detection loop. Without ide_remove_proc_entries inside the loop we would
>also not unregister more than one device /proc entries, too.
>
>Please test it, works for me.

Tested. Works for me too.

/Mikael

>
>--- linux-bk/drivers/ide/ide-tape.c	2002-12-19 18:05:07.000000000 -0200
>+++ linux-2.4.21/drivers/ide/ide-tape.c	2002-12-19 17:59:39.000000000 -0200
>@@ -6597,14 +6597,16 @@
>
> 	for (minor = 0; minor < MAX_HWIFS * MAX_DRIVES; minor++) {
> 		drive = idetape_chrdevs[minor].drive;
>-		if (drive != NULL && idetape_cleanup(drive))
>-			printk(KERN_ERR "ide-tape: %s: cleanup_module() "
>-				"called while still busy\n", drive->name);
>-	}
>+		if (drive) {
>+			if (idetape_cleanup(drive))
>+				printk(KERN_ERR "ide-tape: %s: cleanup_module() "
>+					"called while still busy\n", drive->name);
> #ifdef CONFIG_PROC_FS
>-	if (drive->proc)
>-		ide_remove_proc_entries(drive->proc, idetape_proc);
>+			if (drive->proc)
>+				ide_remove_proc_entries(drive->proc, idetape_proc);
> #endif
>+		}
>+	}
>
> 	ide_unregister_module(&idetape_module);
> }
>

             reply	other threads:[~2002-12-20 17:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-20 18:04 Mikael Pettersson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-12-16 23:27 2.4.21-pre1 broke the ide-tape driver Mikael Pettersson
2002-12-19 20:08 ` Marcelo Tosatti
2002-12-16 22:18 Mikael Pettersson
2002-12-15 23:38 Mikael Pettersson
2002-12-16 14:53 ` Alan Cox
2002-12-15 15:37 Mikael Pettersson
2002-12-15  1:19 Mikael Pettersson
2002-12-15  1:23 ` Marc-Christian Petersen

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=200212201804.TAA12661@harpo.it.uu.se \
    --to=mikpe@csd.uu.se \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.