[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f229e924-8447-5656-12cc-4a7507a6130d@intel.com>
Date: Thu, 1 Mar 2018 09:47:46 -0800
From: Don Hiatt <don.hiatt@...el.com>
To: Colin King <colin.king@...onical.com>,
Dennis Dalessandro <dennis.dalessandro@...el.com>,
Mike Marciniszyn <mike.marciniszyn@...el.com>,
Doug Ledford <dledford@...hat.com>,
Jason Gunthorpe <jgg@...pe.ca>, linux-rdma@...r.kernel.org
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] infiniband: remove redundant assignment to pointer 'rdi'
On 3/1/2018 8:23 AM, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
>
> The pointer rdi is being initialized with a value that is never read
> and re-assigned immediately after, hence the initialization is redundant
> and can be removed.
>
> Cleans up clang warning:
> drivers/infiniband/sw/rdmavt/vt.c:94:23: warning: Value stored to 'rdi'
> during its initialization is never read
>
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
> drivers/infiniband/sw/rdmavt/vt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/sw/rdmavt/vt.c b/drivers/infiniband/sw/rdmavt/vt.c
> index a4553b2b3696..a67b0ddc2230 100644
> --- a/drivers/infiniband/sw/rdmavt/vt.c
> +++ b/drivers/infiniband/sw/rdmavt/vt.c
> @@ -91,7 +91,7 @@ module_exit(rvt_cleanup);
> */
> struct rvt_dev_info *rvt_alloc_device(size_t size, int nports)
> {
> - struct rvt_dev_info *rdi = ERR_PTR(-ENOMEM);
> + struct rvt_dev_info *rdi;
>
> rdi = (struct rvt_dev_info *)ib_alloc_device(size);
> if (!rdi)
Thanks: Reviewed-by: Don Hiatt <don.hiatt@...el.com>
Powered by blists - more mailing lists