[PATCH v2 09/15] can: af_can: rename find_dev_rcv_lists() to can_dev_rcv_lists_find()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>

This patch add the commonly used prefix "can_" to the find_dev_rcv_lists()
function and moves the "find" to the end, as the function returns a struct
can_dev_rcv_list. This improves the overall readability of the code.

Signed-off-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>
Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
Acked-by: Oliver Hartkopp <socketcan@xxxxxxxxxxxx>
---
 net/can/af_can.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/net/can/af_can.c b/net/can/af_can.c
index 3cb6bd39f9c8..7b260af188c6 100644
--- a/net/can/af_can.c
+++ b/net/can/af_can.c
@@ -321,8 +321,8 @@ EXPORT_SYMBOL(can_send);
  * af_can rx path
  */
 
-static struct can_dev_rcv_lists *find_dev_rcv_lists(struct net *net,
-						struct net_device *dev)
+static struct can_dev_rcv_lists *can_dev_rcv_lists_find(struct net *net,
+							struct net_device *dev)
 {
 	if (!dev)
 		return net->can.rx_alldev_list;
@@ -482,7 +482,7 @@ int can_rx_register(struct net *net, struct net_device *dev, canid_t can_id,
 
 	spin_lock(&net->can.rcvlists_lock);
 
-	dev_rcv_lists = find_dev_rcv_lists(net, dev);
+	dev_rcv_lists = can_dev_rcv_lists_find(net, dev);
 	if (dev_rcv_lists) {
 		rl = can_rcv_list_find(&can_id, &mask, dev_rcv_lists);
 
@@ -552,7 +552,7 @@ void can_rx_unregister(struct net *net, struct net_device *dev, canid_t can_id,
 
 	spin_lock(&net->can.rcvlists_lock);
 
-	dev_rcv_lists = find_dev_rcv_lists(net, dev);
+	dev_rcv_lists = can_dev_rcv_lists_find(net, dev);
 	if (!dev_rcv_lists) {
 		pr_err("BUG: receive list not found for "
 		       "dev %s, id %03X, mask %03X\n",
@@ -700,7 +700,7 @@ static void can_receive(struct sk_buff *skb, struct net_device *dev)
 	matches = can_rcv_filter(net->can.rx_alldev_list, skb);
 
 	/* find receive list for this device */
-	dev_rcv_lists = find_dev_rcv_lists(net, dev);
+	dev_rcv_lists = can_dev_rcv_lists_find(net, dev);
 	if (dev_rcv_lists)
 		matches += can_rcv_filter(dev_rcv_lists, skb);
 
-- 
2.19.0




[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux