Commit 6b2c2734 authored by Mika Kukkonen's avatar Mika Kukkonen Committed by Linus Torvalds

[PATCH] Correct return type of hashfn() in fs/dquot.c

  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: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent f400f3bb
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment