summaryrefslogtreecommitdiff
path: root/net/can/af_can.c
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2018-10-08 09:02:33 +0200
committerMarc Kleine-Budde <mkl@pengutronix.de>2019-09-04 13:29:14 +0200
commit3ee6d2bebef8cd35d2a43422b642f7b57fb409f9 (patch)
tree8fec3b8ba8428c6ec4addc497e373bd62f20cf2e /net/can/af_can.c
parentff7fbea4c133188bdeb2b440a8e762f6c908a19b (diff)
can: af_can: rename find_rcv_list() to can_rcv_list_find()
This patch add the commonly used prefix "can_" to the find_rcv_list() function and add the "find" to the end, as the function returns a struct rcv_list. This improves the overall readability of the code. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Acked-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'net/can/af_can.c')
-rw-r--r--net/can/af_can.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/can/af_can.c b/net/can/af_can.c
index 0d51c06a88ac..0b008187a840 100644
--- a/net/can/af_can.c
+++ b/net/can/af_can.c
@@ -331,7 +331,7 @@ static unsigned int effhash(canid_t can_id)
}
/**
- * find_rcv_list - determine optimal filterlist inside device filter struct
+ * can_rcv_list_find - determine optimal filterlist inside device filter struct
* @can_id: pointer to CAN identifier of a given can_filter
* @mask: pointer to CAN mask of a given can_filter
* @d: pointer to the device filter struct
@@ -357,8 +357,8 @@ static unsigned int effhash(canid_t can_id)
* Constistency checked mask.
* Reduced can_id to have a preprocessed filter compare value.
*/
-static struct hlist_head *find_rcv_list(canid_t *can_id, canid_t *mask,
- struct can_dev_rcv_lists *dev_rcv_lists)
+static struct hlist_head *can_rcv_list_find(canid_t *can_id, canid_t *mask,
+ struct can_dev_rcv_lists *dev_rcv_lists)
{
canid_t inv = *can_id & CAN_INV_FILTER; /* save flag before masking */
@@ -460,7 +460,7 @@ int can_rx_register(struct net *net, struct net_device *dev, canid_t can_id,
dev_rcv_lists = find_dev_rcv_lists(net, dev);
if (dev_rcv_lists) {
- rl = find_rcv_list(&can_id, &mask, dev_rcv_lists);
+ rl = can_rcv_list_find(&can_id, &mask, dev_rcv_lists);
r->can_id = can_id;
r->mask = mask;
@@ -533,7 +533,7 @@ void can_rx_unregister(struct net *net, struct net_device *dev, canid_t can_id,
goto out;
}
- rl = find_rcv_list(&can_id, &mask, dev_rcv_lists);
+ rl = can_rcv_list_find(&can_id, &mask, dev_rcv_lists);
/* Search the receiver list for the item to delete. This should
* exist, since no receiver may be unregistered that hasn't