[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20201008181802.GB374464@nvidia.com>
Date: Thu, 8 Oct 2020 15:18:02 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: Colin King <colin.king@...onical.com>
CC: Dennis Dalessandro <dennis.dalessandro@...el.com>,
Mike Marciniszyn <mike.marciniszyn@...el.com>,
Doug Ledford <dledford@...hat.com>,
Ira Weiny <ira.weiny@...el.com>, <linux-rdma@...r.kernel.org>,
<kernel-janitors@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] IB/rdmavt: Fix sizeof mismatch
On Thu, Oct 08, 2020 at 10:52:04AM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
>
> An incorrect sizeof is being used, struct rvt_ibport ** is not correct,
> it should be struct rvt_ibport *. Note that since ** is the same size as
> * this is not causing any issues. Improve this fix by using
> sizeof(*rdi->ports) as this allows us to not even reference the type
> of the pointer. Also remove line breaks as the entire statement can
> fit on one line.
>
> Addresses-Coverity: ("Sizeof not portable (SIZEOF_MISMATCH)")
> Fixes: ff6acd69518e ("IB/rdmavt: Add device structure allocation")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> Reviewed-by: Ira Weiny <ira.weiny@...el.com>
> Acked-by: Dennis Dalessandro <dennis.dalessandro@...nelisnetworks.com>
> ---
> drivers/infiniband/sw/rdmavt/vt.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
Applied to for-next, thanks
Jason
Powered by blists - more mailing lists