Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3551425ybz; Mon, 20 Apr 2020 05:10:01 -0700 (PDT) X-Google-Smtp-Source: APiQypLcEEaBiCsMxSF9iNSIzLcCyZWDYUaSyrgoKoBVscYkXlUqp+9sBlJTXal1mJQjKQXzdLWu X-Received: by 2002:a05:6402:1773:: with SMTP id da19mr13842253edb.2.1587384600951; Mon, 20 Apr 2020 05:10:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587384600; cv=none; d=google.com; s=arc-20160816; b=VFTSw5Qhr1oPyj9VjyUU3V6CTnkDPW3gh1XP1ukEy/QD0vNKR2MMnkaGP7nvmCyPu1 PuBSrrZjRoJl/bGo1tLrEN6mLQUkcvy8NJ/bQHR5Folkm0Ha5psC2scIwKEto0jJ7Ozz gX7rUMJ4nWNGt0vwMjpxImH1vMtV3Q1w1mRfEBskbKSG0NB79GibbPF2yFinzDmLMjXl 2j+jpweGhGsxFYITGhGYSu9OG0P2lqQ7Lxf818tog+lQLDWNKwHzAXgxK1GUnKvRO9/P QNMWEK/EZBl6msIJ6bv3vkuYaEKr6ziOzW7oFtcx2Bk2D9FLqGX8Wao+dQKdTF76p7B1 RCqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=5DFpBSMvZLLLA0ijE3AieeK55J2OlY6+0NJ3YFd6Vmc=; b=eImF8sDwvMXz0HZf1dKjprISrQhz0Tb4YASOWVoyyHXeVEQ+aIubh02NsKLp/yOhMl osbFg/BCIVKBZhHRpI167kYAN3sl96HnJ5ysrRieLlT7A/bYFgF/3JxKcDL/IIAkp4xI /ms9ImO5K37XOZZTTCjBwxqAX/yKtChcUFIyH7hEKDkoJHX/rEPD+h8uwtC4/xIo0X1P OkXI4HSCV+/vyQvTQP0p7gasgEUnyyr5u8YeYpfCMvHsCyzw71bK/z3EdsO4mz2St0h4 bG4chspySVfbgeQxWISVz0f9QJZokrsLKm7xYfEjkoqo4eJzhbsipWce6HZewEPCLzRl n7+Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h64si434427edd.10.2020.04.20.05.09.37; Mon, 20 Apr 2020 05:10:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726696AbgDTMIR (ORCPT + 99 others); Mon, 20 Apr 2020 08:08:17 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:55926 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726581AbgDTMIR (ORCPT ); Mon, 20 Apr 2020 08:08:17 -0400 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 9F657B648C2AFE2537E3; Mon, 20 Apr 2020 20:08:14 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.487.0; Mon, 20 Apr 2020 20:08:07 +0800 From: Jason Yan To: , , , , , , , , , , , , , , , CC: Jason Yan Subject: [PATCH] i40e: Remove unneeded conversion to bool Date: Mon, 20 Apr 2020 20:34:48 +0800 Message-ID: <20200420123448.7382-1-yanaijie@huawei.com> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.28] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The '==' expression itself is bool, no need to convert it to bool again. This fixes the following coccicheck warning: drivers/net/ethernet/intel/i40e/i40e_main.c:1614:52-57: WARNING: conversion to bool not needed here drivers/net/ethernet/intel/i40e/i40e_main.c:11439:52-57: WARNING: conversion to bool not needed here Signed-off-by: Jason Yan --- drivers/net/ethernet/intel/i40e/i40e_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index 8c3e753bfb9d..2a037ec244b9 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -1611,7 +1611,7 @@ static int i40e_config_rss_aq(struct i40e_vsi *vsi, const u8 *seed, } } if (lut) { - bool pf_lut = vsi->type == I40E_VSI_MAIN ? true : false; + bool pf_lut = vsi->type == I40E_VSI_MAIN; ret = i40e_aq_set_rss_lut(hw, vsi->id, pf_lut, lut, lut_size); if (ret) { @@ -11436,7 +11436,7 @@ static int i40e_get_rss_aq(struct i40e_vsi *vsi, const u8 *seed, } if (lut) { - bool pf_lut = vsi->type == I40E_VSI_MAIN ? true : false; + bool pf_lut = vsi->type == I40E_VSI_MAIN; ret = i40e_aq_get_rss_lut(hw, vsi->id, pf_lut, lut, lut_size); if (ret) { -- 2.21.1