diff mbox

IB: qib: qib_iba7322: Remove unused function

Message ID 1420985082-17977-1-git-send-email-rickard_strandqvist@spectrumdigital.se (mailing list archive)
State Rejected
Headers show

Commit Message

Rickard Strandqvist Jan. 11, 2015, 2:04 p.m. UTC
Remove the function qib_read_ureg() that is not used anywhere.

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
 drivers/infiniband/hw/qib/qib_iba7322.c |   22 ----------------------
 1 file changed, 22 deletions(-)

Comments

Marciniszyn, Mike Jan. 16, 2015, 2:30 p.m. UTC | #1
> From: Rickard Strandqvist [mailto:rickard_strandqvist@spectrumdigital.se]
> Sent: Sunday, January 11, 2015 9:05 AM
> Subject: [PATCH] IB: qib: qib_iba7322: Remove unused function
> 
Roland, can you change the summary to:
	IB/qib: Remove unused function in qib_iba7322

Thanks for the patch!

Acked-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/infiniband/hw/qib/qib_iba7322.c b/drivers/infiniband/hw/qib/qib_iba7322.c
index a7eb325..a57b1a2 100644
--- a/drivers/infiniband/hw/qib/qib_iba7322.c
+++ b/drivers/infiniband/hw/qib/qib_iba7322.c
@@ -783,28 +783,6 @@  static inline u32 qib_read_ureg32(const struct qib_devdata *dd,
 }
 
 /**
- * qib_read_ureg - read virtualized per-context register
- * @dd: device
- * @regno: register number
- * @ctxt: context number
- *
- * Return the contents of a register that is virtualized to be per context.
- * Returns -1 on errors (not distinguishable from valid contents at
- * runtime; we may add a separate error variable at some point).
- */
-static inline u64 qib_read_ureg(const struct qib_devdata *dd,
-				enum qib_ureg regno, int ctxt)
-{
-
-	if (!dd->kregbase || !(dd->flags & QIB_PRESENT))
-		return 0;
-	return readq(regno + (u64 __iomem *)(
-		(dd->ureg_align * ctxt) + (dd->userbase ?
-		 (char __iomem *)dd->userbase :
-		 (char __iomem *)dd->kregbase + dd->uregbase)));
-}
-
-/**
  * qib_write_ureg - write virtualized per-context register
  * @dd: device
  * @regno: register number