Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3551321ybz; Mon, 20 Apr 2020 05:09:54 -0700 (PDT) X-Google-Smtp-Source: APiQypLosK3CPDFBMUc9kN6qH+acX9QFiNmu2QmW2O3+VgdzqyikRhdMhk+J0fHj9s4XwWaqyLuP X-Received: by 2002:a05:6402:b70:: with SMTP id cb16mr13516927edb.48.1587384594380; Mon, 20 Apr 2020 05:09:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587384594; cv=none; d=google.com; s=arc-20160816; b=zuNtRReSMyGt3sp3I7Q6/8vIqnflTNpY4QRmY70Bc0Y4UC7ZUGxSFGWGJbhPxQfNdq 6KQUcNDCjHJQWt0O4jzdWEZStBw4tY1iS0wiZcl9f50JdjoeXmXrkZA4HU18MJ7Zz7+g SGmevP3qi91/H1CiqPiexB304C/45woGViUCar/Q3oIuE1f7Nqn0SL5vlJ6QSIURFEf+ PiG+1HxD+Jo6vjquwxrUAus4bysVRa35zU/kM0IWcrIsKdk1VABCSZAb1MWBrH6cWpcn 2JGfQqSJsJs5W/gWPrw3gKW6sW9a4eyWHOmRZdn8us8Exu/KWx8/1SyXZ4BFrE0KNcNC fqlw== 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=EVJsx5v8YLvwBdt9eZwzIwB4Ar6Fa+rBKn4Ygltu0KY=; b=CWkpoZHJiK/TKF6ZZalnA6O1Q493lpme7Qj6vJtKhh9WnoK9mCyh6fjIHBusOFEk5a V4ofVy0TV0CpyhEBptgljgNN2kHCM4P0IfLclP+2TXnXqVUvNdN/tktioHbK4tOWEtAc KEH5bhDbxgxGQoEeNkUCgsrikQWKDEMI7TtJKSME7ZFrnkzwkuwGbdSGpkPBsz/JjGV/ 6BuWWOJZRZTJZdOw8o47ocVO8/fJBJOm8F762Ipk7sHfUQ0RGrQF5WTiuEwjZ1Buv0WF MF4f/pBjtdfRwJWCXD+k45GQtHrwCCB6CZ60u7EShozMpnZtZ5T/Ul2n/j8VwyqFzH8+ qWug== 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 dm19si428407edb.223.2020.04.20.05.09.30; Mon, 20 Apr 2020 05:09:54 -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 S1726669AbgDTMID (ORCPT + 99 others); Mon, 20 Apr 2020 08:08:03 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:2413 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725944AbgDTMIC (ORCPT ); Mon, 20 Apr 2020 08:08:02 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id BEAFDC9AE20436C7EF10; Mon, 20 Apr 2020 20:07:59 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.487.0; Mon, 20 Apr 2020 20:07:49 +0800 From: Jason Yan To: , , CC: Jason Yan Subject: [PATCH] ptp: Remove unneeded conversion to bool Date: Mon, 20 Apr 2020 20:34:31 +0800 Message-ID: <20200420123431.7040-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/ptp/ptp_ines.c:403:55-60: WARNING: conversion to bool not needed here drivers/ptp/ptp_ines.c:404:55-60: WARNING: conversion to bool not needed here Signed-off-by: Jason Yan --- drivers/ptp/ptp_ines.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/ptp/ptp_ines.c b/drivers/ptp/ptp_ines.c index dfda54cbd866..52d77db39829 100644 --- a/drivers/ptp/ptp_ines.c +++ b/drivers/ptp/ptp_ines.c @@ -400,8 +400,8 @@ static int ines_hwtstamp(struct mii_timestamper *mii_ts, struct ifreq *ifr) ines_write32(port, ts_stat_rx, ts_stat_rx); ines_write32(port, ts_stat_tx, ts_stat_tx); - port->rxts_enabled = ts_stat_rx == TS_ENABLE ? true : false; - port->txts_enabled = ts_stat_tx == TS_ENABLE ? true : false; + port->rxts_enabled = ts_stat_rx == TS_ENABLE; + port->txts_enabled = ts_stat_tx == TS_ENABLE; spin_unlock_irqrestore(&port->lock, flags); -- 2.21.1