Skip to content

Commit

Permalink
can: af_can: can_rx_register(): use max() instead of open coding it
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Marc Kleine-Budde committed Sep 4, 2019
1 parent 6625a18 commit e2586a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/can/af_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e2586a5

Please sign in to comment.