netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
To: netdev@vger.kernel.org, davem@davemloft.net
Cc: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>,
	Dan Williams <dcbw@redhat.com>
Subject: [PATCH net-next 2/6] net: qualcomm: rmnet: Remove the unused endpoint -1
Date: Sat,  2 Sep 2017 23:30:42 -0600	[thread overview]
Message-ID: <1504416646-9527-3-git-send-email-subashab@codeaurora.org> (raw)
In-Reply-To: <1504416646-9527-1-git-send-email-subashab@codeaurora.org>

This was used only in the original patch series where the IOCTLs were
present and is no longer in use.

Fixes: ceed73a2cf4a ("drivers: net: ethernet: qualcomm: rmnet: Initial implementation")
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Cc: Dan Williams <dcbw@redhat.com>
---
 drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c b/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
index e836d26..3ca98ec 100644
--- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
+++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
@@ -42,7 +42,6 @@
  */
 
 /* Local Definitions and Declarations */
-#define RMNET_LOCAL_LOGICAL_ENDPOINT -1
 
 struct rmnet_walk_data {
 	struct net_device *real_dev;
@@ -89,10 +88,7 @@ static int rmnet_is_real_dev_registered(const struct net_device *real_dev)
 		if (!r)
 			return NULL;
 
-		if (config_id == RMNET_LOCAL_LOGICAL_ENDPOINT)
-			ep = &r->local_ep;
-		else
-			ep = &r->muxed_ep[config_id];
+		ep = &r->muxed_ep[config_id];
 	}
 
 	return ep;
@@ -182,10 +178,7 @@ static int __rmnet_set_endpoint_config(struct net_device *dev, int config_id,
 		return -EINVAL;
 
 	memcpy(dev_ep, ep, sizeof(struct rmnet_endpoint));
-	if (config_id == RMNET_LOCAL_LOGICAL_ENDPOINT)
-		dev_ep->mux_id = 0;
-	else
-		dev_ep->mux_id = config_id;
+	dev_ep->mux_id = config_id;
 
 	return 0;
 }
@@ -199,8 +192,7 @@ static int rmnet_set_endpoint_config(struct net_device *dev,
 	netdev_dbg(dev, "id %d mode %d dev %s\n",
 		   config_id, rmnet_mode, egress_dev->name);
 
-	if (config_id < RMNET_LOCAL_LOGICAL_ENDPOINT ||
-	    config_id >= RMNET_MAX_LOGICAL_EP)
+	if (config_id >= RMNET_MAX_LOGICAL_EP)
 		return -EINVAL;
 
 	/* This config is cleared on every set, so its ok to not
-- 
1.9.1

  parent reply	other threads:[~2017-09-03  5:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-03  5:30 [PATCH net-next 0/6] net: qualcomm: rmnet: Fix comments on initial patchset Subash Abhinov Kasiviswanathan
2017-09-03  5:30 ` [PATCH net-next 1/6] net: qualcomm: rmnet: Fix memory corruption if mux_id is greater than 32 Subash Abhinov Kasiviswanathan
2017-09-03  5:30 ` Subash Abhinov Kasiviswanathan [this message]
2017-09-03  5:30 ` [PATCH net-next 3/6] net: qualcomm: rmnet: Move the device creation log Subash Abhinov Kasiviswanathan
2017-09-03  5:30 ` [PATCH net-next 4/6] net: qualcomm: rmnet: Refactor the new rmnet dev creation Subash Abhinov Kasiviswanathan
2017-09-03  5:30 ` [PATCH net-next 5/6] net: qualcomm: rmnet: Implement ndo_get_iflink Subash Abhinov Kasiviswanathan
2017-09-03  5:30 ` [PATCH net-next 6/6] net: qualcomm: rmnet: Rename real_dev_info to port Subash Abhinov Kasiviswanathan
2017-09-04  4:27 ` [PATCH net-next 0/6] net: qualcomm: rmnet: Fix comments on initial patchset 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=1504416646-9527-3-git-send-email-subashab@codeaurora.org \
    --to=subashab@codeaurora.org \
    --cc=davem@davemloft.net \
    --cc=dcbw@redhat.com \
    --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).