diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2018-10-08 09:02:26 +0200 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2019-09-04 13:29:13 +0200 |
commit | 6c43bb3a413c0e5a73b48f35525f8a76396cda2f (patch) | |
tree | 085bc2d316f1456dabad3d4af136163a1cf34c35 /net/can/proc.c | |
parent | Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsh... (diff) | |
download | linux-6c43bb3a413c0e5a73b48f35525f8a76396cda2f.tar.xz linux-6c43bb3a413c0e5a73b48f35525f8a76396cda2f.zip |
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>
Diffstat (limited to 'net/can/proc.c')
-rw-r--r-- | net/can/proc.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/net/can/proc.c b/net/can/proc.c index edb822c31902..d05e8c8b420d 100644 --- a/net/can/proc.c +++ b/net/can/proc.c @@ -78,14 +78,14 @@ static const char rx_list_name[][8] = { static void can_init_stats(struct net *net) { - struct s_stats *can_stats = net->can.can_stats; - struct s_pstats *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.can_pstats; /* * This memset function is called from a timer context (when * can_stattimer is active which is the default) OR in a process * context (reading the proc_fs when can_stattimer is disabled). */ - memset(can_stats, 0, sizeof(struct s_stats)); + memset(can_stats, 0, sizeof(struct can_pkg_stats)); can_stats->jiffies_init = jiffies; can_pstats->stats_reset++; @@ -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 s_stats *can_stats = net->can.can_stats; + struct can_pkg_stats *can_stats = net->can.can_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 s_stats *can_stats = net->can.can_stats; - struct s_pstats *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.can_pstats; 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 s_pstats *can_pstats = net->can.can_pstats; - struct s_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.can_stats; user_reset = 1; |