From patchwork Mon Nov 16 15:34:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 11909653 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72614C5519F for ; Mon, 16 Nov 2020 15:35:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2D85F221F9 for ; Mon, 16 Nov 2020 15:35:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731246AbgKPPer (ORCPT ); Mon, 16 Nov 2020 10:34:47 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:63786 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730585AbgKPPer (ORCPT ); Mon, 16 Nov 2020 10:34:47 -0500 X-IronPort-AV: E=Sophos;i="5.77,482,1596492000"; d="scan'208";a="364698084" Received: from 173.121.68.85.rev.sfr.net (HELO hadrien) ([85.68.121.173]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Nov 2020 16:34:44 +0100 Date: Mon, 16 Nov 2020 16:34:44 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Andrew Lunn , Florian Fainelli , Heiner Kallweit , Russell King , Jakub Kicinski , Antoine Tenart cc: Quentin Schulz , kernel test robot , kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, Denis Efremov , netdev@vger.kernel.org Subject: [PATCH v2] net: phy: mscc: fix excluded_middle.cocci warnings Message-ID: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: kernel test robot Condition !A || A && B is equivalent to !A || B. Generated by: scripts/coccinelle/misc/excluded_middle.cocci Fixes: b76f0ea01312 ("coccinelle: misc: add excluded_middle.cocci script") CC: Denis Efremov Reported-by: kernel test robot Signed-off-by: kernel test robot Signed-off-by: Julia Lawall Reviewed-by: Antoine Tenart --- v2: add netdev mailing list tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: e28c0d7c92c89016c12a677616668957351e7542 commit: b76f0ea013125358d1b4ca147a6f9b6883dd2493 coccinelle: misc: add excluded_middle.cocci script :::::: branch date: 8 hours ago :::::: commit date: 8 weeks ago Please take the patch only if it's a positive warning. Thanks! mscc_ptp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/phy/mscc/mscc_ptp.c +++ b/drivers/net/phy/mscc/mscc_ptp.c @@ -136,7 +136,7 @@ static void vsc85xx_ts_write_csr(struct phy_ts_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_1588); - if (!cond || (cond && upper)) + if (!cond || upper) phy_ts_base_write(phydev, MSCC_PHY_TS_CSR_DATA_MSB, upper); phy_ts_base_write(phydev, MSCC_PHY_TS_CSR_DATA_LSB, lower);