From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
ralf@linux-mips.org, linux-hams@vger.kernel.org
Subject: [PATCH net-next 06/15] net: ax25: remove route refcount
Date: Wed, 26 Jan 2022 11:11:00 -0800 [thread overview]
Message-ID: <20220126191109.2822706-7-kuba@kernel.org> (raw)
In-Reply-To: <20220126191109.2822706-1-kuba@kernel.org>
Nothing takes the refcount since v4.9.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: ralf@linux-mips.org
CC: linux-hams@vger.kernel.org
---
include/net/ax25.h | 12 ------------
net/ax25/ax25_route.c | 5 ++---
2 files changed, 2 insertions(+), 15 deletions(-)
diff --git a/include/net/ax25.h b/include/net/ax25.h
index 526e49589197..cb628c5d7c5b 100644
--- a/include/net/ax25.h
+++ b/include/net/ax25.h
@@ -187,18 +187,12 @@ typedef struct {
typedef struct ax25_route {
struct ax25_route *next;
- refcount_t refcount;
ax25_address callsign;
struct net_device *dev;
ax25_digi *digipeat;
char ip_mode;
} ax25_route;
-static inline void ax25_hold_route(ax25_route *ax25_rt)
-{
- refcount_inc(&ax25_rt->refcount);
-}
-
void __ax25_put_route(ax25_route *ax25_rt);
extern rwlock_t ax25_route_lock;
@@ -213,12 +207,6 @@ static inline void ax25_route_lock_unuse(void)
read_unlock(&ax25_route_lock);
}
-static inline void ax25_put_route(ax25_route *ax25_rt)
-{
- if (refcount_dec_and_test(&ax25_rt->refcount))
- __ax25_put_route(ax25_rt);
-}
-
typedef struct {
char slave; /* slave_mode? */
struct timer_list slave_timer; /* timeout timer */
diff --git a/net/ax25/ax25_route.c b/net/ax25/ax25_route.c
index d0b2e094bd55..be97dc6a53cb 100644
--- a/net/ax25/ax25_route.c
+++ b/net/ax25/ax25_route.c
@@ -111,7 +111,6 @@ static int __must_check ax25_rt_add(struct ax25_routes_struct *route)
return -ENOMEM;
}
- refcount_set(&ax25_rt->refcount, 1);
ax25_rt->callsign = route->dest_addr;
ax25_rt->dev = ax25_dev->dev;
ax25_rt->digipeat = NULL;
@@ -160,12 +159,12 @@ static int ax25_rt_del(struct ax25_routes_struct *route)
ax25cmp(&route->dest_addr, &s->callsign) == 0) {
if (ax25_route_list == s) {
ax25_route_list = s->next;
- ax25_put_route(s);
+ __ax25_put_route(s);
} else {
for (t = ax25_route_list; t != NULL; t = t->next) {
if (t->next == s) {
t->next = s->next;
- ax25_put_route(s);
+ __ax25_put_route(s);
break;
}
}
--
2.34.1
next prev parent reply other threads:[~2022-01-26 19:11 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-26 19:10 [PATCH net-next 00/15] net: get rid of unused static inlines Jakub Kicinski
2022-01-26 19:10 ` [PATCH net-next 01/15] mii: remove mii_lpa_to_linkmode_lpa_sgmii() Jakub Kicinski
2022-01-27 12:36 ` Vladimir Oltean
2022-01-26 19:10 ` [PATCH net-next 02/15] nfc: use *_set_vendor_cmds() helpers Jakub Kicinski
2022-01-27 7:30 ` Krzysztof Kozlowski
2022-01-26 19:10 ` [PATCH net-next 03/15] net: remove net_invalid_timestamp() Jakub Kicinski
2022-01-26 19:10 ` [PATCH net-next 04/15] net: remove linkmode_change_bit() Jakub Kicinski
2022-01-26 19:10 ` [PATCH net-next 05/15] net: remove bond_slave_has_mac_rcu() Jakub Kicinski
2022-01-26 19:11 ` Jakub Kicinski [this message]
2022-01-27 9:18 ` [PATCH net-next 06/15] net: ax25: remove route refcount Thomas Osterried
2022-01-27 15:58 ` David Ranch
2022-01-28 10:21 ` Dan Carpenter
2022-01-26 19:11 ` [PATCH net-next 07/15] hsr: remove get_prp_lan_id() Jakub Kicinski
2022-01-26 19:11 ` [PATCH net-next 08/15] ipv6: remove inet6_rsk() and tcp_twsk_ipv6only() Jakub Kicinski
2022-01-26 19:11 ` [PATCH net-next 09/15] dccp: remove max48() Jakub Kicinski
2022-01-26 19:11 ` [PATCH net-next 10/15] udp: remove inner_udp_hdr() Jakub Kicinski
2022-01-26 19:36 ` Willem de Bruijn
2022-01-26 19:11 ` [PATCH net-next 11/15] udplite: remove udplite_csum_outgoing() Jakub Kicinski
2022-01-26 19:11 ` [PATCH net-next 12/15] netlink: remove nl_set_extack_cookie_u32() Jakub Kicinski
2022-01-26 19:11 ` [PATCH net-next 13/15] net: sched: remove psched_tdiff_bounded() Jakub Kicinski
2022-01-26 19:11 ` [PATCH net-next 14/15] net: sched: remove qdisc_qlen_cpu() Jakub Kicinski
2022-01-26 19:11 ` [PATCH net-next 15/15] net: tipc: remove unused static inlines Jakub Kicinski
2022-01-27 14:20 ` [PATCH net-next 00/15] net: get rid of " patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220126191109.2822706-7-kuba@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=linux-hams@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=ralf@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).