Skip to content

Commit d18b4b3

Browse files
arndbdavem330
authored andcommitted
net: sched: cls_u32: use hash_ptr() for tc_u_hash
After the change to the tp hash, we now get a build warning on 32-bit architectures: net/sched/cls_u32.c: In function 'tc_u_hash': net/sched/cls_u32.c:338:17: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] return hash_64((u64) tp->chain->block, U32_HASH_SHIFT); Using hash_ptr() instead of hash_64() lets us drop the cast and fixes the warning while still resulting in the same hash value. Fixes: 7fa9d97 ("net: sched: cls_u32: use block instead of q in tc_u_common") Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent c75e427 commit d18b4b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/sched/cls_u32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ static struct hlist_head *tc_u_common_hash;
335335

336336
static unsigned int tc_u_hash(const struct tcf_proto *tp)
337337
{
338-
return hash_64((u64) tp->chain->block, U32_HASH_SHIFT);
338+
return hash_ptr(tp->chain->block, U32_HASH_SHIFT);
339339
}
340340

341341
static struct tc_u_common *tc_u_common_find(const struct tcf_proto *tp)

0 commit comments

Comments
 (0)