The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: "Robert P. J. Day" <rpjday@mindspring.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Rewrite the MAJOR() macro as a call to imajor().
Date: Thu, 3 May 2007 23:18:14 -0700	[thread overview]
Message-ID: <20070503231814.e12ad2d7.akpm@linux-foundation.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0704280621350.516@localhost.localdomain>

On Sat, 28 Apr 2007 06:23:54 -0400 (EDT) "Robert P. J. Day" <rpjday@mindspring.com> wrote:

> Replace the MAJOR() macro invocation with a call to the inline
> imajor() routine.
> 
> Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
> 
> ---
> 
> diff --git a/drivers/block/loop.c b/drivers/block/loop.c
> index 6b5b642..08da15b 100644
> --- a/drivers/block/loop.c
> +++ b/drivers/block/loop.c
> @@ -710,7 +710,7 @@ static inline int is_loop_device(struct file *file)
>  {
>  	struct inode *i = file->f_mapping->host;
> 
> -	return i && S_ISBLK(i->i_mode) && MAJOR(i->i_rdev) == LOOP_MAJOR;
> +	return i && S_ISBLK(i->i_mode) && imajor(i) == LOOP_MAJOR;
>  }

there's no runtime change, and I count a couple hundred MAJORs in the tree.

I don't want to receive 200 one-line patches please.  If you're going to
do this then please do decent-sized per-subsystem patches and see if you can
persuade the subsystem maintainers to take them directly.

  reply	other threads:[~2007-05-04  6:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-28 10:23 [PATCH] Rewrite the MAJOR() macro as a call to imajor() Robert P. J. Day
2007-05-04  6:18 ` Andrew Morton [this message]
2007-05-04  7:20   ` Robert P. J. Day
2007-05-04  8:09   ` Jan Engelhardt
2007-05-04  8:14     ` Robert P. J. Day
2007-05-04 11:42       ` Jan Engelhardt
2007-05-04 12:21         ` Robert P. J. Day
2007-05-04 12:34           ` Jan Engelhardt

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=20070503231814.e12ad2d7.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rpjday@mindspring.com \
    /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