]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Correct return type of hashfn() in fs/dquot.c
authorMika Kukkonen <mika@osdl.org>
Sun, 11 Jul 2004 02:34:08 +0000 (19:34 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sun, 11 Jul 2004 02:34:08 +0000 (19:34 -0700)
  CC      fs/dquot.o
fs/dquot.c:208: warning: type qualifiers ignored on function return type

Once again with extra gcc warnings enabled.  Every user of the function is
expecting unsigned value, not int in first place, and I think the const is
just misplaced.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/dquot.c

index 2c2bdb506c3f9233ac4dc5c194b165385d72689f..35c84acdcc80034688bb4384886c60f9fca8dcac 100644 (file)
@@ -206,9 +206,12 @@ struct dqstats dqstats;
 
 static void dqput(struct dquot *dquot);
 
-static inline int const hashfn(struct super_block *sb, unsigned int id, int type)
+static inline unsigned int
+hashfn(const struct super_block *sb, unsigned int id, int type)
 {
-       unsigned long tmp = (((unsigned long)sb>>L1_CACHE_SHIFT) ^ id) * (MAXQUOTAS - type);
+       unsigned long tmp;
+
+       tmp = (((unsigned long)sb>>L1_CACHE_SHIFT) ^ id) * (MAXQUOTAS - type);
        return (tmp + (tmp >> dq_hash_bits)) & dq_hash_mask;
 }