[PATCH] ipc: Fix warning that has recently appeared

From: Alan Cox
Date: Thu Jan 03 2008 - 12:19:20 EST


Use _t form to force types. We know that msg->m_ts is
clamped between 0 and MAXINT.

Signed-off-by: Alan Cox <alan@xxxxxxxxxx>

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.24-rc6-mm1/ipc/msg.c linux-2.6.24-rc6-mm1/ipc/msg.c
--- linux.vanilla-2.6.24-rc6-mm1/ipc/msg.c 2008-01-02 16:04:25.000000000 +0000
+++ linux-2.6.24-rc6-mm1/ipc/msg.c 2008-01-02 16:50:46.000000000 +0000
@@ -898,7 +898,7 @@
if (IS_ERR(msg))
return PTR_ERR(msg);

- msgsz = min(msgsz, msg->m_ts);
+ msgsz = min_t(size_t, msgsz, msg->m_ts);
*pmtype = msg->m_type;
if (store_msg(mtext, msg, msgsz))
msgsz = -EFAULT;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/