mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 14:41:27 +00:00
can: netns: remove "can_" prefix from members struct netns_can
This patch improves the code reability by removing the redundant "can_" prefix from the members of struct netns_can (as the struct netns_can itself is the member "can" of the struct net.) The conversion is done with: sed -i \ -e "s/struct can_dev_rcv_lists \*can_rx_alldev_list;/struct can_dev_rcv_lists *rx_alldev_list;/" \ -e "s/spinlock_t can_rcvlists_lock;/spinlock_t rcvlists_lock;/" \ -e "s/struct timer_list can_stattimer;/struct timer_list stattimer; /" \ -e "s/can\.can_rx_alldev_list/can.rx_alldev_list/g" \ -e "s/can\.can_rcvlists_lock/can.rcvlists_lock/g" \ -e "s/can\.can_stattimer/can.stattimer/g" \ include/net/netns/can.h \ net/can/*.[ch] 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:
parent
448c707494
commit
564577dfee
3 changed files with 27 additions and 27 deletions
|
@ -118,7 +118,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 net *net = from_timer(net, t, can.stattimer);
|
||||
struct can_pkg_stats *pkg_stats = net->can.pkg_stats;
|
||||
unsigned long j = jiffies; /* snapshot */
|
||||
|
||||
|
@ -177,7 +177,7 @@ void can_stat_update(struct timer_list *t)
|
|||
pkg_stats->matches_delta = 0;
|
||||
|
||||
/* restart timer (one second) */
|
||||
mod_timer(&net->can.can_stattimer, round_jiffies(jiffies + HZ));
|
||||
mod_timer(&net->can.stattimer, round_jiffies(jiffies + HZ));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -222,7 +222,7 @@ static int can_stats_proc_show(struct seq_file *m, void *v)
|
|||
|
||||
seq_putc(m, '\n');
|
||||
|
||||
if (net->can.can_stattimer.function == can_stat_update) {
|
||||
if (net->can.stattimer.function == can_stat_update) {
|
||||
seq_printf(m, " %8ld %% total match ratio (RXMR)\n",
|
||||
pkg_stats->total_rx_match_ratio);
|
||||
|
||||
|
@ -279,7 +279,7 @@ static int can_reset_stats_proc_show(struct seq_file *m, void *v)
|
|||
|
||||
user_reset = 1;
|
||||
|
||||
if (net->can.can_stattimer.function == can_stat_update) {
|
||||
if (net->can.stattimer.function == can_stat_update) {
|
||||
seq_printf(m, "Scheduled statistic reset #%ld.\n",
|
||||
rcv_lists_stats->stats_reset + 1);
|
||||
} else {
|
||||
|
@ -323,7 +323,7 @@ static int can_rcvlist_proc_show(struct seq_file *m, void *v)
|
|||
rcu_read_lock();
|
||||
|
||||
/* receive list for 'all' CAN devices (dev == NULL) */
|
||||
d = net->can.can_rx_alldev_list;
|
||||
d = net->can.rx_alldev_list;
|
||||
can_rcvlist_proc_show_one(m, idx, NULL, d);
|
||||
|
||||
/* receive list for registered CAN devices */
|
||||
|
@ -375,7 +375,7 @@ static int can_rcvlist_sff_proc_show(struct seq_file *m, void *v)
|
|||
rcu_read_lock();
|
||||
|
||||
/* sff receive list for 'all' CAN devices (dev == NULL) */
|
||||
d = net->can.can_rx_alldev_list;
|
||||
d = net->can.rx_alldev_list;
|
||||
can_rcvlist_proc_show_array(m, NULL, d->rx_sff, ARRAY_SIZE(d->rx_sff));
|
||||
|
||||
/* sff receive list for registered CAN devices */
|
||||
|
@ -405,7 +405,7 @@ static int can_rcvlist_eff_proc_show(struct seq_file *m, void *v)
|
|||
rcu_read_lock();
|
||||
|
||||
/* eff receive list for 'all' CAN devices (dev == NULL) */
|
||||
d = net->can.can_rx_alldev_list;
|
||||
d = net->can.rx_alldev_list;
|
||||
can_rcvlist_proc_show_array(m, NULL, d->rx_eff, ARRAY_SIZE(d->rx_eff));
|
||||
|
||||
/* eff receive list for registered CAN devices */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue