public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Patch?: linux-2.5.2-pre8/fs/reiserfs kdev_t compilation fixes
@ 2002-01-05 13:19 Adam J. Richter
  2002-01-05 14:01 ` [reiserfs-dev] " Hans Reiser
  0 siblings, 1 reply; 2+ messages in thread
From: Adam J. Richter @ 2002-01-05 13:19 UTC (permalink / raw)
  To: reiserfs-dev, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 618 bytes --]

	The following patch gets linux-2.5.2-pre8/fs/reiserfs to
compile.  I suspect that a lot of the conversion back and forth
between integers and kdev_t that I have accomodated could possibly
be eliminated by someone who understands the fs/reiserfs better.

	I have not tested this patch in any way.  I only know that
it compiles.

-- 
Adam J. Richter     __     ______________   4880 Stevens Creek Blvd, Suite 104
adam@yggdrasil.com     \ /                  San Jose, California 95129-1034
+1 408 261-6630         | g g d r a s i l   United States of America
fax +1 408 261-6631      "Free Software For The Rest Of Us."

[-- Attachment #2: reiserfs.diff --]
[-- Type: text/plain, Size: 2568 bytes --]

Only in linux/fs/reiserfs: CVS
diff -u -r linux-2.5.2-pre8/fs/reiserfs/procfs.c linux/fs/reiserfs/procfs.c
--- linux-2.5.2-pre8/fs/reiserfs/procfs.c	Fri Jan  4 19:40:37 2002
+++ linux/fs/reiserfs/procfs.c	Sat Jan  5 05:12:34 2002
@@ -77,7 +77,7 @@
 	int len = 0;
 	struct super_block *sb;
     
-	sb = procinfo_prologue( ( kdev_t ) ( int ) data );
+	sb = procinfo_prologue( to_kdev_t((int)data) );
 	if( sb == NULL )
 		return -ENOENT;
 	len += sprintf( &buffer[ len ], "%s format\twith checks %s\n",
@@ -134,7 +134,7 @@
 	struct reiserfs_sb_info *r;
 	int len = 0;
     
-	sb = procinfo_prologue( ( kdev_t ) ( int ) data );
+	sb = procinfo_prologue( to_kdev_t((int)data) );
 	if( sb == NULL )
 		return -ENOENT;
 	r = &sb->u.reiserfs_sb;
@@ -214,7 +214,7 @@
 	int len = 0;
 	int level;
 	
-	sb = procinfo_prologue( ( kdev_t ) ( int ) data );
+	sb = procinfo_prologue( to_kdev_t((int)data) );
 	if( sb == NULL )
 		return -ENOENT;
 	r = &sb->u.reiserfs_sb;
@@ -293,7 +293,7 @@
 	struct reiserfs_sb_info *r = &sb->u.reiserfs_sb;
 	int len = 0;
     
-	sb = procinfo_prologue( ( kdev_t ) ( int ) data );
+	sb = procinfo_prologue( to_kdev_t((int)data) );
 	if( sb == NULL )
 		return -ENOENT;
 	r = &sb->u.reiserfs_sb;
@@ -334,7 +334,7 @@
 	int hash_code;
 	int len = 0;
     
-	sb = procinfo_prologue( ( kdev_t ) ( int ) data );
+	sb = procinfo_prologue( to_kdev_t((int)data) );
 	if( sb == NULL )
 		return -ENOENT;
 	sb_info = &sb->u.reiserfs_sb;
@@ -387,7 +387,7 @@
 	int len = 0;
 	int exact;
     
-	sb = procinfo_prologue( ( kdev_t ) ( int ) data );
+	sb = procinfo_prologue( to_kdev_t((int)data) );
 	if( sb == NULL )
 		return -ENOENT;
 	sb_info = &sb->u.reiserfs_sb;
@@ -438,7 +438,7 @@
 	struct reiserfs_super_block *rs;
 	int len = 0;
     
-	sb = procinfo_prologue( ( kdev_t ) ( int ) data );
+	sb = procinfo_prologue( to_kdev_t((int)data) );
 	if( sb == NULL )
 		return -ENOENT;
 	r = &sb->u.reiserfs_sb;
@@ -491,7 +491,7 @@
 			"prepare_retry: \t%12lu\n",
 
 			DJF( s_journal_block ),
-			DJF( s_journal_dev ) == 0 ? "none" : bdevname( DJF( s_journal_dev ) ), 
+			DJF( s_journal_dev ) == 0 ? "none" : bdevname( to_kdev_t( DJF( s_journal_dev ) ) ),
 			DJF( s_journal_dev ),
 			DJF( s_orig_journal_size ),
 			DJF( s_journal_trans_max ),
@@ -578,7 +578,7 @@
 {
 	return ( sb->u.reiserfs_sb.procdir ) ? create_proc_read_entry
 		( name, 0, sb->u.reiserfs_sb.procdir, func, 
-		  ( void * ) ( int ) sb -> s_dev ) : NULL;
+		  ( void * ) kdev_t_to_nr( sb -> s_dev ) ) : NULL;
 }
 
 void reiserfs_proc_unregister( struct super_block *sb, const char *name )

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

* Re: [reiserfs-dev] Patch?: linux-2.5.2-pre8/fs/reiserfs kdev_t compilation fixes
  2002-01-05 13:19 Patch?: linux-2.5.2-pre8/fs/reiserfs kdev_t compilation fixes Adam J. Richter
@ 2002-01-05 14:01 ` Hans Reiser
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Reiser @ 2002-01-05 14:01 UTC (permalink / raw)
  To: Adam J. Richter; +Cc: reiserfs-dev, linux-kernel

