* [PATCH][next] RDMA/irdma: remove redundant initialization of variable val
@ 2021-06-05 13:13 Colin King
2021-06-07 14:53 ` Saleem, Shiraz
2021-06-07 23:46 ` Jason Gunthorpe
0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2021-06-05 13:13 UTC (permalink / raw)
To: Mustafa Ismail, Shiraz Saleem, Doug Ledford, Jason Gunthorpe, linux-rdma
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The variable val is being initialized with a value that is never
read, it is being updated later on. The assignment is redundant and
can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/infiniband/hw/irdma/ctrl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/irdma/ctrl.c b/drivers/infiniband/hw/irdma/ctrl.c
index 8bd3aecadaf6..b1023a7d0bd1 100644
--- a/drivers/infiniband/hw/irdma/ctrl.c
+++ b/drivers/infiniband/hw/irdma/ctrl.c
@@ -3323,7 +3323,7 @@ __le64 *irdma_sc_cqp_get_next_send_wqe_idx(struct irdma_sc_cqp *cqp, u64 scratch
*/
enum irdma_status_code irdma_sc_cqp_destroy(struct irdma_sc_cqp *cqp)
{
- u32 cnt = 0, val = 1;
+ u32 cnt = 0, val;
enum irdma_status_code ret_code = 0;
writel(0, cqp->dev->hw_regs[IRDMA_CCQPHIGH]);
--
2.31.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH][next] RDMA/irdma: remove redundant initialization of variable val
2021-06-05 13:13 [PATCH][next] RDMA/irdma: remove redundant initialization of variable val Colin King
@ 2021-06-07 14:53 ` Saleem, Shiraz
2021-06-07 23:46 ` Jason Gunthorpe
1 sibling, 0 replies; 3+ messages in thread
From: Saleem, Shiraz @ 2021-06-07 14:53 UTC (permalink / raw)
To: Colin King, Ismail, Mustafa, Doug Ledford, Jason Gunthorpe, linux-rdma
Cc: kernel-janitors, linux-kernel
> Subject: [PATCH][next] RDMA/irdma: remove redundant initialization of variable val
>
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable val is being initialized with a value that is never read, it is being
> updated later on. The assignment is redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/infiniband/hw/irdma/ctrl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/hw/irdma/ctrl.c b/drivers/infiniband/hw/irdma/ctrl.c
> index 8bd3aecadaf6..b1023a7d0bd1 100644
> --- a/drivers/infiniband/hw/irdma/ctrl.c
> +++ b/drivers/infiniband/hw/irdma/ctrl.c
> @@ -3323,7 +3323,7 @@ __le64 *irdma_sc_cqp_get_next_send_wqe_idx(struct
> irdma_sc_cqp *cqp, u64 scratch
> */
> enum irdma_status_code irdma_sc_cqp_destroy(struct irdma_sc_cqp *cqp) {
> - u32 cnt = 0, val = 1;
> + u32 cnt = 0, val;
Acked-by: Shiraz Saleem <shiraz.saleem@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][next] RDMA/irdma: remove redundant initialization of variable val
2021-06-05 13:13 [PATCH][next] RDMA/irdma: remove redundant initialization of variable val Colin King
2021-06-07 14:53 ` Saleem, Shiraz
@ 2021-06-07 23:46 ` Jason Gunthorpe
1 sibling, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2021-06-07 23:46 UTC (permalink / raw)
To: Colin King
Cc: Mustafa Ismail, Shiraz Saleem, Doug Ledford, linux-rdma,
kernel-janitors, linux-kernel
On Sat, Jun 05, 2021 at 02:13:47PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable val is being initialized with a value that is never
> read, it is being updated later on. The assignment is redundant and
> can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> Acked-by: Shiraz Saleem <shiraz.saleem@intel.com>
> ---
> drivers/infiniband/hw/irdma/ctrl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to for-next, thanks
Jason
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-07 23:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-05 13:13 [PATCH][next] RDMA/irdma: remove redundant initialization of variable val Colin King
2021-06-07 14:53 ` Saleem, Shiraz
2021-06-07 23:46 ` Jason Gunthorpe
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.