linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] RDMA/hw/qib/qib_iba7322: remove useless function
@ 2021-04-13  9:11 Jiapeng Chong
  2021-04-13 16:34 ` Jason Gunthorpe
  0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2021-04-13  9:11 UTC (permalink / raw)
  To: dennis.dalessandro
  Cc: mike.marciniszyn, dledford, jgg, linux-rdma, linux-kernel, Jiapeng Chong

Fix the following clang warning:

drivers/infiniband/hw/qib/qib_iba7322.c:803:19: warning: unused function
'qib_read_ureg' [-Wunused-function].

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/infiniband/hw/qib/qib_iba7322.c | 22 ----------------------
 1 file changed, 22 deletions(-)

diff --git a/drivers/infiniband/hw/qib/qib_iba7322.c b/drivers/infiniband/hw/qib/qib_iba7322.c
index 9fe6ea7..3cb4429 100644
--- a/drivers/infiniband/hw/qib/qib_iba7322.c
+++ b/drivers/infiniband/hw/qib/qib_iba7322.c
@@ -791,28 +791,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
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] RDMA/hw/qib/qib_iba7322: remove useless function
  2021-04-13  9:11 [PATCH] RDMA/hw/qib/qib_iba7322: remove useless function Jiapeng Chong
@ 2021-04-13 16:34 ` Jason Gunthorpe
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Gunthorpe @ 2021-04-13 16:34 UTC (permalink / raw)
  To: Jiapeng Chong
  Cc: dennis.dalessandro, mike.marciniszyn, dledford, linux-rdma, linux-kernel

On Tue, Apr 13, 2021 at 05:11:03PM +0800, Jiapeng Chong wrote:
> Fix the following clang warning:
> 
> drivers/infiniband/hw/qib/qib_iba7322.c:803:19: warning: unused function
> 'qib_read_ureg' [-Wunused-function].
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
>  drivers/infiniband/hw/qib/qib_iba7322.c | 22 ----------------------
>  1 file changed, 22 deletions(-)

Applied to for-next, thanks

Jason

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-13 16:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-13  9:11 [PATCH] RDMA/hw/qib/qib_iba7322: remove useless function Jiapeng Chong
2021-04-13 16:34 ` Jason Gunthorpe

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).