]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[XFS] fix valid but harmless sparse warning
authorChristoph Hellwig <hch@infradead.org>
Wed, 19 Sep 2007 05:27:30 +0000 (15:27 +1000)
committerTim Shimmin <tes@chook.melbourne.sgi.com>
Thu, 20 Sep 2007 09:40:40 +0000 (19:40 +1000)
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.

SGI-PV: 969656
SGI-Modid: xfs-linux-melb:xfs-kern:29709a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
fs/xfs/xfs_log_recover.c

index dacb19739cc2830ae561a811321362e0fbf2bd6d..7174991f4bef2b43ce2611b8c143e40630a83145 100644 (file)
@@ -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++;
                }