From patchwork Fri May 29 04:39:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Kirsher X-Patchwork-Id: 218245 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8DE34C433DF for ; Fri, 29 May 2020 04:40:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 67CD420C09 for ; Fri, 29 May 2020 04:40:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726057AbgE2EkN (ORCPT ); Fri, 29 May 2020 00:40:13 -0400 Received: from mga03.intel.com ([134.134.136.65]:40325 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725808AbgE2EkH (ORCPT ); Fri, 29 May 2020 00:40:07 -0400 IronPort-SDR: pCSQ9FxYy1MuICgGN85G7z+iT40NkghBJvPTGZk6RJK9iDR2I3/aPOPXDe92qv7vmdqfbNFZ0b Blj3dL+5l4nQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 May 2020 21:40:05 -0700 IronPort-SDR: EX4F1TGJeCkOcaJ1UyIauWPrjY3z1w14iiy9QRmlU8jTKwTJ8WG64mn3LrsPEmZNTH6d4SKoJT YH1ryfT3U68g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,447,1583222400"; d="scan'208";a="414850905" Received: from jtkirshe-desk1.jf.intel.com ([134.134.177.86]) by orsmga004.jf.intel.com with ESMTP; 28 May 2020 21:40:05 -0700 From: Jeff Kirsher To: davem@davemloft.net Cc: Jason Yan , netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com, Andrew Bowers , Jeff Kirsher Subject: [net-next 04/17] ixgbe: Remove conversion to bool in ixgbe_device_supports_autoneg_fc() Date: Thu, 28 May 2020 21:39:51 -0700 Message-Id: <20200529044004.3725307-5-jeffrey.t.kirsher@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200529044004.3725307-1-jeffrey.t.kirsher@intel.com> References: <20200529044004.3725307-1-jeffrey.t.kirsher@intel.com> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jason Yan No need to convert '==' expression to bool. This fixes the following coccicheck warning: drivers/net/ethernet/intel/ixgbe/ixgbe_common.c:68:11-16: WARNING: conversion to bool not needed here Signed-off-by: Jason Yan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c index 39c5e6fdb72c..17357a12cbdc 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c @@ -64,8 +64,7 @@ bool ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw) hw->mac.ops.check_link(hw, &speed, &link_up, false); /* if link is down, assume supported */ if (link_up) - supported = speed == IXGBE_LINK_SPEED_1GB_FULL ? - true : false; + supported = speed == IXGBE_LINK_SPEED_1GB_FULL; else supported = true; }