linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-raid@vger.kernel.org
Subject: Re: [PATCH] md: stop defining MAJOR_NR
Date: Thu, 5 Mar 2009 13:41:30 +1100	[thread overview]
Message-ID: <18863.15322.43861.564018@notabene.brown> (raw)
In-Reply-To: message from Christoph Hellwig on Tuesday March 3

On Tuesday March 3, hch@lst.de wrote:
> MAJOR_NR was only required for magic in linux/blk.h in 2.4 or earlier
> kernels, so no need to keep it around.

Thanks.  Applied.  Should be in -next shortly.

NeilBrown

> 
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> 
> Index: linux-2.6/drivers/md/md.c
> ===================================================================
> --- linux-2.6.orig/drivers/md/md.c	2009-02-27 17:44:32.351286370 +0100
> +++ linux-2.6/drivers/md/md.c	2009-02-27 17:44:51.547286608 +0100
> @@ -46,8 +46,6 @@
>  #include <linux/file.h>
>  #include <linux/delay.h>
>  
> -#define MAJOR_NR MD_MAJOR
> -
>  /* 63 partitions with the alternate major number (mdp) */
>  #define MdpMinorShift 6
>  
> @@ -6464,13 +6462,13 @@ static void md_geninit(void)
>  
>  static int __init md_init(void)
>  {
> -	if (register_blkdev(MAJOR_NR, "md"))
> +	if (register_blkdev(MD_MAJOR, "md"))
>  		return -1;
>  	if ((mdp_major=register_blkdev(0, "mdp"))<=0) {
> -		unregister_blkdev(MAJOR_NR, "md");
> +		unregister_blkdev(MD_MAJOR, "md");
>  		return -1;
>  	}
> -	blk_register_region(MKDEV(MAJOR_NR, 0), 1UL<<MINORBITS, THIS_MODULE,
> +	blk_register_region(MKDEV(MD_MAJOR, 0), 1UL<<MINORBITS, THIS_MODULE,
>  			    md_probe, NULL, NULL);
>  	blk_register_region(MKDEV(mdp_major, 0), 1UL<<MINORBITS, THIS_MODULE,
>  			    md_probe, NULL, NULL);
> @@ -6556,10 +6554,10 @@ static __exit void md_exit(void)
>  	mddev_t *mddev;
>  	struct list_head *tmp;
>  
> -	blk_unregister_region(MKDEV(MAJOR_NR,0), 1U << MINORBITS);
> +	blk_unregister_region(MKDEV(MD_MAJOR,0), 1U << MINORBITS);
>  	blk_unregister_region(MKDEV(mdp_major,0), 1U << MINORBITS);
>  
> -	unregister_blkdev(MAJOR_NR,"md");
> +	unregister_blkdev(MD_MAJOR,"md");
>  	unregister_blkdev(mdp_major, "mdp");
>  	unregister_reboot_notifier(&md_notifier);
>  	unregister_sysctl_table(raid_table_header);

      reply	other threads:[~2009-03-05  2:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-03 17:58 [PATCH] md: stop defining MAJOR_NR Christoph Hellwig
2009-03-05  2:41 ` Neil Brown [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=18863.15322.43861.564018@notabene.brown \
    --to=neilb@suse.de \
    --cc=hch@lst.de \
    --cc=linux-raid@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).