Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp421289ybj; Tue, 5 May 2020 00:51:32 -0700 (PDT) X-Google-Smtp-Source: APiQypIk7cPW+GHKNE5FOkDqNyYiHf0satpZzT0DZ69YgA4hRxWMYrP6X75AbBiooPQ3Ob5kRZ2B X-Received: by 2002:a17:906:2b8a:: with SMTP id m10mr1426584ejg.183.1588665092419; Tue, 05 May 2020 00:51:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588665092; cv=none; d=google.com; s=arc-20160816; b=B9Ekyh7t4AdPjepd5gUtc1JIdOM3q6xpHbhSf6sYNjqyhwqDIvCyfyIp7ZJcb8YATz dEPx07DqOdEYmNjqu9WZCjkpz3q8sxW3wjU+8CM4QP6dpi9IBYDZTUQRfNUCTqTAWA4a VyUJq8QAVvkDwhnGsiZQMg5QJxP6SmbKiX4ZjobNrTV/oUvGj/wn8qScLfB2YaZZUtqj w2mag05vwwzwcDyh7rBcpz4NbhiZ4NCZ+e7evznxZRCv4Jqq+DWvpRQTPzRVVuAnsTlP nGUy1FvNgL8HeqvNNPJx+Mfw4+WPg755DyGqFDFOdIxfXKMsrzkKRm0Vc0TcO8ZAh68m XldA== 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=4UBpeqUsu39d6g8Pqvxg0Lt4eeDZPBdM2E3vE+i+v7I=; b=P3+PbAMP2/nXSm8HEPo9/31S6Jlkgcg7CsJjiW+/f1qDKHQ/JNljzefgof98VgH10u hYpstA7xX5lyUjviRhPZPSgUlAEKrBnhbXXw+eOWhPC2hgLEm5ySH2efobPpZpbFOo2U ghmA1d2uf2jKETHTB5qRa+l15QobKy02mneFojF9La2k2Rf/WHVbUlzJPLjPwcqibBM9 3l2sneJhD5HytBWQRM9jbkrZCGuJjUAg6GqcV15r94TYK7nD37nroRnM0g5Dl18P+j5u s1wF9ebrs6LmOqVSgJrK6HwIBphgJ4dcuGnjNhKHKYwGWFwWpc/BeGf3URsZ1abodwYg bx1g== 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 i14si588051ejh.494.2020.05.05.00.51.08; Tue, 05 May 2020 00:51:32 -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 S1728631AbgEEHq5 (ORCPT + 99 others); Tue, 5 May 2020 03:46:57 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:3409 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725833AbgEEHq5 (ORCPT ); Tue, 5 May 2020 03:46:57 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 0C4A467DFD34D00D0C71; Tue, 5 May 2020 15:46:54 +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:46:46 +0800 From: Jason Yan To: , , , , , , , , , , , , , CC: Jason Yan Subject: [PATCH net-next] net: bnxt: Remove Comparison to bool in bnxt_ethtool.c Date: Tue, 5 May 2020 15:46:08 +0800 Message-ID: <20200505074608.22432-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 Fix the following coccicheck warning: drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:1991:5-46: WARNING: Comparison to bool drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:1993:10-54: WARNING: Comparison to bool drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:2380:5-38: WARNING: Comparison to bool Signed-off-by: Jason Yan --- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c index 34046a6286e8..75f60aea8dec 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c @@ -1988,9 +1988,9 @@ static int bnxt_flash_firmware_from_file(struct net_device *dev, rc, filename); return rc; } - if (bnxt_dir_type_is_ape_bin_format(dir_type) == true) + if (bnxt_dir_type_is_ape_bin_format(dir_type)) rc = bnxt_flash_firmware(dev, dir_type, fw->data, fw->size); - else if (bnxt_dir_type_is_other_exec_format(dir_type) == true) + else if (bnxt_dir_type_is_other_exec_format(dir_type)) rc = bnxt_flash_microcode(dev, dir_type, fw->data, fw->size); else rc = bnxt_flash_nvram(dev, dir_type, BNX_DIR_ORDINAL_FIRST, @@ -2377,7 +2377,7 @@ static int bnxt_set_eeprom(struct net_device *dev, } /* Create or re-write an NVM item: */ - if (bnxt_dir_type_is_executable(type) == true) + if (bnxt_dir_type_is_executable(type)) return -EOPNOTSUPP; ext = eeprom->magic & 0xffff; ordinal = eeprom->offset >> 16; -- 2.21.1