Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp418376ybj; Tue, 5 May 2020 00:47:09 -0700 (PDT) X-Google-Smtp-Source: APiQypIgXizf3X/aLrBkW+64kdqWWb/s8POfW2IcoA4YVFEak8GV4ktXtahRU+T3q2Vm6Xp929u/ X-Received: by 2002:aa7:d653:: with SMTP id v19mr1370331edr.383.1588664828972; Tue, 05 May 2020 00:47:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588664828; cv=none; d=google.com; s=arc-20160816; b=vqi5nYS9BV23fMlPBT/tsEPukafmNTitncbOJLIc3AylT11DcA11h8HjXLtj9a7qqn xVEIVPs8T0owwToie2WP9mUTevtKdhubfbAckU91aGgJibLVvJEZFu0qSRKghRkubak2 00irUjE+SM/D9OT23xa+3Clfq0htH8lHeV3BdWIwDNHcUISjameJ9ftCwG+Paj4TqclA yAWg/XW+mz1AQcQI2N8Ep7xjIsUgqmzrRDR80aAjqYXvMfIhenjSNswKMKZyQWXiUC1X VAWKjwrCSDeAOx7p/Yj6ybukC1RGWhwhl7KRPT+iu/dbzXibwDnCKThcbb92XKL04Pvq 8kWw== 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=4mEkDst6B3ST8pUDfe8s1w3a66wur9IgxR/0NxkH8Lg=; b=WI+KpPbnCBrw+itQ2iJ032r05X+hCa6OU3+QM0q++yhuWMDWoaEX4IhRtNEDGLywpa DzsxtrqWRNKdSlz6AMPy1Svb5nqtjdKZZfDoCQV7/27Hi+kUG+8lW+xt1qF4ZXJqYlvE 7bo7EGBLeyoQ+Nr0pbo3BcE7LFAAiyYpAzkUeeBxrD0V/PqcnaiuQpTSHlURscfQ7PGb 3G2hynNRr3sFpeXCYpunud1/o6M/FUH6mXAHbAKZhFqKIRzpmfXWrVpg2GJJNOYdCFCt snCeCpDSbQUeCLRaLiJA+KDiT7PeAasIWaax/DxZ9myc3XB1OE1NHnQLGj6ggyXRyFKc xzJA== 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 x17si650120ejn.21.2020.05.05.00.46.46; Tue, 05 May 2020 00:47:08 -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 S1728374AbgEEHmw (ORCPT + 99 others); Tue, 5 May 2020 03:42:52 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:54900 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725766AbgEEHmw (ORCPT ); Tue, 5 May 2020 03:42:52 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 760F6BFCF16D399DC908; Tue, 5 May 2020 15:42:45 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.487.0; Tue, 5 May 2020 15:42:35 +0800 From: Jason Yan To: , , , , CC: Jason Yan Subject: [PATCH net-next] ixgbe: Remove conversion to bool in ixgbe_device_supports_autoneg_fc() Date: Tue, 5 May 2020 15:41:57 +0800 Message-ID: <20200505074157.40938-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 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 --- 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 0bd1294ba517..2d896d663e3d 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; } -- 2.21.1