diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2018-10-08 09:02:36 +0200 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2019-09-04 13:29:14 +0200 |
commit | e2586a5796d6c6a812b401c7f1da2519ce3cf821 (patch) | |
tree | ee33d6a17ccf633937b3d15a3836b712763da8a1 /net/can | |
parent | 6625a18e9ff6462ff81f740a331899b69ad6033e (diff) | |
download | linux-e2586a5796d6c6a812b401c7f1da2519ce3cf821.tar.bz2 |
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 <socketcan@hartkopp.net>
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'net/can')
-rw-r--r-- | net/can/af_can.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |