提交 b04e0854 编写于 作者: A Andrew F. Davis 提交者: Greg Kroah-Hartman

w1: Use kernel common min() implementation

Signed-off-by: NAndrew F. Davis <afd@ti.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 270579d9
...@@ -23,8 +23,6 @@ ...@@ -23,8 +23,6 @@
#if defined(CONFIG_W1_CON) && (defined(CONFIG_CONNECTOR) || (defined(CONFIG_CONNECTOR_MODULE) && defined(CONFIG_W1_MODULE))) #if defined(CONFIG_W1_CON) && (defined(CONFIG_CONNECTOR) || (defined(CONFIG_CONNECTOR_MODULE) && defined(CONFIG_W1_MODULE)))
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
/* Bundle together everything required to process a request in one memory /* Bundle together everything required to process a request in one memory
* allocation. * allocation.
*/ */
...@@ -598,7 +596,7 @@ static void w1_cn_callback(struct cn_msg *cn, struct netlink_skb_parms *nsp) ...@@ -598,7 +596,7 @@ static void w1_cn_callback(struct cn_msg *cn, struct netlink_skb_parms *nsp)
sizeof(struct w1_netlink_msg) + sizeof(struct w1_netlink_msg) +
sizeof(struct w1_netlink_cmd)); sizeof(struct w1_netlink_cmd));
} }
reply_size = MIN(CONNECTOR_MAX_MSG_SIZE, reply_size); reply_size = min(CONNECTOR_MAX_MSG_SIZE, reply_size);
/* allocate space for the block, a copy of the original message, /* allocate space for the block, a copy of the original message,
* one node per cmd to point into the original message, * one node per cmd to point into the original message,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册