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 5/7] net: qualcomm: rmnet: Remove duplicate setting of rmnet_devices
Date: Tue, 10 Oct 2017 22:17:34 -0600 [thread overview]
Message-ID: <1507695456-17051-6-git-send-email-subashab@codeaurora.org> (raw)
In-Reply-To: <1507695456-17051-1-git-send-email-subashab@codeaurora.org>
The rmnet_devices information is already stored in muxed_ep, so
storing this in rmnet_devices[] again is redundant.
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
---
drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h | 1 -
drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c | 8 ++++----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h b/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h
index c5f5c6d..123ccf4 100644
--- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h
+++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h
@@ -33,7 +33,6 @@ struct rmnet_port {
struct rmnet_endpoint muxed_ep[RMNET_MAX_LOGICAL_EP];
u32 ingress_data_format;
u32 egress_data_format;
- struct net_device *rmnet_devices[RMNET_MAX_LOGICAL_EP];
u8 nr_rmnet_devs;
u8 rmnet_mode;
};
diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c b/drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c
index 4ca59a4..8b8497b 100644
--- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c
+++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c
@@ -105,12 +105,12 @@ int rmnet_vnd_newlink(u8 id, struct net_device *rmnet_dev,
struct rmnet_priv *priv;
int rc;
- if (port->rmnet_devices[id])
+ if (port->muxed_ep[id].egress_dev)
return -EINVAL;
rc = register_netdevice(rmnet_dev);
if (!rc) {
- port->rmnet_devices[id] = rmnet_dev;
+ port->muxed_ep[id].egress_dev = rmnet_dev;
port->nr_rmnet_devs++;
rmnet_dev->rtnl_link_ops = &rmnet_link_ops;
@@ -127,10 +127,10 @@ int rmnet_vnd_newlink(u8 id, struct net_device *rmnet_dev,
int rmnet_vnd_dellink(u8 id, struct rmnet_port *port)
{
- if (id >= RMNET_MAX_LOGICAL_EP || !port->rmnet_devices[id])
+ if (id >= RMNET_MAX_LOGICAL_EP || !port->muxed_ep[id].egress_dev)
return -EINVAL;
- port->rmnet_devices[id] = NULL;
+ port->muxed_ep[id].egress_dev = NULL;
port->nr_rmnet_devs--;
return 0;
}
--
1.9.1
next prev parent reply other threads:[~2017-10-11 4:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-11 4:17 [PATCH net-next 0/7] Rewrite some existing functionality Subash Abhinov Kasiviswanathan
2017-10-11 4:17 ` [PATCH net-next 1/7] net: qualcomm: rmnet: Remove existing logic for bridge mode Subash Abhinov Kasiviswanathan
2017-10-11 4:17 ` [PATCH net-next 2/7] net: qualcomm: rmnet: Remove some unused defines Subash Abhinov Kasiviswanathan
2017-10-11 4:17 ` [PATCH net-next 3/7] net: qualcomm: rmnet: Move rmnet_mode to rmnet_port Subash Abhinov Kasiviswanathan
2017-10-11 4:17 ` [PATCH net-next 4/7] net: qualcomm: rmnet: Remove duplicate setting of rmnet private info Subash Abhinov Kasiviswanathan
2017-10-11 4:17 ` Subash Abhinov Kasiviswanathan [this message]
2017-10-11 4:17 ` [PATCH net-next 6/7] net: qualcomm: rmnet: Convert the muxed endpoint to hlist Subash Abhinov Kasiviswanathan
2017-10-11 4:17 ` [PATCH net-next 7/7] net: qualcomm: rmnet: Implement bridge mode Subash Abhinov Kasiviswanathan
2017-10-11 22:22 ` [PATCH net-next 0/7] Rewrite some existing functionality David Miller
2017-10-11 22:25 ` David Miller
2017-10-11 23:11 ` Subash Abhinov Kasiviswanathan
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=1507695456-17051-6-git-send-email-subashab@codeaurora.org \
--to=subashab@codeaurora.org \
--cc=davem@davemloft.net \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.