diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/misc/sgi-xp/xpc_sn2.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/misc/sgi-xp/xpc_sn2.c b/drivers/misc/sgi-xp/xpc_sn2.c index a760dd08e425..eaaa964942de 100644 --- a/drivers/misc/sgi-xp/xpc_sn2.c +++ b/drivers/misc/sgi-xp/xpc_sn2.c | |||
@@ -1744,20 +1744,20 @@ xpc_clear_remote_msgqueue_flags_sn2(struct xpc_channel *ch) | |||
1744 | { | 1744 | { |
1745 | struct xpc_channel_sn2 *ch_sn2 = &ch->sn.sn2; | 1745 | struct xpc_channel_sn2 *ch_sn2 = &ch->sn.sn2; |
1746 | struct xpc_msg_sn2 *msg; | 1746 | struct xpc_msg_sn2 *msg; |
1747 | s64 put; | 1747 | s64 put, remote_nentries = ch->remote_nentries; |
1748 | 1748 | ||
1749 | /* flags are zeroed when the buffer is allocated */ | 1749 | /* flags are zeroed when the buffer is allocated */ |
1750 | if (ch_sn2->remote_GP.put < ch->remote_nentries) | 1750 | if (ch_sn2->remote_GP.put < remote_nentries) |
1751 | return; | 1751 | return; |
1752 | 1752 | ||
1753 | put = max(ch_sn2->w_remote_GP.put, ch->remote_nentries); | 1753 | put = max(ch_sn2->w_remote_GP.put, remote_nentries); |
1754 | do { | 1754 | do { |
1755 | msg = (struct xpc_msg_sn2 *)((u64)ch_sn2->remote_msgqueue + | 1755 | msg = (struct xpc_msg_sn2 *)((u64)ch_sn2->remote_msgqueue + |
1756 | (put % ch->remote_nentries) * | 1756 | (put % remote_nentries) * |
1757 | ch->entry_size); | 1757 | ch->entry_size); |
1758 | DBUG_ON(!(msg->flags & XPC_M_SN2_READY)); | 1758 | DBUG_ON(!(msg->flags & XPC_M_SN2_READY)); |
1759 | DBUG_ON(!(msg->flags & XPC_M_SN2_DONE)); | 1759 | DBUG_ON(!(msg->flags & XPC_M_SN2_DONE)); |
1760 | DBUG_ON(msg->number != put - ch->remote_nentries); | 1760 | DBUG_ON(msg->number != put - remote_nentries); |
1761 | msg->flags = 0; | 1761 | msg->flags = 0; |
1762 | } while (++put < ch_sn2->remote_GP.put); | 1762 | } while (++put < ch_sn2->remote_GP.put); |
1763 | } | 1763 | } |