Commit e2586a57 authored by Marc Kleine-Budde's avatar Marc Kleine-Budde

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: default avatarOliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: default avatarOleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent 6625a18e
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment