All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-next] RDMA/hns: Remove unused variables and definitions
@ 2020-09-27  9:52 Weihang Li
  2020-09-28 11:55 ` Jason Gunthorpe
  0 siblings, 1 reply; 5+ messages in thread
From: Weihang Li @ 2020-09-27  9:52 UTC (permalink / raw)
  To: dledford, jgg; +Cc: leon, linux-rdma, linuxarm

From: Lang Cheng <chenglang@huawei.com>

Some code was removed but the variables were still there, and some
parameters have been changed to be queried from firmware. So the
definitions of them are no longer needed.

Signed-off-by: Lang Cheng <chenglang@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
---
 drivers/infiniband/hw/hns/hns_roce_device.h | 8 --------
 drivers/infiniband/hw/hns/hns_roce_qp.c     | 2 --
 2 files changed, 10 deletions(-)

diff --git a/drivers/infiniband/hw/hns/hns_roce_device.h b/drivers/infiniband/hw/hns/hns_roce_device.h
index a8183ef..6d2acff 100644
--- a/drivers/infiniband/hw/hns/hns_roce_device.h
+++ b/drivers/infiniband/hw/hns/hns_roce_device.h
@@ -57,7 +57,6 @@
 /* Hardware specification only for v1 engine */
 #define HNS_ROCE_MAX_INNER_MTPT_NUM		0x7
 #define HNS_ROCE_MAX_MTPT_PBL_NUM		0x100000
-#define HNS_ROCE_MAX_SGE_NUM			2
 
 #define HNS_ROCE_EACH_FREE_CQ_WAIT_MSECS	20
 #define HNS_ROCE_MAX_FREE_CQ_WAIT_CNT	\
@@ -87,12 +86,7 @@
 #define HNS_ROCE_V2_QPC_SZ 256
 #define HNS_ROCE_V3_QPC_SZ 512
 
-#define HNS_ROCE_SL_SHIFT			28
-#define HNS_ROCE_TCLASS_SHIFT			20
-#define HNS_ROCE_FLOW_LABEL_MASK		0xfffff
-
 #define HNS_ROCE_MAX_PORTS			6
-#define HNS_ROCE_MAX_GID_NUM			16
 #define HNS_ROCE_GID_SIZE			16
 #define HNS_ROCE_SGE_SIZE			16
 
@@ -120,8 +114,6 @@
 #define PAGES_SHIFT_24				24
 #define PAGES_SHIFT_32				32
 
-#define HNS_ROCE_PCI_BAR_NUM			2
-
 #define HNS_ROCE_IDX_QUE_ENTRY_SZ		4
 #define SRQ_DB_REG				0x230
 
diff --git a/drivers/infiniband/hw/hns/hns_roce_qp.c b/drivers/infiniband/hw/hns/hns_roce_qp.c
index 7c3b548..d08e575 100644
--- a/drivers/infiniband/hw/hns/hns_roce_qp.c
+++ b/drivers/infiniband/hw/hns/hns_roce_qp.c
@@ -41,8 +41,6 @@
 #include "hns_roce_hem.h"
 #include <rdma/hns-abi.h>
 
-#define SQP_NUM				(2 * HNS_ROCE_MAX_PORTS)
-
 static void flush_work_handle(struct work_struct *work)
 {
 	struct hns_roce_work *flush_work = container_of(work,
-- 
2.8.1


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

* Re: [PATCH for-next] RDMA/hns: Remove unused variables and definitions
  2020-09-27  9:52 [PATCH for-next] RDMA/hns: Remove unused variables and definitions Weihang Li
@ 2020-09-28 11:55 ` Jason Gunthorpe
  2020-09-28 12:27   ` liweihang
  0 siblings, 1 reply; 5+ messages in thread
From: Jason Gunthorpe @ 2020-09-28 11:55 UTC (permalink / raw)
  To: Weihang Li; +Cc: dledford, leon, linux-rdma, linuxarm

On Sun, Sep 27, 2020 at 05:52:21PM +0800, Weihang Li wrote:
> From: Lang Cheng <chenglang@huawei.com>
> 
> Some code was removed but the variables were still there, and some
> parameters have been changed to be queried from firmware. So the
> definitions of them are no longer needed.
> 
> Signed-off-by: Lang Cheng <chenglang@huawei.com>
> Signed-off-by: Weihang Li <liweihang@huawei.com>
> ---
>  drivers/infiniband/hw/hns/hns_roce_device.h | 8 --------
>  drivers/infiniband/hw/hns/hns_roce_qp.c     | 2 --
>  2 files changed, 10 deletions(-)

Should have a fixes for the patch that removed the code

Jason

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

* Re: [PATCH for-next] RDMA/hns: Remove unused variables and definitions
  2020-09-28 11:55 ` Jason Gunthorpe
@ 2020-09-28 12:27   ` liweihang
  2020-09-28 12:50     ` Jason Gunthorpe
  0 siblings, 1 reply; 5+ messages in thread
From: liweihang @ 2020-09-28 12:27 UTC (permalink / raw)
  To: Jason Gunthorpe; +Cc: dledford, leon, linux-rdma, Linuxarm

