[PATCH 4.4 1/9] net/ncsi: Remove unused parameters for ncsi_free_req()

Gavin Shan gwshan at linux.vnet.ibm.com
Fri Oct 21 11:47:38 AEDT 2016


There are two parameters (@check and @timeout) in ncsi_free_req()
except @nr. @timeout isn't used inside the function. @check should
have been always set to true though it's not case, meaning we
needn't @check.

This removes the unused parameters (@check and @timeout). Eventually,
we have same parameters for this function among 4.4, 4.7 and upstream
code.

Signed-off-by: Gavin Shan <gwshan at linux.vnet.ibm.com>
---
 net/ncsi/internal.h    | 2 +-
 net/ncsi/ncsi-cmd.c    | 4 ++--
 net/ncsi/ncsi-manage.c | 6 +++---
 net/ncsi/ncsi-rsp.c    | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/net/ncsi/internal.h b/net/ncsi/internal.h
index 2525229..e97906c 100644
--- a/net/ncsi/internal.h
+++ b/net/ncsi/internal.h
@@ -139,7 +139,7 @@ void ncsi_find_package_and_channel(struct ncsi_dev_priv *ndp,
 				   struct ncsi_package **np,
 				   struct ncsi_channel **nc);
 struct ncsi_req *ncsi_alloc_req(struct ncsi_dev_priv *ndp);
-void ncsi_free_req(struct ncsi_req *nr, bool check, bool timeout);
+void ncsi_free_req(struct ncsi_req *nr);
 struct ncsi_dev *ncsi_find_dev(struct net_device *dev);
 int ncsi_config_dev(struct ncsi_dev *nd);
 
diff --git a/net/ncsi/ncsi-cmd.c b/net/ncsi/ncsi-cmd.c
index 9dbdcff..feedb66 100644
--- a/net/ncsi/ncsi-cmd.c
+++ b/net/ncsi/ncsi-cmd.c
@@ -296,7 +296,7 @@ static struct ncsi_req *ncsi_alloc_cmd_req(struct ncsi_cmd_arg *nca)
 	/* Allocate skb */
 	skb = alloc_skb(len, GFP_ATOMIC);
 	if (!skb) {
-		ncsi_free_req(nr, false, false);
+		ncsi_free_req(nr);
 		return NULL;
 	}
 
@@ -366,6 +366,6 @@ int ncsi_xmit_cmd(struct ncsi_cmd_arg *nca)
 
 	return 0;
 out:
-	ncsi_free_req(nr, false, false);
+	ncsi_free_req(nr);
 	return ret;
 }
diff --git a/net/ncsi/ncsi-manage.c b/net/ncsi/ncsi-manage.c
index 5080f72..b32aa39 100644
--- a/net/ncsi/ncsi-manage.c
+++ b/net/ncsi/ncsi-manage.c
@@ -334,7 +334,7 @@ struct ncsi_req *ncsi_alloc_req(struct ncsi_dev_priv *ndp)
 	return nr;
 }
 
-void ncsi_free_req(struct ncsi_req *nr, bool check, bool timeout)
+void ncsi_free_req(struct ncsi_req *nr)
 {
 	struct ncsi_dev_priv *ndp = nr->nr_ndp;
 	struct sk_buff *cmd, *rsp;
@@ -353,7 +353,7 @@ void ncsi_free_req(struct ncsi_req *nr, bool check, bool timeout)
 	nr->nr_used = false;
 	spin_unlock_irqrestore(&ndp->ndp_req_lock, flags);
 
-	if (check && cmd && atomic_dec_return(&ndp->ndp_pending_reqs) == 0)
+	if (cmd && atomic_dec_return(&ndp->ndp_pending_reqs) == 0)
 		schedule_work(&ndp->ndp_work);
 	/* Release command and response */
 	consume_skb(cmd);
@@ -802,7 +802,7 @@ static void ncsi_req_timeout(unsigned long data)
 	spin_unlock_irqrestore(&ndp->ndp_req_lock, flags);
 
 	/* Release the request */
-	ncsi_free_req(nr, true, true);
+	ncsi_free_req(nr);
 }
 
 struct ncsi_dev *ncsi_register_dev(struct net_device *dev,
diff --git a/net/ncsi/ncsi-rsp.c b/net/ncsi/ncsi-rsp.c
index c34998d..c24a1e1 100644
--- a/net/ncsi/ncsi-rsp.c
+++ b/net/ncsi/ncsi-rsp.c
@@ -1166,6 +1166,6 @@ int ncsi_rcv_rsp(struct sk_buff *skb, struct net_device *dev,
 
 out:
 	spin_unlock_irqrestore(&ndp->ndp_req_lock, flags);
-	ncsi_free_req(nr, true, false);
+	ncsi_free_req(nr);
 	return ret;
 }
-- 
2.1.0



More information about the openbmc mailing list