drivers:ocrdma:remove unneeded variable
Subsystems (2)
PATCH 1/1 drivers:ocrdma:remove unneeded variable
From: chiminghao <[email protected]>
return value form directly instead of
taking this in another redundant variable.
--- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +2 -6
@@ -1844,12 +1844,10 @@ int ocrdma_modify_srq(struct ib_srq *ibsrq,int ocrdma_query_srq (struct ib_srq *ibsrq,struct ib_srq_attr *srq_attr) { -int status;struct ocrdma_srq *srq; srq =get_ocrdma_srq (ibsrq); - status =ocrdma_mbx_query_srq (srq, srq_attr); -return status; +return ocrdma_mbx_query_srq (srq, srq_attr); }int ocrdma_destroy_srq (struct ib_srq *ibsrq,struct ib_udata *udata)
@@ -1960,7 +1958,6 @@ static int ocrdma_build_inline_sges(struct ocrdma_qp *qp,static int ocrdma_build_send (struct ocrdma_qp *qp,struct ocrdma_hdr_wqe *hdr,const struct ib_send_wr *wr) { -int status;struct ocrdma_sge *sge;u32 wqe_size =sizeof (*hdr);
@@ -1972,8 +1969,7 @@ static int ocrdma_build_send(struct ocrdma_qp *qp, struct ocrdma_hdr_wqe *hdr, sge = (struct ocrdma_sge *)(hdr +1 ); } - status =ocrdma_build_inline_sges (qp, hdr, sge, wr, wqe_size); -return status; +return ocrdma_build_inline_sges (qp, hdr, sge, wr, wqe_size); } static int ocrdma_build_write(struct ocrdma_qp *qp, struct ocrdma_hdr_wqe *hdr,
Signature · 1 line
2.25.1
Quoted 3 lines · On 12/8/21 5:52 PM, [email protected] wrote:
From: chiminghao <[email protected]>
return value form directly instead of
form
Quoted 1 line
taking this in another redundant variable.
Clean this message up.
Maybe just 'Return status directly from function called.'
Change itself looks fine.
Quoted 43 lines
Reported-by Zeal Robot <[email protected]>Signed-off-by chiminghao <[email protected]>--- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +2
-6@@ -1844,12 +1844,10 @@ int ocrdma_modify_srq(struct ib_srq *ibsrq,int ocrdma_query_srq (struct ib_srq *ibsrq,struct ib_srq_attr *srq_attr) { -int status;struct ocrdma_srq *srq; srq =get_ocrdma_srq (ibsrq); - status =ocrdma_mbx_query_srq (srq, srq_attr); -return status; +return ocrdma_mbx_query_srq (srq, srq_attr); }int ocrdma_destroy_srq (struct ib_srq *ibsrq,struct ib_udata *udata)@@ -1960,7 +1958,6 @@ static int ocrdma_build_inline_sges(struct ocrdma_qp *qp,static int ocrdma_build_send (struct ocrdma_qp *qp,struct ocrdma_hdr_wqe *hdr,const struct ib_send_wr *wr) { -int status;struct ocrdma_sge *sge;u32 wqe_size =sizeof (*hdr);@@ -1972,8 +1969,7 @@ static int ocrdma_build_send(struct ocrdma_qp *qp, struct ocrdma_hdr_wqe *hdr, sge = (struct ocrdma_sge *)(hdr +1 ); } - status =ocrdma_build_inline_sges (qp, hdr, sge, wr, wqe_size); -return status; +return ocrdma_build_inline_sges (qp, hdr, sge, wr, wqe_size); } static int ocrdma_build_write(struct ocrdma_qp *qp, struct ocrdma_hdr_wqe *hdr,
PATCH v2 1/1 drivers:ocrdma:remove unneeded variable
From: Minghao Chi <[email protected]>
Return status directly from function called.
--- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +2 -6
@@ -1844,12 +1844,10 @@ int ocrdma_modify_srq(struct ib_srq *ibsrq,int ocrdma_query_srq (struct ib_srq *ibsrq,struct ib_srq_attr *srq_attr) { -int status;struct ocrdma_srq *srq; srq =get_ocrdma_srq (ibsrq); - status =ocrdma_mbx_query_srq (srq, srq_attr); -return status; +return ocrdma_mbx_query_srq (srq, srq_attr); }int ocrdma_destroy_srq (struct ib_srq *ibsrq,struct ib_udata *udata)
@@ -1960,7 +1958,6 @@ static int ocrdma_build_inline_sges(struct ocrdma_qp *qp,static int ocrdma_build_send (struct ocrdma_qp *qp,struct ocrdma_hdr_wqe *hdr,const struct ib_send_wr *wr) { -int status;struct ocrdma_sge *sge;u32 wqe_size =sizeof (*hdr);
@@ -1972,8 +1969,7 @@ static int ocrdma_build_send(struct ocrdma_qp *qp, struct ocrdma_hdr_wqe *hdr, sge = (struct ocrdma_sge *)(hdr +1 ); } - status =ocrdma_build_inline_sges (qp, hdr, sge, wr, wqe_size); -return status; +return ocrdma_build_inline_sges (qp, hdr, sge, wr, wqe_size); } static int ocrdma_build_write(struct ocrdma_qp *qp, struct ocrdma_hdr_wqe *hdr,
Signature · 1 line
2.25.1
Quoted 12 lines
-----Original Message-----
From: [email protected] <[email protected]>
Sent: Friday, December 10, 2021 7:03 AM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; linux- [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [PATCHv2] drivers:ocrdma:remove unneeded variable
Change the format of subject line as per the guidelines
Quoted 52 lines
From: Minghao Chi <[email protected]>
Return status directly from function called.
Reported-by Zeal Robot <[email protected]>Signed-off-by Minghao Chi <[email protected]>--- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +1
-3@@ -1844,12 +1844,10 @@ int ocrdma_modify_srq(struct ib_srq *ibsrq,int ocrdma_query_srq (struct ib_srq *ibsrq,struct ib_srq_attr *srq_attr) { -int status;struct ocrdma_srq *srq; srq =get_ocrdma_srq (ibsrq); - status =ocrdma_mbx_query_srq (srq, srq_attr); -return status; +return ocrdma_mbx_query_srq (srq, srq_attr); } int ocrdma_destroy_srq(struct ib_srq *ibsrq, struct ib_udata *udata) @@ -1960,7 +1958,6 @@ static int ocrdma_build_inline_sges(struct
ocrdma_qp*qp, static int ocrdma_build_send(structocrdma_qp*qp, structocrdma_hdr_wqe*hdr,drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +1
-3const struct ib_send_wr *wr) { -int status;struct ocrdma_sge *sge;u32 wqe_size =sizeof (*hdr);@@ -1972,8 +1969,7 @@ static int ocrdma_build_send(struct ocrdma_qp *qp, struct ocrdma_hdr_wqe *hdr, sge = (struct ocrdma_sge *)(hdr +1 ); } - status =ocrdma_build_inline_sges (qp, hdr, sge, wr, wqe_size); -return status; +return ocrdma_build_inline_sges (qp, hdr, sge, wr, wqe_size); }static int ocrdma_build_write(struct
ocrdma_qp*qp, structocrdma_hdr_wqe*hdr,
--
2.25.1
PATCH v3 1/1 drivers: ocrdma: remove unneeded variable
From: Minghao Chi <[email protected]>
Return status directly from function called.
---
change since v2: [PATCHv2] drivers:ocrdma:remove unneeded variable
v3: [PATCH v3 ocrdma-next] drivers: ocrdma: remove unneeded variable
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +2 -6
@@ -1844,12 +1844,10 @@ int ocrdma_modify_srq(struct ib_srq *ibsrq,int ocrdma_query_srq (struct ib_srq *ibsrq,struct ib_srq_attr *srq_attr) { -int status;struct ocrdma_srq *srq; srq =get_ocrdma_srq (ibsrq); - status =ocrdma_mbx_query_srq (srq, srq_attr); -return status; +return ocrdma_mbx_query_srq (srq, srq_attr); }int ocrdma_destroy_srq (struct ib_srq *ibsrq,struct ib_udata *udata)
@@ -1960,7 +1958,6 @@ static int ocrdma_build_inline_sges(struct ocrdma_qp *qp,static int ocrdma_build_send (struct ocrdma_qp *qp,struct ocrdma_hdr_wqe *hdr,const struct ib_send_wr *wr) { -int status;struct ocrdma_sge *sge;u32 wqe_size =sizeof (*hdr);
@@ -1972,8 +1969,7 @@ static int ocrdma_build_send(struct ocrdma_qp *qp, struct ocrdma_hdr_wqe *hdr, sge = (struct ocrdma_sge *)(hdr +1 ); } - status =ocrdma_build_inline_sges (qp, hdr, sge, wr, wqe_size); -return status; +return ocrdma_build_inline_sges (qp, hdr, sge, wr, wqe_size); } static int ocrdma_build_write(struct ocrdma_qp *qp, struct ocrdma_hdr_wqe *hdr,
Signature · 1 line
2.25.1
RE: [External] : [PATCH v3 ocrdma-next] drivers: ocrdma: remove unneeded variable
Quoted 17 lines
-----Original Message-----
From: [email protected] <[email protected]>
Sent: Tuesday, December 14, 2021 1:41 PM
To: Devesh Sharma <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; linux- [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Zeal Robot <[email protected]>
Subject: [External] : [PATCH v3 ocrdma-next] drivers: ocrdma: remove unneeded variableFrom: Minghao Chi <[email protected]>
Quoted 7 lines
Return status directly from function called.
Reported-by Zeal Robot <[email protected]>Signed-off-by Minghao Chi <[email protected]>---
change since v2: [PATCHv2] drivers:ocrdma:remove unneeded variable
v3: [PATCH v3 ocrdma-next] drivers: ocrdma: remove unneeded
This should be:
[PATCH for-next v3]: RDMA/ocrdma: remove unneeded...
Quoted 44 lines
variable
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c| 8 ++------1 file changed, 2 insertions(+), 6 deletions(-)drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +1
-3@@ -1844,12 +1844,10 @@ int ocrdma_modify_srq(struct ib_srq *ibsrq,int ocrdma_query_srq (struct ib_srq *ibsrq,struct ib_srq_attr *srq_attr) { -int status;struct ocrdma_srq *srq; srq =get_ocrdma_srq (ibsrq); - status =ocrdma_mbx_query_srq (srq, srq_attr); -return status; +return ocrdma_mbx_query_srq (srq, srq_attr); } int ocrdma_destroy_srq(struct ib_srq *ibsrq, struct ib_udata *udata) @@ -1960,7 +1958,6 @@ static int ocrdma_build_inline_sges(struct
ocrdma_qp*qp, static int ocrdma_build_send(structocrdma_qp*qp, structocrdma_hdr_wqe*hdr,drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +1
-3const struct ib_send_wr *wr) { -int status;struct ocrdma_sge *sge;u32 wqe_size =sizeof (*hdr);@@ -1972,8 +1969,7 @@ static int ocrdma_build_send(struct ocrdma_qp *qp, struct ocrdma_hdr_wqe *hdr, sge = (struct ocrdma_sge *)(hdr +1 ); } - status =ocrdma_build_inline_sges (qp, hdr, sge, wr, wqe_size); -return status; +return ocrdma_build_inline_sges (qp, hdr, sge, wr, wqe_size); }static int ocrdma_build_write(struct
ocrdma_qp*qp, structocrdma_hdr_wqe*hdr,
--
2.25.1
PATCH v4 1/1 RDMA/ocrdma: remove unneeded variable
From: Minghao Chi <[email protected]>
Return status directly from function called.
---
change since v2: [PATCHv2] drivers:ocrdma:remove unneeded variable
v3: [PATCH v3 ocrdma-next] drivers: ocrdma: remove unneeded
variable
v4: [PATCH for-next v4] RDMA/ocrdma: remove unneeded
variable
Thanks!
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
(quoted diff) +0 -0
b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
index 735123d0e9ec..3bfbf4ec040d 100644
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +0 -0
@@ -1844,12 +1844,10 @@ int ocrdma_modify_srq(struct ib_srq *ibsrq, int ocrdma_query_srq(struct ib_srq *ibsrq, struct ib_srq_attr
*srq_attr)
{
- int status;
struct ocrdma_srq *srq;
srq = get_ocrdma_srq(ibsrq);
- status = ocrdma_mbx_query_srq(srq, srq_attr);
- return status;
+ return ocrdma_mbx_query_srq(srq, srq_attr);
}
int ocrdma_destroy_srq(struct ib_srq *ibsrq, struct ib_udata *udata)
@@ -1960,7 +1958,6 @@ static int ocrdma_build_inline_sges(struct ocrdma_qp *qp,
static int ocrdma_build_send(struct ocrdma_qp *qp, structocrdma_hdr_wqe *hdr,
const struct ib_send_wr *wr)
{
- int status;
struct ocrdma_sge *sge;
u32 wqe_size = sizeof(*hdr);
@@ -1972,8 +1969,7 @@ static int ocrdma_build_send(struct ocrdma_qp *qp, struct ocrdma_hdr_wqe *hdr,
sge = (struct ocrdma_sge *)(hdr + 1);
}
- status = ocrdma_build_inline_sges(qp, hdr, sge, wr, wqe_size);
- return status;
+ return ocrdma_build_inline_sges(qp, hdr, sge, wr, wqe_size);
}
static int ocrdma_build_write(struct ocrdma_qp *qp, structocrdma_hdr_wqe *hdr,
Signature · 1 line
2.25.1
RE: [External] : [PATCH for-next v4] RDMA/ocrdma: remove unneeded variable
Quoted 68 lines
-----Original Message-----
From: [email protected] <[email protected]>
Sent: Tuesday, December 14, 2021 2:54 PM
To: Devesh Sharma <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; linux- [email protected]; [email protected]; [email protected]; [email protected]; Zeal Robot <[email protected]>
Subject: [External] : [PATCH for-next v4] RDMA/ocrdma: remove unneeded variableFrom: Minghao Chi <[email protected]>
Return status directly from function called.
Reported-by Zeal Robot <[email protected]>Signed-off-by Minghao Chi <[email protected]>---
change since v2: [PATCHv2] drivers:ocrdma:remove unneeded variable
v3: [PATCH v3 ocrdma-next] drivers: ocrdma: remove unneeded
variable
v4: [PATCH for-next v4] RDMA/ocrdma: remove unneeded variable
Thanks!drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +1
-3@@ -1844,12 +1844,10 @@ int ocrdma_modify_srq(struct ib_srq *ibsrq,int ocrdma_query_srq (struct ib_srq *ibsrq,struct ib_srq_attr *srq_attr) { -int status;struct ocrdma_srq *srq; srq =get_ocrdma_srq (ibsrq); - status =ocrdma_mbx_query_srq (srq, srq_attr); -return status; +return ocrdma_mbx_query_srq (srq, srq_attr); }int
ocrdma_destroy_srq(struct ib_srq *ibsrq, struct ib_udata *udata)@@ -
1960,7 +1958,6 @@ static int ocrdma_build_inline_sges(structocrdma_qp*qp, static int ocrdma_build_send(structocrdma_qp*qp, structocrdma_hdr_wqe*hdr,drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +1
-3const struct ib_send_wr *wr) { -int status;struct ocrdma_sge *sge;u32 wqe_size =sizeof (*hdr);@@ -1972,8 +1969,7 @@ static int ocrdma_build_send(struct ocrdma_qp *qp, struct ocrdma_hdr_wqe *hdr, sge = (struct ocrdma_sge *)(hdr +1 ); } - status =ocrdma_build_inline_sges (qp, hdr, sge, wr, wqe_size); -return status; +return ocrdma_build_inline_sges (qp, hdr, sge, wr, wqe_size); }
Quoted 2 lines
static int ocrdma_build_write(struct
ocrdma_qp*qp, structocrdma_hdr_wqe*hdr,
LGTM
Quoted 2 lines
--
2.25.1
Jason Gunthorpe
maintainerRe: [PATCH for-next v4] RDMA/ocrdma: remove unneeded variable
In reply to [email protected]Quoted 13 lines · On Tue, Dec 14, 2021 at 09:23:39AM +0000, [email protected] wrote:
From: Minghao Chi <[email protected]>
Return status directly from function called.
Reported-by Zeal Robot <[email protected]>Signed-off-by Minghao Chi <[email protected]>---
change since v2: [PATCHv2] drivers:ocrdma:remove unneeded variable
v3: [PATCH v3 ocrdma-next] drivers: ocrdma: remove unneeded
variable
v4: [PATCH for-next v4] RDMA/ocrdma: remove unneeded
variable
Thanks!
Quoted 2 lines
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
This is white space mangled and won't apply, please fix your environment.
Jason
PATCH v5 1/1 RDMA/ocrdma: remove unneeded variable
From: Minghao Chi <[email protected]>
Return status directly from function called.
--- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +2 -6
@@ -1844,12 +1844,10 @@ int ocrdma_modify_srq(struct ib_srq *ibsrq,int ocrdma_query_srq (struct ib_srq *ibsrq,struct ib_srq_attr *srq_attr) { -int status;struct ocrdma_srq *srq; srq =get_ocrdma_srq (ibsrq); - status =ocrdma_mbx_query_srq (srq, srq_attr); -return status; +return ocrdma_mbx_query_srq (srq, srq_attr); }int ocrdma_destroy_srq (struct ib_srq *ibsrq,struct ib_udata *udata)
@@ -1960,7 +1958,6 @@ static int ocrdma_build_inline_sges(struct ocrdma_qp *qp,static int ocrdma_build_send (struct ocrdma_qp *qp,struct ocrdma_hdr_wqe *hdr,const struct ib_send_wr *wr) { -int status;struct ocrdma_sge *sge;u32 wqe_size =sizeof (*hdr);
@@ -1972,8 +1969,7 @@ static int ocrdma_build_send(struct ocrdma_qp *qp, struct ocrdma_hdr_wqe *hdr, sge = (struct ocrdma_sge *)(hdr +1 ); } - status =ocrdma_build_inline_sges (qp, hdr, sge, wr, wqe_size); -return status; +return ocrdma_build_inline_sges (qp, hdr, sge, wr, wqe_size); } static int ocrdma_build_write(struct ocrdma_qp *qp, struct ocrdma_hdr_wqe *hdr,
Signature · 1 line
2.25.1
Re: [PATCH for-next v5] RDMA/ocrdma: remove unneeded variable
Quoted 9 lines · On Wed, Dec 15, 2021 at 05:54:21AM +0000, [email protected] wrote:
From: Minghao Chi <[email protected]>
Return status directly from function called.
Reported-by Zeal Robot <[email protected]>Signed-off-by Minghao Chi <[email protected]>--- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
Please don't send vX patches as a reply to previous versions. It messes the emails thread very badly.
See an output of your previous attempts:
https://lore.kernel.org/all/[email protected]/
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-12-09 1:52 [PATCH] drivers:ocrdma:remove " cgel.zte 2021-12-09 13:08 ` Tom Rix
2021-12-10 1:32 ` [PATCHv2] " cgel.zte 2021-12-14 6:45 ` Devesh Sharma 2021-12-14 8:10 ` [PATCH v3 ocrdma-next] drivers: ocrdma: remove " cgel.zte 2021-12-14 8:43 ` [External] : " Devesh Sharma 2021-12-14 9:23 ` [PATCH for-next v4] RDMA/ocrdma: " cgel.zte
2021-12-14 11:12 ` [External] : " Devesh Sharma
2021-12-14 23:50 ` Jason Gunthorpe
2021-12-15 5:54 ` cgel.zte [this message]
Thanks
Re: [PATCH for-next v5] RDMA/ocrdma: remove unneeded variable
In reply to [email protected]Quoted 9 lines · On Wed, Dec 15, 2021 at 05:54:21AM +0000, [email protected] wrote:
From: Minghao Chi <[email protected]>
Return status directly from function called.
Reported-by Zeal Robot <[email protected]>Signed-off-by Minghao Chi <[email protected]>--- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
Applied to for-next, thanks
Jason