On 2020/9/28 19:55, Jason Gunthorpe wrote:
> On Sun, Sep 27, 2020 at 05:52:21PM +0800, Weihang Li wrote:
>> From: Lang Cheng <chenglang@huawei.com>
>>
>> Some code was removed but the variables were still there, and some
>> parameters have been changed to be queried from firmware. So the
>> definitions of them are no longer needed.
>>
>> Signed-off-by: Lang Cheng <chenglang@huawei.com>
>> Signed-off-by: Weihang Li <liweihang@huawei.com>
>> ---
>>  drivers/infiniband/hw/hns/hns_roce_device.h | 8 --------
>>  drivers/infiniband/hw/hns/hns_roce_qp.c     | 2 --
>>  2 files changed, 10 deletions(-)
> 
> Should have a fixes for the patch that removed the code
> 
> Jason
> 

Hi Jason,

Thanks for the comment. But I'm confused about when we should add
fixes tag.

For example, The only purpose of this patch is to remove redundant
macro definitions, the macros to be removed belong to 4 different
former patches, so we have to add 4 lines of fixes. It seems difficult
to merge this one back to previous versions of kernel.

Should I split this patch into 4 patches and add a fixes tag for each
one, or just put all these fixes tag in this patch?

Thanks
Weihang

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

* Re: [PATCH for-next] RDMA/hns: Remove unused variables and definitions
  2020-09-28 12:27   ` liweihang
@ 2020-09-28 12:50     ` Jason Gunthorpe
  2020-09-28 12:58       ` liweihang
  0 siblings, 1 reply; 5+ messages in thread
From: Jason Gunthorpe @ 2020-09-28 12:50 UTC (permalink / raw)
  To: liweihang; +Cc: dledford, leon, linux-rdma, Linuxarm

On Mon, Sep 28, 2020 at 12:27:56PM +0000, liweihang wrote:
> On 2020/9/28 19:55, Jason Gunthorpe wrote:
> > On Sun, Sep 27, 2020 at 05:52:21PM +0800, Weihang Li wrote:
> >> From: Lang Cheng <chenglang@huawei.com>
> >>
> >> Some code was removed but the variables were still there, and some
> >> parameters have been changed to be queried from firmware. So the
> >> definitions of them are no longer needed.
> >>
> >> Signed-off-by: Lang Cheng <chenglang@huawei.com>
> >> Signed-off-by: Weihang Li <liweihang@huawei.com>
> >>  drivers/infiniband/hw/hns/hns_roce_device.h | 8 --------
> >>  drivers/infiniband/hw/hns/hns_roce_qp.c     | 2 --
> >>  2 files changed, 10 deletions(-)
> > 
> > Should have a fixes for the patch that removed the code
> > 
> > Jason
> > 
> 
> Hi Jason,
> 
> Thanks for the comment. But I'm confused about when we should add
> fixes tag.
> 
> For example, The only purpose of this patch is to remove redundant
> macro definitions, the macros to be removed belong to 4 different
> former patches, so we have to add 4 lines of fixes. It seems difficult
> to merge this one back to previous versions of kernel.

You can just list all four patches

Jason

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

* Re: [PATCH for-next] RDMA/hns: Remove unused variables and definitions
  2020-09-28 12:50     ` Jason Gunthorpe
@ 2020-09-28 12:58       ` liweihang
  0 siblings, 0 replies; 5+ messages in thread
From: liweihang @ 2020-09-28 12:58 UTC (permalink / raw)
  To: Jason Gunthorpe; +Cc: dledford, leon, linux-rdma, Linuxarm

On 2020/9/28 20:50, Jason Gunthorpe wrote:
> On Mon, Sep 28, 2020 at 12:27:56PM +0000, liweihang wrote:
>> On 2020/9/28 19:55, Jason Gunthorpe wrote:
>>> On Sun, Sep 27, 2020 at 05:52:21PM +0800, Weihang Li wrote:
>>>> From: Lang Cheng <chenglang@huawei.com>
>>>>
>>>> Some code was removed but the variables were still there, and some
>>>> parameters have been changed to be queried from firmware. So the
>>>> definitions of them are no longer needed.
>>>>
>>>> Signed-off-by: Lang Cheng <chenglang@huawei.com>
>>>> Signed-off-by: Weihang Li <liweihang@huawei.com>
>>>>  drivers/infiniband/hw/hns/hns_roce_device.h | 8 --------
>>>>  drivers/infiniband/hw/hns/hns_roce_qp.c     | 2 --
>>>>  2 files changed, 10 deletions(-)
>>>
>>> Should have a fixes for the patch that removed the code
>>>
>>> Jason
>>>
>>
>> Hi Jason,
>>
>> Thanks for the comment. But I'm confused about when we should add
>> fixes tag.
>>
>> For example, The only purpose of this patch is to remove redundant
>> macro definitions, the macros to be removed belong to 4 different
>> former patches, so we have to add 4 lines of fixes. It seems difficult
>> to merge this one back to previous versions of kernel.
> 
> You can just list all four patches
> 
> Jason
> 

I see, thank you.

Weihang

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

end of thread, other threads:[~2020-09-28 12:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-27  9:52 [PATCH for-next] RDMA/hns: Remove unused variables and definitions Weihang Li
2020-09-28 11:55 ` Jason Gunthorpe
2020-09-28 12:27   ` liweihang
2020-09-28 12:50     ` Jason Gunthorpe
2020-09-28 12:58       ` liweihang

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.