Re: [PATCH] IB/mthca: remove redundant inner check of mdev->mthca_flags

From: Jason Gunthorpe
Date: Wed Sep 26 2018 - 18:34:40 EST


On Wed, Sep 26, 2018 at 01:26:08PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
>
> The inner check for mdev->mthca_flags & MTHCA_FLAG_MSI_X is redundant
> as this is already true because of the previous identical check in
> an outer if statement. Remove it
>
> Detected by cppcheck:
> (warning) Identical inner 'if' condition is always true.
>
> Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
> ---
> drivers/infiniband/hw/mthca/mthca_main.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)

Applied to for-next, thanks

Jason