From: Martin Schiller <ms@dev.tdt.de>
To: Xie He <xie.he.0141@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] drivers/net/wan/x25_asy: Remove an unnecessary x25_type_trans call
Date: Mon, 14 Sep 2020 07:32:54 +0200 [thread overview]
Message-ID: <4d6345b6b072f60366aec9626809da95@dev.tdt.de> (raw)
In-Reply-To: <20200912021807.365158-1-xie.he.0141@gmail.com>
On 2020-09-12 04:18, Xie He wrote:
> x25_type_trans only needs to be called before we call netif_rx to pass
> the skb to upper layers.
>
> It does not need to be called before lapb_data_received. The LAPB
> module
> does not need the fields that are set by calling it.
>
> In the other two X.25 drivers - lapbether and hdlc_x25. x25_type_trans
> is only called before netif_rx and not before lapb_data_received.
>
> Cc: Martin Schiller <ms@dev.tdt.de>
> Signed-off-by: Xie He <xie.he.0141@gmail.com>
> ---
> drivers/net/wan/x25_asy.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c
> index 5a7cf8bf9d0d..ab56a5e6447a 100644
> --- a/drivers/net/wan/x25_asy.c
> +++ b/drivers/net/wan/x25_asy.c
> @@ -202,8 +202,7 @@ static void x25_asy_bump(struct x25_asy *sl)
> return;
> }
> skb_put_data(skb, sl->rbuff, count);
> - skb->protocol = x25_type_trans(skb, sl->dev);
> - err = lapb_data_received(skb->dev, skb);
> + err = lapb_data_received(sl->dev, skb);
> if (err != LAPB_OK) {
> kfree_skb(skb);
> printk(KERN_DEBUG "x25_asy: data received err - %d\n", err);
Acked-by: Martin Schiller <ms@dev.tdt.de>
next prev parent reply other threads:[~2020-09-14 5:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-12 2:18 [PATCH net-next] drivers/net/wan/x25_asy: Remove an unnecessary x25_type_trans call Xie He
2020-09-14 5:32 ` Martin Schiller [this message]
2020-09-14 6:24 ` Xie He
2020-09-14 21:41 ` David Miller
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=4d6345b6b072f60366aec9626809da95@dev.tdt.de \
--to=ms@dev.tdt.de \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=xie.he.0141@gmail.com \
/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