| To: | xfs@xxxxxxxxxxx |
|---|---|
| Subject: | [PATCH] fix valid but harmless sparse warning in xfs_log_recovery.c |
| From: | Christoph Hellwig <hch@xxxxxx> |
| Date: | Sun, 16 Sep 2007 14:04:33 +0200 |
| Sender: | xfs-bounce@xxxxxxxxxxx |
| User-agent: | Mutt/1.3.28i |
The new xlog_recover_do_reg_buffer checks call be16_to_cpu on di_gen
which is a 32bit value so sparse rightly complains. Fortunately the
warning is harmless because we don't care for the value, but only
whether it's non-NULL. Due to that fact we can simply kill the endian
swaps on this and the previous di_mode check entirely.
Signed-off-by: Christoph Hellwig <hch@xxxxxx>
Index: linux-2.6-xfs/fs/xfs/xfs_log_recover.c
===================================================================
--- linux-2.6-xfs.orig/fs/xfs/xfs_log_recover.c 2007-09-16 12:57:25.000000000
+0200
+++ linux-2.6-xfs/fs/xfs/xfs_log_recover.c 2007-09-16 12:57:38.000000000
+0200
@@ -1920,9 +1920,9 @@ xlog_recover_do_reg_buffer(
stale_buf = 1;
break;
}
- if (be16_to_cpu(dip->di_core.di_mode))
+ if (dip->di_core.di_mode)
mode_count++;
- if (be16_to_cpu(dip->di_core.di_gen))
+ if (dip->di_core.di_gen)
gen_count++;
}
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH] kill xfs_dm_fsops.c, Christoph Hellwig |
|---|---|
| Next by Date: | Re: can't remove dir, David Chinner |
| Previous by Thread: | [PATCH] kill xfs_dm_fsops.c, Christoph Hellwig |
| Next by Thread: | Re: [PATCH] fix valid but harmless sparse warning in xfs_log_recovery.c, Christoph Hellwig |
| Indexes: | [Date] [Thread] [Top] [All Lists] |