From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Florian Westphal <fw@strlen.de>
Cc: netdev@vger.kernel.org, mkl@pengutronix.de,
"linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Subject: Re: [PATCH] can: use sock_efree instead of own destructor
Date: Tue, 10 Mar 2015 07:14:08 +0100 [thread overview]
Message-ID: <54FE8BB0.9050508@hartkopp.net> (raw)
In-Reply-To: <1425959300-27132-1-git-send-email-fw@strlen.de>
On 10.03.2015 04:48, Florian Westphal wrote:
> It is identical to the can destructor.
>
> Signed-off-by: Florian Westphal <fw@strlen.de>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Hello Florian,
the other callers use it in the same way so it's a good simplification.
Btw. the name of sock_efree() is a bit misleading - nothing is free'd here.
Won't it be better to rename sock_efree(skb) with sock_put_skb(skb) or
something like that? sock_efree() has no comment why it's named like this.
Regards,
Oliver
ps. changed from linux ML to netdev and linux-can ML in CC
> ---
> include/linux/can/skb.h | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/include/linux/can/skb.h b/include/linux/can/skb.h
> index cc00d15..b6a52a4 100644
> --- a/include/linux/can/skb.h
> +++ b/include/linux/can/skb.h
> @@ -44,16 +44,11 @@ static inline void can_skb_reserve(struct sk_buff *skb)
> skb_reserve(skb, sizeof(struct can_skb_priv));
> }
>
> -static inline void can_skb_destructor(struct sk_buff *skb)
> -{
> - sock_put(skb->sk);
> -}
> -
> static inline void can_skb_set_owner(struct sk_buff *skb, struct sock *sk)
> {
> if (sk) {
> sock_hold(sk);
> - skb->destructor = can_skb_destructor;
> + skb->destructor = sock_efree;
> skb->sk = sk;
> }
> }
>
next parent reply other threads:[~2015-03-10 6:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1425959300-27132-1-git-send-email-fw@strlen.de>
2015-03-10 6:14 ` Oliver Hartkopp [this message]
2015-03-10 12:22 ` [PATCH] can: use sock_efree instead of own destructor Eric Dumazet
2015-03-10 13:36 ` Oliver Hartkopp
2015-03-10 14:36 ` Eric Dumazet
2015-03-10 14:55 ` Oliver Hartkopp
2015-03-10 15:19 ` Alexander Duyck
2015-03-10 7:50 ` Marc Kleine-Budde
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=54FE8BB0.9050508@hartkopp.net \
--to=socketcan@hartkopp.net \
--cc=fw@strlen.de \
--cc=linux-can@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.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).