* [PATCH] drivers:ocrdma:remove unneeded variable
@ 2021-12-09 1:52 cgel.zte
2021-12-09 13:08 ` Tom Rix
0 siblings, 1 reply; 12+ messages in thread
From: cgel.zte @ 2021-12-09 1:52 UTC (permalink / raw)
To: selvin.xavier
Cc: dledford, jgg, leon, dennis.dalessandro, galpress, chi.minghao,
trix, mbloch, linux-rdma, linux-kernel, Zeal Robot
From: chiminghao <chi.minghao@zte.com.cn>
return value form directly instead of
taking this in another redundant variable.
Reported-by: Zeal Robot <zealci@zte.com.cm>
Signed-off-by: chiminghao <chi.minghao@zte.com.cn>
---
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
index 735123d0e9ec..3bfbf4ec040d 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
@@ -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,
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH] drivers:ocrdma:remove unneeded variable
2021-12-09 1:52 [PATCH] drivers:ocrdma:remove unneeded variable cgel.zte
@ 2021-12-09 13:08 ` Tom Rix
2021-12-10 1:32 ` [PATCHv2] " cgel.zte
0 siblings, 1 reply; 12+ messages in thread
From: Tom Rix @ 2021-12-09 13:08 UTC (permalink / raw)
To: cgel.zte, selvin.xavier
Cc: dledford, jgg, leon, dennis.dalessandro, galpress, chi.minghao,
mbloch, linux-rdma, linux-kernel, Zeal Robot
On 12/8/21 5:52 PM, cgel.zte@gmail.com wrote:
> From: chiminghao <chi.minghao@zte.com.cn>
>
> return value form directly instead of
form
> taking this in another redundant variable.
Clean this message up.
Maybe just 'Return status directly from function called.'
Change itself looks fine.
Reviewed-by: Tom Rix <trix@redhat.com>
>
> Reported-by: Zeal Robot <zealci@zte.com.cm>
> Signed-off-by: chiminghao <chi.minghao@zte.com.cn>
> ---
> drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
> index 735123d0e9ec..3bfbf4ec040d 100644
> --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
> +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
> @@ -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,
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCHv2] drivers:ocrdma:remove unneeded variable
2021-12-09 13:08 ` Tom Rix
@ 2021-12-10 1:32 ` cgel.zte
2021-12-14 6:45 ` Devesh Sharma
0 siblings, 1 reply; 12+ messages in thread
From: cgel.zte @ 2021-12-10 1:32 UTC (permalink / raw)
To: trix
Cc: cgel.zte, chi.minghao, dennis.dalessandro, dledford, galpress,
jgg, leon, linux-kernel, linux-rdma, mbloch, selvin.xavier,
zealci
From: Minghao Chi <chi.minghao@zte.com.cn>
Return status directly from function called.
Reported-by: Zeal Robot <zealci@zte.com.cm>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
---
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
index 735123d0e9ec..3bfbf4ec040d 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
@@ -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,
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* RE: [PATCHv2] drivers:ocrdma:remove unneeded variable
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
0 siblings, 1 reply; 12+ messages in thread
From: Devesh Sharma @ 2021-12-14 6:45 UTC (permalink / raw)
To: cgel.zte, trix
Cc: chi.minghao, dennis.dalessandro, dledford, galpress, jgg, leon,
linux-kernel, linux-rdma, mbloch, selvin.xavier, zealci
> -----Original Message-----
> From: cgel.zte@gmail.com <cgel.zte@gmail.com>
> Sent: Friday, December 10, 2021 7:03 AM
> To: trix@redhat.com
> Cc: cgel.zte@gmail.com; chi.minghao@zte.com.cn;
> dennis.dalessandro@cornelisnetworks.com; dledford@redhat.com;
> galpress@amazon.com; jgg@ziepe.ca; leon@kernel.org; linux-
> kernel@vger.kernel.org; linux-rdma@vger.kernel.org; mbloch@nvidia.com;
> selvin.xavier@broadcom.com; zealci@zte.com.cm
> Subject: [PATCHv2] drivers:ocrdma:remove unneeded variable
Change the format of subject line as per the guidelines
>
> From: Minghao Chi <chi.minghao@zte.com.cn>
>
> Return status directly from function called.
>
> Reported-by: Zeal Robot <zealci@zte.com.cm>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
> ---
> drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
> b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
> index 735123d0e9ec..3bfbf4ec040d 100644
> --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
> +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
> @@ -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,
> --
> 2.25.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v3 ocrdma-next] drivers: ocrdma: remove unneeded variable
2021-12-14 6:45 ` Devesh Sharma
@ 2021-12-14 8:10 ` cgel.zte
2021-12-14 8:43 ` [External] : " Devesh Sharma
0 siblings, 1 reply; 12+ messages in thread
From: cgel.zte @ 2021-12-14 8:10 UTC (permalink / raw)
To: devesh.s.sharma
Cc: cgel.zte, chi.minghao, dennis.dalessandro, dledford, galpress,
jgg, leon, linux-kernel, linux-rdma, mbloch, selvin.xavier, trix,
zealci, Zeal Robot
From: Minghao Chi <chi.minghao@zte.com.cn>
Return status directly from function called.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
---
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(-)
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
index 735123d0e9ec..3bfbf4ec040d 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
@@ -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,
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* RE: [External] : [PATCH v3 ocrdma-next] drivers: ocrdma: remove unneeded variable
2021-12-14 8:10 ` [PATCH v3 ocrdma-next] drivers: ocrdma: remove " cgel.zte
@ 2021-12-14 8:43 ` Devesh Sharma
2021-12-14 9:23 ` [PATCH for-next v4] RDMA/ocrdma: " cgel.zte
0 siblings, 1 reply; 12+ messages in thread
From: Devesh Sharma @ 2021-12-14 8:43 UTC (permalink / raw)
To: cgel.zte
Cc: chi.minghao, dennis.dalessandro, dledford, jgg, leon,
linux-kernel, linux-rdma, mbloch, selvin.xavier, trix
> -----Original Message-----
> From: cgel.zte@gmail.com <cgel.zte@gmail.com>
> Sent: Tuesday, December 14, 2021 1:41 PM
> To: Devesh Sharma <devesh.s.sharma@oracle.com>
> Cc: cgel.zte@gmail.com; chi.minghao@zte.com.cn;
> dennis.dalessandro@cornelisnetworks.com; dledford@redhat.com;
> galpress@amazon.com; jgg@ziepe.ca; leon@kernel.org; linux-
> kernel@vger.kernel.org; linux-rdma@vger.kernel.org; mbloch@nvidia.com;
> selvin.xavier@broadcom.com; trix@redhat.com; zealci@zte.com.cm; Zeal
> Robot <zealci@zte.com.cn>
> Subject: [External] : [PATCH v3 ocrdma-next] drivers: ocrdma: remove
> unneeded variable
>
> From: Minghao Chi <chi.minghao@zte.com.cn>
>
> Return status directly from function called.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
> ---
> 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...
> variable drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
> b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
> index 735123d0e9ec..3bfbf4ec040d 100644
> --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
> +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
> @@ -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,
> --
> 2.25.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH for-next v4] RDMA/ocrdma: remove unneeded variable
2021-12-14 8:43 ` [External] : " Devesh Sharma
@ 2021-12-14 9:23 ` cgel.zte
2021-12-14 11:12 ` [External] : " Devesh Sharma
2021-12-14 23:50 ` Jason Gunthorpe
0 siblings, 2 replies; 12+ messages in thread
From: cgel.zte @ 2021-12-14 9:23 UTC (permalink / raw)
To: devesh.s.sharma
Cc: cgel.zte, chi.minghao, dennis.dalessandro, dledford, jgg, leon,
linux-kernel, linux-rdma, mbloch, selvin.xavier, trix,
Zeal Robot
From: Minghao Chi <chi.minghao@zte.com.cn>
Return status directly from function called.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
---
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(-)
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
index 735123d0e9ec..3bfbf4ec040d 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
@@ -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,
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* RE: [External] : [PATCH for-next v4] RDMA/ocrdma: remove unneeded variable
2021-12-14 9:23 ` [PATCH for-next v4] RDMA/ocrdma: " cgel.zte
@ 2021-12-14 11:12 ` Devesh Sharma
2021-12-14 23:50 ` Jason Gunthorpe
1 sibling, 0 replies; 12+ messages in thread
From: Devesh Sharma @ 2021-12-14 11:12 UTC (permalink / raw)
To: cgel.zte
Cc: chi.minghao, dennis.dalessandro, dledford, jgg, leon,
linux-kernel, linux-rdma, mbloch, selvin.xavier, trix,
Zeal Robot
> -----Original Message-----
> From: cgel.zte@gmail.com <cgel.zte@gmail.com>
> Sent: Tuesday, December 14, 2021 2:54 PM
> To: Devesh Sharma <devesh.s.sharma@oracle.com>
> Cc: cgel.zte@gmail.com; chi.minghao@zte.com.cn;
> dennis.dalessandro@cornelisnetworks.com; dledford@redhat.com;
> jgg@ziepe.ca; leon@kernel.org; linux-kernel@vger.kernel.org; linux-
> rdma@vger.kernel.org; mbloch@nvidia.com; selvin.xavier@broadcom.com;
> trix@redhat.com; Zeal Robot <zealci@zte.com.cn>
> Subject: [External] : [PATCH for-next v4] RDMA/ocrdma: remove unneeded
> variable
>
> From: Minghao Chi <chi.minghao@zte.com.cn>
>
> Return status directly from function called.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
> ---
> 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(-)
>
> diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
> b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
> index 735123d0e9ec..3bfbf4ec040d 100644
> --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
> +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
> @@ -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,
LGTM
Reviewed-by: Devesh Sharma <devesh.s.sharma@oracle.com>
> --
> 2.25.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH for-next v4] RDMA/ocrdma: remove unneeded variable
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 ` [PATCH for-next v5] " cgel.zte
1 sibling, 1 reply; 12+ messages in thread
From: Jason Gunthorpe @ 2021-12-14 23:50 UTC (permalink / raw)
To: cgel.zte
Cc: devesh.s.sharma, chi.minghao, dennis.dalessandro, dledford, leon,
linux-kernel, linux-rdma, mbloch, selvin.xavier, trix,
Zeal Robot
On Tue, Dec 14, 2021 at 09:23:39AM +0000, cgel.zte@gmail.com wrote:
> From: Minghao Chi <chi.minghao@zte.com.cn>
>
> Return status directly from function called.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
> ---
> 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(-)
This is white space mangled and won't apply, please fix your
environment.
Jason
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH for-next v5] RDMA/ocrdma: remove unneeded variable
2021-12-14 23:50 ` Jason Gunthorpe
@ 2021-12-15 5:54 ` cgel.zte
2022-01-03 7:58 ` Leon Romanovsky
2022-01-05 17:54 ` Jason Gunthorpe
0 siblings, 2 replies; 12+ messages in thread
From: cgel.zte @ 2021-12-15 5:54 UTC (permalink / raw)
To: jgg
Cc: cgel.zte, chi.minghao, dennis.dalessandro, devesh.s.sharma,
dledford, leon, linux-kernel, linux-rdma, mbloch, selvin.xavier,
trix, zealci
From: Minghao Chi <chi.minghao@zte.com.cn>
Return status directly from function called.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
---
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
index 735123d0e9ec..3bfbf4ec040d 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
@@ -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,
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH for-next v5] RDMA/ocrdma: remove unneeded variable
2021-12-15 5:54 ` [PATCH for-next v5] " cgel.zte
@ 2022-01-03 7:58 ` Leon Romanovsky
2022-01-05 17:54 ` Jason Gunthorpe
1 sibling, 0 replies; 12+ messages in thread
From: Leon Romanovsky @ 2022-01-03 7:58 UTC (permalink / raw)
To: cgel.zte
Cc: jgg, chi.minghao, dennis.dalessandro, devesh.s.sharma, dledford,
linux-kernel, linux-rdma, mbloch, selvin.xavier, trix, zealci
On Wed, Dec 15, 2021 at 05:54:21AM +0000, cgel.zte@gmail.com wrote:
> From: Minghao Chi <chi.minghao@zte.com.cn>
>
> Return status directly from function called.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
> ---
> 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/20211215055421.441375-1-chi.minghao@zte.com.cn/
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH for-next v5] RDMA/ocrdma: remove unneeded variable
2021-12-15 5:54 ` [PATCH for-next v5] " cgel.zte
2022-01-03 7:58 ` Leon Romanovsky
@ 2022-01-05 17:54 ` Jason Gunthorpe
1 sibling, 0 replies; 12+ messages in thread
From: Jason Gunthorpe @ 2022-01-05 17:54 UTC (permalink / raw)
To: cgel.zte
Cc: chi.minghao, dennis.dalessandro, devesh.s.sharma, dledford, leon,
linux-kernel, linux-rdma, mbloch, selvin.xavier, trix, zealci
On Wed, Dec 15, 2021 at 05:54:21AM +0000, cgel.zte@gmail.com wrote:
> From: Minghao Chi <chi.minghao@zte.com.cn>
>
> Return status directly from function called.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
> ---
> drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
Applied to for-next, thanks
Jason
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2022-01-05 17:54 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-09 1:52 [PATCH] drivers:ocrdma:remove unneeded variable 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 ` [PATCH for-next v5] " cgel.zte
2022-01-03 7:58 ` Leon Romanovsky
2022-01-05 17:54 ` 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).