[prev in list] [next in list] [prev in thread] [next in thread]
List: kvm
Subject: Re: [PATCH v2] vfio/mdev: remove unnecessary NULL check in mbochs_create()
From: Jason Gunthorpe <jgg () ziepe ! ca>
Date: 2021-04-30 17:21:57
Message-ID: 20210430172157.GY2047089 () ziepe ! ca
[Download RAW message or body]
On Thu, Apr 29, 2021 at 12:53:27PM +0300, Dan Carpenter wrote:
> Originally "type" could be NULL and these checks were required, but we
> recently changed how "type" is assigned and that's no longer the case.
> Now "type" points to an element in the middle of a non-NULL array.
>
> Removing the checks does not affect runtime at all, but it makes the
> code a little bit simpler to read.
>
> Fixes: 3d3a360e570616 ("vfio/mbochs: Use mdev_get_type_group_id()")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> Update the commit message
>
> samples/vfio-mdev/mbochs.c | 2 --
> samples/vfio-mdev/mdpy.c | 3 +--
> 2 files changed, 1 insertion(+), 4 deletions(-)
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
There are problably several of these code removal oversights.
Thanks,
Jason
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic