From e2586a5796d6c6a812b401c7f1da2519ce3cf821 Mon Sep 17 00:00:00 2001 From: Marc Kleine-Budde Date: Mon, 8 Oct 2018 09:02:36 +0200 Subject: can: af_can: can_rx_register(): use max() instead of open coding it This patch replaces an open coded max by the proper kernel define max(). Acked-by: Oliver Hartkopp Signed-off-by: Oleksij Rempel Signed-off-by: Marc Kleine-Budde --- net/can/af_can.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'net/can/af_can.c') diff --git a/net/can/af_can.c b/net/can/af_can.c index 36c7b4311936..28ea80274121 100644 --- a/net/can/af_can.c +++ b/net/can/af_can.c @@ -474,8 +474,8 @@ int can_rx_register(struct net *net, struct net_device *dev, canid_t can_id, dev_rcv_lists->entries++; rcv_lists_stats->rcv_entries++; - if (rcv_lists_stats->rcv_entries_max < rcv_lists_stats->rcv_entries) - rcv_lists_stats->rcv_entries_max = rcv_lists_stats->rcv_entries; + rcv_lists_stats->rcv_entries_max = max(rcv_lists_stats->rcv_entries_max, + rcv_lists_stats->rcv_entries); } else { kmem_cache_free(rcv_cache, rcv); err = -ENODEV; -- cgit v1.2.3-59-g8ed1b