All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bhumika Goyal <bhumirks@gmail.com>
To: outreachy-kernel@googlegroups.com
Cc: Bhumika Goyal <bhumirks@gmail.com>
Subject: [PATCH 2/3] Staging: rdma: Remove wrapper clear_rcvctrl
Date: Thu, 25 Feb 2016 17:25:57 +0530	[thread overview]
Message-ID: <971c22f741c945f31f650275e4fe6d51192b7787.1456390351.git.bhumirks@gmail.com> (raw)
In-Reply-To: <cover.1456390351.git.bhumirks@gmail.com>
In-Reply-To: <cover.1456390351.git.bhumirks@gmail.com>

The function clear_rcvctrl can be replaced by direct call to
adjust_rcvctrl. So drop the wrapper function.
Done using coccinelle:

@@
expression dd,clear;
@@
- clear_rcvctrl(dd,clear);
+ adjust_rcvctrl(dd, 0, clear);

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/staging/rdma/hfi1/chip.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/rdma/hfi1/chip.c b/drivers/staging/rdma/hfi1/chip.c
index 371f948..7969dcb 100644
--- a/drivers/staging/rdma/hfi1/chip.c
+++ b/drivers/staging/rdma/hfi1/chip.c
@@ -6371,11 +6371,6 @@ static void adjust_rcvctrl(struct hfi1_devdata *dd, u64 add, u64 clear)
 	spin_unlock_irqrestore(&dd->rcvctrl_lock, flags);
 }
 
-static inline void clear_rcvctrl(struct hfi1_devdata *dd, u64 clear)
-{
-	adjust_rcvctrl(dd, 0, clear);
-}
-
 /*
  * Called from all interrupt handlers to start handling an SPC freeze.
  */
@@ -6458,7 +6453,7 @@ static void rxe_freeze(struct hfi1_devdata *dd)
 	int i;
 
 	/* disable port */
-	clear_rcvctrl(dd, RCV_CTRL_RCV_PORT_ENABLE_SMASK);
+	adjust_rcvctrl(dd, 0, RCV_CTRL_RCV_PORT_ENABLE_SMASK);
 
 	/* disable all receive contexts */
 	for (i = 0; i < dd->num_rcv_contexts; i++)
@@ -6629,7 +6624,7 @@ void handle_link_down(struct work_struct *work)
 	reset_neighbor_info(ppd);
 
 	/* disable the port */
-	clear_rcvctrl(ppd->dd, RCV_CTRL_RCV_PORT_ENABLE_SMASK);
+	adjust_rcvctrl(ppd->dd, 0, RCV_CTRL_RCV_PORT_ENABLE_SMASK);
 
 	/* If there is no cable attached, turn the DC off. Otherwise,
 	 * start the link bring up. */
@@ -9159,7 +9154,7 @@ void hfi1_quiet_serdes(struct hfi1_pportdata *ppd)
 	set_link_state(ppd, HLS_DN_OFFLINE);
 
 	/* disable the port */
-	clear_rcvctrl(dd, RCV_CTRL_RCV_PORT_ENABLE_SMASK);
+	adjust_rcvctrl(dd, 0, RCV_CTRL_RCV_PORT_ENABLE_SMASK);
 }
 
 static inline int init_cpu_counters(struct hfi1_devdata *dd)
-- 
1.9.1



  parent reply	other threads:[~2016-02-25 11:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-25 11:55 [PATCH 0/3] Staging: rdma: Remove wrapper functions Bhumika Goyal
2016-02-25 11:55 ` [PATCH 1/3] Staging: rdma: Remove wrapper function add_rcvctrl Bhumika Goyal
2016-02-25 11:55 ` Bhumika Goyal [this message]
2016-02-25 11:55 ` [PATCH 3/3] Staging: rdma: Remove wrapper sdma_start_hw_clean_up Bhumika Goyal
2016-02-25 12:49   ` [Outreachy kernel] " Julia Lawall
2016-02-25 14:19 ` [Outreachy kernel] [PATCH 0/3] Staging: rdma: Remove wrapper functions Arnd Bergmann
2016-02-25 14:28   ` Bhumika Goyal

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=971c22f741c945f31f650275e4fe6d51192b7787.1456390351.git.bhumirks@gmail.com \
    --to=bhumirks@gmail.com \
    --cc=outreachy-kernel@googlegroups.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 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.