From: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> This patch replaces an open coded max by the proper kernel define max(). Acked-by: Oliver Hartkopp <soketcan@xxxxxxxxxxxx> Signed-off-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx> --- net/can/af_can.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/can/af_can.c b/net/can/af_can.c index 55eaf85ee2ca..82a5b0fdcc79 100644 --- a/net/can/af_can.c +++ b/net/can/af_can.c @@ -498,8 +498,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; -- 2.19.0