From: Subash Abhinov Kasiviswanathan <subashab@codeaurora•org>
To: davem@davemloft•net, netdev@vger•kernel.org
Cc: Subash Abhinov Kasiviswanathan <subashab@codeaurora•org>
Subject: [PATCH net-next 3/3] net: qualcomm: rmnet: Remove redundant command check
Date: Mon, 14 May 2018 14:08:47 -0600 [thread overview]
Message-ID: <1526328527-20026-4-git-send-email-subashab@codeaurora.org> (raw)
In-Reply-To: <1526328527-20026-1-git-send-email-subashab@codeaurora.org>
The command packet size is already checked once in
rmnet_map_deaggregate() for the header, packet and trailer size, so
this additional check is not needed.
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora•org>
---
drivers/net/ethernet/qualcomm/rmnet/rmnet_map_command.c | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_map_command.c b/drivers/net/ethernet/qualcomm/rmnet/rmnet_map_command.c
index 78fdad0..56a93df 100644
--- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_map_command.c
+++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_map_command.c
@@ -69,17 +69,9 @@ static void rmnet_map_send_ack(struct sk_buff *skb,
struct rmnet_map_control_command *cmd;
int xmit_status;
- if (port->data_format & RMNET_FLAGS_INGRESS_MAP_CKSUMV4) {
- if (skb->len < sizeof(struct rmnet_map_header) +
- RMNET_MAP_GET_LENGTH(skb) +
- sizeof(struct rmnet_map_dl_csum_trailer)) {
- kfree_skb(skb);
- return;
- }
-
- skb_trim(skb, skb->len -
- sizeof(struct rmnet_map_dl_csum_trailer));
- }
+ if (port->data_format & RMNET_FLAGS_INGRESS_MAP_CKSUMV4)
+ skb_trim(skb,
+ skb->len - sizeof(struct rmnet_map_dl_csum_trailer));
skb->protocol = htons(ETH_P_MAP);
--
1.9.1
prev parent reply other threads:[~2018-05-14 20:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-14 20:08 [PATCH net-next 0/3] net: qualcomm: rmnet: Updates 2018-05-14 Subash Abhinov Kasiviswanathan
2018-05-14 20:08 ` [PATCH net-next 1/3] net: qualcomm: rmnet: Capture all drops in transmit path Subash Abhinov Kasiviswanathan
2018-05-14 20:08 ` [PATCH net-next 2/3] net: qualcomm: rmnet: Add support for ethtool private stats Subash Abhinov Kasiviswanathan
2018-05-15 4:42 ` kbuild test robot
2018-05-15 8:41 ` kbuild test robot
2018-05-15 18:09 ` Subash Abhinov Kasiviswanathan
2018-05-15 8:41 ` [RFC PATCH] net: qualcomm: rmnet: rmnet_ethtool_ops can be static kbuild test robot
2018-05-15 23:16 ` [PATCH net-next 2/3] net: qualcomm: rmnet: Add support for ethtool private stats kbuild test robot
2018-05-14 20:08 ` Subash Abhinov Kasiviswanathan [this message]
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=1526328527-20026-4-git-send-email-subashab@codeaurora.org \
--to=subashab@codeaurora$(echo .)org \
--cc=davem@davemloft$(echo .)net \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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