The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] Rewrite the MAJOR() macro as a call to imajor().
@ 2007-04-28 10:23 Robert P. J. Day
  2007-05-04  6:18 ` Andrew Morton
  0 siblings, 1 reply; 8+ messages in thread
From: Robert P. J. Day @ 2007-04-28 10:23 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: Andrew Morton


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;
 }

 static int loop_set_fd(struct loop_device *lo, struct file *lo_file,
-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-05-04 12:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox