diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2018-10-08 10:02:27 +0300 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2019-09-04 14:29:13 +0300 |
commit | 2341086df44802550a6c4efcc45f6131a74a923d (patch) | |
tree | 722d9e7d9bf61a79046bb53fb4f379f0b1091cd2 /net/can/proc.c | |
parent | 6c43bb3a413c0e5a73b48f35525f8a76396cda2f (diff) | |
download | linux-2341086df44802550a6c4efcc45f6131a74a923d.tar.xz |
can: netns: give members of struct netns_can holding the statistics a sensible name
This patch gives the members of the struct netns_can that are holding
the statistics a sensible name, by renaming struct netns_can::can_stats
into struct netns_can::pkg_stats and struct netns_can::can_pstats into
struct netns_can::rcv_lists_stats.
The conversion is done with:
sed -i \
-e "s:\(struct[^*]*\*\)can_stats;.*:\1pkg_stats;:" \
-e "s:\(struct[^*]*\*\)can_pstats;.*:\1rcv_lists_stats;:" \
-e "s/can\.can_stats/can.pkg_stats/g" \
-e "s/can\.can_pstats/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>
Diffstat (limited to 'net/can/proc.c')
-rw-r--r-- | net/can/proc.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/can/proc.c b/net/can/proc.c index d05e8c8b420d..30d8da4cef5d 100644 --- a/net/can/proc.c +++ b/net/can/proc.c @@ -78,8 +78,8 @@ static const char rx_list_name[][8] = { static void can_init_stats(struct net *net) { - struct can_pkg_stats *can_stats = net->can.can_stats; - struct can_rcv_lists_stats *can_pstats = net->can.can_pstats; + struct can_pkg_stats *can_stats = net->can.pkg_stats; + struct can_rcv_lists_stats *can_pstats = net->can.rcv_lists_stats; /* * This memset function is called from a timer context (when * can_stattimer is active which is the default) OR in a process @@ -119,7 +119,7 @@ static unsigned long calc_rate(unsigned long oldjif, unsigned long newjif, void can_stat_update(struct timer_list *t) { struct net *net = from_timer(net, t, can.can_stattimer); - struct can_pkg_stats *can_stats = net->can.can_stats; + struct can_pkg_stats *can_stats = net->can.pkg_stats; unsigned long j = jiffies; /* snapshot */ /* restart counting in timer context on user request */ @@ -212,8 +212,8 @@ static void can_print_recv_banner(struct seq_file *m) static int can_stats_proc_show(struct seq_file *m, void *v) { struct net *net = m->private; - struct can_pkg_stats *can_stats = net->can.can_stats; - struct can_rcv_lists_stats *can_pstats = net->can.can_pstats; + struct can_pkg_stats *can_stats = net->can.pkg_stats; + struct can_rcv_lists_stats *can_pstats = net->can.rcv_lists_stats; seq_putc(m, '\n'); seq_printf(m, " %8ld transmitted frames (TXF)\n", can_stats->tx_frames); @@ -274,8 +274,8 @@ static int can_stats_proc_show(struct seq_file *m, void *v) static int can_reset_stats_proc_show(struct seq_file *m, void *v) { struct net *net = m->private; - struct can_rcv_lists_stats *can_pstats = net->can.can_pstats; - struct can_pkg_stats *can_stats = net->can.can_stats; + struct can_rcv_lists_stats *can_pstats = net->can.rcv_lists_stats; + struct can_pkg_stats *can_stats = net->can.pkg_stats; user_reset = 1; |