All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russ Anderson <rja@sgi.com>
To: "H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@elte.hu>,
	tglx@linutronix.de, linux-kernel@vger.kernel.org
Cc: Dean Nelson <dnelson@redhat.com>, Russ Anderson <rja@sgi.com>
Subject: [bigfix] x86, msr/cpuid: Pass the number of minors when unregistering MSR and CPUID drivers.
Date: Tue, 26 Jan 2010 20:37:22 -0600	[thread overview]
Message-ID: <20100127023722.GA22305@sgi.com> (raw)

Pass the number of minors when unregistering MSR and CPUID drivers.

Reported-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: Russ Anderson <rja@sgi.com>

---
While code reviewing the patch "x86, msr/cpuid: Register enough minors for
the MSR and CPUID drivers", Dean noticed the number of minors not being
passed when unregistering in the *_exit functions.

 arch/x86/kernel/cpuid.c |    2 +-
 arch/x86/kernel/msr.c   |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Index: linux/arch/x86/kernel/cpuid.c
===================================================================
--- linux.orig/arch/x86/kernel/cpuid.c	2010-01-26 15:23:38.000000000 -0600
+++ linux/arch/x86/kernel/cpuid.c	2010-01-26 15:30:15.000000000 -0600
@@ -234,7 +234,7 @@ static void __exit cpuid_exit(void)
 	for_each_online_cpu(cpu)
 		cpuid_device_destroy(cpu);
 	class_destroy(cpuid_class);
-	unregister_chrdev(CPUID_MAJOR, "cpu/cpuid");
+	__unregister_chrdev(CPUID_MAJOR, 0, NR_CPUS, "cpu/cpuid");
 	unregister_hotcpu_notifier(&cpuid_class_cpu_notifier);
 }
 
Index: linux/arch/x86/kernel/msr.c
===================================================================
--- linux.orig/arch/x86/kernel/msr.c	2010-01-26 15:23:38.000000000 -0600
+++ linux/arch/x86/kernel/msr.c	2010-01-26 15:30:38.000000000 -0600
@@ -290,7 +290,7 @@ static void __exit msr_exit(void)
 	for_each_online_cpu(cpu)
 		msr_device_destroy(cpu);
 	class_destroy(msr_class);
-	unregister_chrdev(MSR_MAJOR, "cpu/msr");
+	__unregister_chrdev(MSR_MAJOR, 0, NR_CPUS, "cpu/msr");
 	unregister_hotcpu_notifier(&msr_class_cpu_notifier);
 }
 
-- 
Russ Anderson, OS RAS/Partitioning Project Lead  
SGI - Silicon Graphics Inc          rja@sgi.com

             reply	other threads:[~2010-01-27  2:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-27  2:37 Russ Anderson [this message]
2010-01-27  8:18 ` [tip:x86/urgent] x86, msr/cpuid: Pass the number of minors when unregistering MSR and CPUID drivers tip-bot for Russ Anderson

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=20100127023722.GA22305@sgi.com \
    --to=rja@sgi.com \
    --cc=dnelson@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /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.