linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] IB/rxe: Remove unused variable (char *rxe_qp_state_name[])
@ 2018-02-27 22:07 Hernán Gonzalez
  2018-02-27 22:17 ` Bart Van Assche
  2018-02-28 21:16 ` Jason Gunthorpe
  0 siblings, 2 replies; 5+ messages in thread
From: Hernán Gonzalez @ 2018-02-27 22:07 UTC (permalink / raw)
  To: monis, dledford, jgg, linux-rdma, linux-kernel; +Cc: Hernán Gonzalez

Note: This is compile only tested as I have no access to the hw.
This variable was not used anywhere in the code. Removing it saves 24 bytes.

add/remove: 0/1 grow/shrink: 0/0 up/down: 0/-24 (-24)
Function                                     old     new   delta
rxe_qp_state_name                             24       -     -24
Total: Before=3348732, After=3348708, chg -0.00%

Signed-off-by: Hernán Gonzalez <hernan@vanguardiasur.com.ar>
---
 drivers/infiniband/sw/rxe/rxe_qp.c    | 9 ---------
 drivers/infiniband/sw/rxe/rxe_verbs.h | 2 --
 2 files changed, 11 deletions(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_qp.c b/drivers/infiniband/sw/rxe/rxe_qp.c
index 137d6c0..ba4652f 100644
--- a/drivers/infiniband/sw/rxe/rxe_qp.c
+++ b/drivers/infiniband/sw/rxe/rxe_qp.c
@@ -40,15 +40,6 @@
 #include "rxe_queue.h"
 #include "rxe_task.h"
 
-char *rxe_qp_state_name[] = {
-	[QP_STATE_RESET]	= "RESET",
-	[QP_STATE_INIT]		= "INIT",
-	[QP_STATE_READY]	= "READY",
-	[QP_STATE_DRAIN]	= "DRAIN",
-	[QP_STATE_DRAINED]	= "DRAINED",
-	[QP_STATE_ERROR]	= "ERROR",
-};
-
 static int rxe_qp_chk_cap(struct rxe_dev *rxe, struct ib_qp_cap *cap,
 			  int has_srq)
 {
diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.h b/drivers/infiniband/sw/rxe/rxe_verbs.h
index 1019f5e..af1470d 100644
--- a/drivers/infiniband/sw/rxe/rxe_verbs.h
+++ b/drivers/infiniband/sw/rxe/rxe_verbs.h
@@ -139,8 +139,6 @@ enum rxe_qp_state {
 	QP_STATE_ERROR
 };
 
-extern char *rxe_qp_state_name[];
-
 struct rxe_req_info {
 	enum rxe_qp_state	state;
 	int			wqe_index;
-- 
2.7.4

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

* Re: [PATCH] IB/rxe: Remove unused variable (char *rxe_qp_state_name[])
  2018-02-27 22:07 [PATCH] IB/rxe: Remove unused variable (char *rxe_qp_state_name[]) Hernán Gonzalez
@ 2018-02-27 22:17 ` Bart Van Assche
  2018-02-28 22:58   ` Hernán Gonzalez
  2018-02-28 21:16 ` Jason Gunthorpe
  1 sibling, 1 reply; 5+ messages in thread
From: Bart Van Assche @ 2018-02-27 22:17 UTC (permalink / raw)
  To: linux-kernel, monis, jgg, linux-rdma, dledford, hernan

On Tue, 2018-02-27 at 19:07 -0300, Hernán Gonzalez wrote:
> Note: This is compile only tested as I have no access to the hw.

Hello Hernán,

Are you aware that the only hardware that is needed to test this driver is
an Ethernet interface, and that this driver even supports the loopback
interface?

Bart.

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

* Re: [PATCH] IB/rxe: Remove unused variable (char *rxe_qp_state_name[])
  2018-02-27 22:07 [PATCH] IB/rxe: Remove unused variable (char *rxe_qp_state_name[]) Hernán Gonzalez
  2018-02-27 22:17 ` Bart Van Assche
@ 2018-02-28 21:16 ` Jason Gunthorpe
  1 sibling, 0 replies; 5+ messages in thread
From: Jason Gunthorpe @ 2018-02-28 21:16 UTC (permalink / raw)
  To: Hernán Gonzalez; +Cc: monis, dledford, linux-rdma, linux-kernel

On Tue, Feb 27, 2018 at 07:07:58PM -0300, Hernán Gonzalez wrote:
> Note: This is compile only tested as I have no access to the hw.
> This variable was not used anywhere in the code. Removing it saves 24 bytes.
> 
> add/remove: 0/1 grow/shrink: 0/0 up/down: 0/-24 (-24)
> Function                                     old     new   delta
> rxe_qp_state_name                             24       -     -24
> Total: Before=3348732, After=3348708, chg -0.00%
> 
> Signed-off-by: Hernán Gonzalez <hernan@vanguardiasur.com.ar>
>  drivers/infiniband/sw/rxe/rxe_qp.c    | 9 ---------
>  drivers/infiniband/sw/rxe/rxe_verbs.h | 2 --
>  2 files changed, 11 deletions(-)

Applied to for-next, thanks

Jason

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

* Re: [PATCH] IB/rxe: Remove unused variable (char *rxe_qp_state_name[])
  2018-02-27 22:17 ` Bart Van Assche
@ 2018-02-28 22:58   ` Hernán Gonzalez
  2018-03-12 16:51     ` Yuval Shaia
  0 siblings, 1 reply; 5+ messages in thread
From: Hernán Gonzalez @ 2018-02-28 22:58 UTC (permalink / raw)
  To: Bart Van Assche; +Cc: linux-kernel, monis, jgg, linux-rdma, dledford

On Tue, Feb 27, 2018 at 7:17 PM, Bart Van Assche <Bart.VanAssche@wdc.com> wrote:
> On Tue, 2018-02-27 at 19:07 -0300, Hernán Gonzalez wrote:
>> Note: This is compile only tested as I have no access to the hw.
>
> Hello Hernán,
>
> Are you aware that the only hardware that is needed to test this driver is
> an Ethernet interface, and that this driver even supports the loopback
> interface?
>
> Bart.
>

Hello Bart,

No, I didn't know, sorry about that. I'll test it as soon as I can.
Thanks for the response.

Cheers,
Hernán

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

* Re: [PATCH] IB/rxe: Remove unused variable (char *rxe_qp_state_name[])
  2018-02-28 22:58   ` Hernán Gonzalez
@ 2018-03-12 16:51     ` Yuval Shaia
  0 siblings, 0 replies; 5+ messages in thread
From: Yuval Shaia @ 2018-03-12 16:51 UTC (permalink / raw)
  To: Hernán Gonzalez
  Cc: Bart Van Assche, linux-kernel, monis, jgg, linux-rdma, dledford

On Wed, Feb 28, 2018 at 07:58:20PM -0300, Hernán Gonzalez wrote:
> On Tue, Feb 27, 2018 at 7:17 PM, Bart Van Assche <Bart.VanAssche@wdc.com> wrote:
> > On Tue, 2018-02-27 at 19:07 -0300, Hernán Gonzalez wrote:
> >> Note: This is compile only tested as I have no access to the hw.
> >
> > Hello Hernán,
> >
> > Are you aware that the only hardware that is needed to test this driver is
> > an Ethernet interface, and that this driver even supports the loopback
> > interface?
> >
> > Bart.
> >
> 
> Hello Bart,
> 
> No, I didn't know, sorry about that. I'll test it as soon as I can.
> Thanks for the response.

Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Tested-by: Yuval Shaia <yuval.shaia@oracle.com>

> 
> Cheers,
> Hernán
> --
> 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

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

end of thread, other threads:[~2018-03-12 16:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-27 22:07 [PATCH] IB/rxe: Remove unused variable (char *rxe_qp_state_name[]) Hernán Gonzalez
2018-02-27 22:17 ` Bart Van Assche
2018-02-28 22:58   ` Hernán Gonzalez
2018-03-12 16:51     ` Yuval Shaia
2018-02-28 21:16 ` 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).