Commit 6e873ec7 authored by Robin Holt's avatar Robin Holt Committed by Linus Torvalds

xpc_sn2: fix max() warning about pointers of different types

Fix a minor compile warning when building on ia64.

drivers/misc/sgi-xp/xpc_sn2.c: In function `xpc_clear_remote_msgqueue_flags_sn2':
drivers/misc/sgi-xp/xpc_sn2.c:1746: warning: comparison of distinct pointer types lacks a cast
Signed-off-by: default avatarRobin Holt <holt@sgi.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 1bc4faa5
...@@ -1744,20 +1744,20 @@ xpc_clear_remote_msgqueue_flags_sn2(struct xpc_channel *ch) ...@@ -1744,20 +1744,20 @@ xpc_clear_remote_msgqueue_flags_sn2(struct xpc_channel *ch)
{ {
struct xpc_channel_sn2 *ch_sn2 = &ch->sn.sn2; struct xpc_channel_sn2 *ch_sn2 = &ch->sn.sn2;
struct xpc_msg_sn2 *msg; struct xpc_msg_sn2 *msg;
s64 put; s64 put, remote_nentries = ch->remote_nentries;
/* flags are zeroed when the buffer is allocated */ /* flags are zeroed when the buffer is allocated */
if (ch_sn2->remote_GP.put < ch->remote_nentries) if (ch_sn2->remote_GP.put < remote_nentries)
return; return;
put = max(ch_sn2->w_remote_GP.put, ch->remote_nentries); put = max(ch_sn2->w_remote_GP.put, remote_nentries);
do { do {
msg = (struct xpc_msg_sn2 *)((u64)ch_sn2->remote_msgqueue + msg = (struct xpc_msg_sn2 *)((u64)ch_sn2->remote_msgqueue +
(put % ch->remote_nentries) * (put % remote_nentries) *
ch->entry_size); ch->entry_size);
DBUG_ON(!(msg->flags & XPC_M_SN2_READY)); DBUG_ON(!(msg->flags & XPC_M_SN2_READY));
DBUG_ON(!(msg->flags & XPC_M_SN2_DONE)); DBUG_ON(!(msg->flags & XPC_M_SN2_DONE));
DBUG_ON(msg->number != put - ch->remote_nentries); DBUG_ON(msg->number != put - remote_nentries);
msg->flags = 0; msg->flags = 0;
} while (++put < ch_sn2->remote_GP.put); } while (++put < ch_sn2->remote_GP.put);
} }
......
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