From patchwork Wed Sep 5 07:46:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 10588367 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D2B80679F for ; Wed, 5 Sep 2018 07:47:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE3D129AB7 for ; Wed, 5 Sep 2018 07:47:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B1CAE29AC7; Wed, 5 Sep 2018 07:47:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3D2A629AB7 for ; Wed, 5 Sep 2018 07:47:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727694AbeIEMQS (ORCPT ); Wed, 5 Sep 2018 08:16:18 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:46918 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727628AbeIEMQS (ORCPT ); Wed, 5 Sep 2018 08:16:18 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w857iIlo063713; Wed, 5 Sep 2018 07:47:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : mime-version : content-type : in-reply-to; s=corp-2018-07-02; bh=JmBP4gSqHCyIKYr3H+n0aPajlO372JDWguVLNm7Bsu4=; b=pgnVWflkD/YswjOsJxH+ktEFU5os+UVLEhvlHRkAweR/IQ6/FUuzIuPpzEL1EwJ+DL58 RMzwTq71SRntTJY/gU733KN9HeIkm7rCPFP5NOEPt8v12eD1fdqTT+Yx5e3SSFadt0cO mXkzZhEzXuEF+jAPkS+3OhSMHo4JY1l4oiuwowe91h8eC8keltjygZ5uQhRDD5RAvqA/ KoZMozejCSyubfx+Dxnz3QhEuHAO5XlQ0LdBsm7cnywt0vbQkIS3GZtghHZGFZ0fMSWA tQ2/b67AAvjM1nPLjV2+b2PAnlIxFqleyPiF+3sj9kdWvqM/xcmHIARy0htZwqgADSzd NA== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2120.oracle.com with ESMTP id 2m7kdqhwkg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 05 Sep 2018 07:47:03 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w857l2Pb001771 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 5 Sep 2018 07:47:02 GMT Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w857l282025798; Wed, 5 Sep 2018 07:47:02 GMT Received: from kili.mountain (/197.232.248.111) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 05 Sep 2018 00:47:01 -0700 Date: Wed, 5 Sep 2018 10:46:55 +0300 From: Dan Carpenter To: Guenter Roeck Cc: Jean Delvare , linux-hwmon@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH 2/2] hwmon: (nct6775) Clean up a condition Message-ID: <20180905074655.w6uypipr5lgmpr4g@kili.mountain> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mailer: git-send-email haha only kidding User-Agent: NeoMutt/20170113 (1.7.2) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9006 signatures=668708 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=791 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809050083 Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP I removed the "dsw_en &&" chunk of the condition because we know that "dsw_en" is set. Signed-off-by: Dan Carpenter diff --git a/drivers/hwmon/nct6775.c b/drivers/hwmon/nct6775.c index 139781ae830b..719effe53ceb 100644 --- a/drivers/hwmon/nct6775.c +++ b/drivers/hwmon/nct6775.c @@ -3533,8 +3533,7 @@ nct6775_check_fan_inputs(struct nct6775_data *data) if (!fan6pin) fan6pin = (regval_2a & BIT(4)) && - (!dsw_en || - (dsw_en && (regval_ed & BIT(4)))); + (!dsw_en || (regval_ed & BIT(4))); if (!pwm6pin) pwm6pin = (regval_2a & BIT(3)) && (regval_ed & BIT(2));