We'll test and release a patch on ~tuesday.  Right now all programmers 
are on Russian holidays.

Thanks Adam,

Hans


Adam J. Richter wrote:

>	The following patch gets linux-2.5.2-pre8/fs/reiserfs to
>compile.  I suspect that a lot of the conversion back and forth
>between integers and kdev_t that I have accomodated could possibly
>be eliminated by someone who understands the fs/reiserfs better.
>
>	I have not tested this patch in any way.  I only know that
>it compiles.
>
>
>------------------------------------------------------------------------
>
>Only in linux/fs/reiserfs: CVS
>diff -u -r linux-2.5.2-pre8/fs/reiserfs/procfs.c linux/fs/reiserfs/procfs.c
>--- linux-2.5.2-pre8/fs/reiserfs/procfs.c	Fri Jan  4 19:40:37 2002
>+++ linux/fs/reiserfs/procfs.c	Sat Jan  5 05:12:34 2002
>@@ -77,7 +77,7 @@
> 	int len = 0;
> 	struct super_block *sb;
>     
>-	sb = procinfo_prologue( ( kdev_t ) ( int ) data );
>+	sb = procinfo_prologue( to_kdev_t((int)data) );
> 	if( sb == NULL )
> 		return -ENOENT;
> 	len += sprintf( &buffer[ len ], "%s format\twith checks %s\n",
>@@ -134,7 +134,7 @@
> 	struct reiserfs_sb_info *r;
> 	int len = 0;
>     
>-	sb = procinfo_prologue( ( kdev_t ) ( int ) data );
>+	sb = procinfo_prologue( to_kdev_t((int)data) );
> 	if( sb == NULL )
> 		return -ENOENT;
> 	r = &sb->u.reiserfs_sb;
>@@ -214,7 +214,7 @@
> 	int len = 0;
> 	int level;
> 	
>-	sb = procinfo_prologue( ( kdev_t ) ( int ) data );
>+	sb = procinfo_prologue( to_kdev_t((int)data) );
> 	if( sb == NULL )
> 		return -ENOENT;
> 	r = &sb->u.reiserfs_sb;
>@@ -293,7 +293,7 @@
> 	struct reiserfs_sb_info *r = &sb->u.reiserfs_sb;
> 	int len = 0;
>     
>-	sb = procinfo_prologue( ( kdev_t ) ( int ) data );
>+	sb = procinfo_prologue( to_kdev_t((int)data) );
> 	if( sb == NULL )
> 		return -ENOENT;
> 	r = &sb->u.reiserfs_sb;
>@@ -334,7 +334,7 @@
> 	int hash_code;
> 	int len = 0;
>     
>-	sb = procinfo_prologue( ( kdev_t ) ( int ) data );
>+	sb = procinfo_prologue( to_kdev_t((int)data) );
> 	if( sb == NULL )
> 		return -ENOENT;
> 	sb_info = &sb->u.reiserfs_sb;
>@@ -387,7 +387,7 @@
> 	int len = 0;
> 	int exact;
>     
>-	sb = procinfo_prologue( ( kdev_t ) ( int ) data );
>+	sb = procinfo_prologue( to_kdev_t((int)data) );
> 	if( sb == NULL )
> 		return -ENOENT;
> 	sb_info = &sb->u.reiserfs_sb;
>@@ -438,7 +438,7 @@
> 	struct reiserfs_super_block *rs;
> 	int len = 0;
>     
>-	sb = procinfo_prologue( ( kdev_t ) ( int ) data );
>+	sb = procinfo_prologue( to_kdev_t((int)data) );
> 	if( sb == NULL )
> 		return -ENOENT;
> 	r = &sb->u.reiserfs_sb;
>@@ -491,7 +491,7 @@
> 			"prepare_retry: \t%12lu\n",
> 
> 			DJF( s_journal_block ),
>-			DJF( s_journal_dev ) == 0 ? "none" : bdevname( DJF( s_journal_dev ) ), 
>+			DJF( s_journal_dev ) == 0 ? "none" : bdevname( to_kdev_t( DJF( s_journal_dev ) ) ),
> 			DJF( s_journal_dev ),
> 			DJF( s_orig_journal_size ),
> 			DJF( s_journal_trans_max ),
>@@ -578,7 +578,7 @@
> {
> 	return ( sb->u.reiserfs_sb.procdir ) ? create_proc_read_entry
> 		( name, 0, sb->u.reiserfs_sb.procdir, func, 
>-		  ( void * ) ( int ) sb -> s_dev ) : NULL;
>+		  ( void * ) kdev_t_to_nr( sb -> s_dev ) ) : NULL;
> }
> 
> void reiserfs_proc_unregister( struct super_block *sb, const char *name )
>




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

end of thread, other threads:[~2002-01-05 14:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-05 13:19 Patch?: linux-2.5.2-pre8/fs/reiserfs kdev_t compilation fixes Adam J. Richter
2002-01-05 14:01 ` [reiserfs-dev] " Hans Reiser

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