]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
w1: Use kernel common min() implementation
authorAndrew F. Davis <afd@ti.com>
Thu, 16 Mar 2017 15:19:53 +0000 (10:19 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 8 Apr 2017 16:20:27 +0000 (18:20 +0200)
Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/w1/w1_netlink.c

index 49e520ca79c5395215701d507c8323391cc6ce93..18374cad3acee0927ce67d20a85f3f8bad2bd1bc 100644 (file)
@@ -23,8 +23,6 @@
 
 #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
  * allocation.
  */
@@ -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_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,
                 * one node per cmd to point into the original message,