Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3551765ybz; Mon, 20 Apr 2020 05:10:23 -0700 (PDT) X-Google-Smtp-Source: APiQypID2qtsAzf4U6Q6zSPrqou23KmEbq9YDGGnYNtLYPrV+T1g7wRjc1SKIDBZbEdMuFvBJSaX X-Received: by 2002:a50:ef09:: with SMTP id m9mr5383600eds.321.1587384623604; Mon, 20 Apr 2020 05:10:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587384623; cv=none; d=google.com; s=arc-20160816; b=cIsa1dZCwLRHH7pBBPVebPoBR9N0to2ydPnRtqx1byQkC70PgvMmdGWwyewi1H/eYj BhzspjvgINk8++ji5AQ3CZzMmGeyuI4SQP8Rhv7owNqZBxP/b+bI65fqt9oFzYsQzhqM v/O+S1W/goczTzkLb+h/924tGbICsEeWvo64KLe4hr63CFTL0KaAyqU5+KfgTuTDyZbT ftqRzrL/xfayTHCGPoTM+tQmT+PT+76NDxErrBBmHZGSFvYXPIkg9DWTD9HKUmDWJP2B ITaYwR0QkHj2jcJLsf9bDghTcy47QQZKUccO4WFuHV/WHoWqSgE6bY79brjQ3H5UdIyF sQ5w== 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=gHXo3QOOlUbgxCW2mUTR1MGQVVtFZh7TCh6K82avTiw=; b=bFMR8MmnIcFXHTqgm93D5jUXwq41AuVfvZCDjX0zXH7Ymft3AEF8Hwm2chGUBcJ0RH SdsVN3yc8RyESjhfKlKUqJ7I09TS0m53A+SNzWa3ZJF2MZGwfSy3KwcaTbyrRuwD2SG0 3tVTY7t3HEmD5awNiH27ajDpyApNd5gWxptE1dHt6WnsAdwNj0y1fTt9zTmO9F/BXOZy cCsrUbb6j47RxFiKwVP2i0ukCuFP9t65qg6EmCu5ABDGDQEH1AQbMZZiiRPnDT6v+Kaq lljglNvl6S4yUEm1etNjliYNj5I1NYvVTGTyQwu64LZqFWoAHvp2u779PNJ7SD67bM0t Rgeg== 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 i17si413051ejr.440.2020.04.20.05.09.53; Mon, 20 Apr 2020 05:10:23 -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 S1726748AbgDTMId (ORCPT + 99 others); Mon, 20 Apr 2020 08:08:33 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:34732 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726470AbgDTMIc (ORCPT ); Mon, 20 Apr 2020 08:08:32 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id C46F9895216008B9E491; Mon, 20 Apr 2020 20:08:30 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.487.0; Mon, 20 Apr 2020 20:08:24 +0800 From: Jason Yan To: , , , , CC: Jason Yan Subject: [PATCH] e1000: remove unneeded conversion to bool Date: Mon, 20 Apr 2020 20:35:06 +0800 Message-ID: <20200420123506.7716-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/e1000/e1000_main.c:1479:44-49: WARNING: conversion to bool not needed here Signed-off-by: Jason Yan --- drivers/net/ethernet/intel/e1000/e1000_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c index ac5146d53c4c..05bc6e216bca 100644 --- a/drivers/net/ethernet/intel/e1000/e1000_main.c +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c @@ -1476,7 +1476,7 @@ static bool e1000_check_64k_bound(struct e1000_adapter *adapter, void *start, if (hw->mac_type == e1000_82545 || hw->mac_type == e1000_ce4100 || hw->mac_type == e1000_82546) { - return ((begin ^ (end - 1)) >> 16) != 0 ? false : true; + return ((begin ^ (end - 1)) >> 16) == 0; } return true; -- 2.21.1