can: netns: give structs holding the CAN statistics a sensible name
This patch renames both "struct s_stats" and "struct s_pstats", to "struct can_pkg_stats" and "struct can_rcv_lists_stats" to better reflect their meaning and improve code readability. The conversion is done with: sed -i \ -e "s/struct s_stats/struct can_pkg_stats/g" \ -e "s/struct s_pstats/struct can_rcv_lists_stats/g" \ net/can/*.[ch] \ include/net/netns/can.h 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>
This commit is contained in:
@@ -198,7 +198,7 @@ int can_send(struct sk_buff *skb, int loop)
|
||||
{
|
||||
struct sk_buff *newskb = NULL;
|
||||
struct canfd_frame *cfd = (struct canfd_frame *)skb->data;
|
||||
struct s_stats *can_stats = dev_net(skb->dev)->can.can_stats;
|
||||
struct can_pkg_stats *can_stats = dev_net(skb->dev)->can.can_stats;
|
||||
int err = -EINVAL;
|
||||
|
||||
if (skb->len == CAN_MTU) {
|
||||
@@ -441,7 +441,7 @@ int can_rx_register(struct net *net, struct net_device *dev, canid_t can_id,
|
||||
struct receiver *r;
|
||||
struct hlist_head *rl;
|
||||
struct can_dev_rcv_lists *d;
|
||||
struct s_pstats *can_pstats = net->can.can_pstats;
|
||||
struct can_rcv_lists_stats *can_pstats = net->can.can_pstats;
|
||||
int err = 0;
|
||||
|
||||
/* insert new receiver (dev,canid,mask) -> (func,data) */
|
||||
@@ -515,7 +515,7 @@ void can_rx_unregister(struct net *net, struct net_device *dev, canid_t can_id,
|
||||
{
|
||||
struct receiver *r = NULL;
|
||||
struct hlist_head *rl;
|
||||
struct s_pstats *can_pstats = net->can.can_pstats;
|
||||
struct can_rcv_lists_stats *can_pstats = net->can.can_pstats;
|
||||
struct can_dev_rcv_lists *d;
|
||||
|
||||
if (dev && dev->type != ARPHRD_CAN)
|
||||
@@ -655,7 +655,7 @@ static void can_receive(struct sk_buff *skb, struct net_device *dev)
|
||||
{
|
||||
struct can_dev_rcv_lists *d;
|
||||
struct net *net = dev_net(dev);
|
||||
struct s_stats *can_stats = net->can.can_stats;
|
||||
struct can_pkg_stats *can_stats = net->can.can_stats;
|
||||
int matches;
|
||||
|
||||
/* update statistics */
|
||||
|
Reference in New Issue
Block a user