Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3174009pxb; Mon, 16 Nov 2020 07:37:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJwHNdr6nBQhg2lnQm8Ud1JVCcYe61CDpv1rgSS/mArsuCXhRlhSs1gK+b4xepxXDN35ba/z X-Received: by 2002:aa7:c2c3:: with SMTP id m3mr16182776edp.361.1605541079536; Mon, 16 Nov 2020 07:37:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605541079; cv=none; d=google.com; s=arc-20160816; b=jDz0zWrV0F3CQoVyP6Yf94v7fCuxkeMF4wVyPNQPBMyeiY0nWJvpExW+E3vyeRi65u aOd8nfzA4+uoKdhqPRdbcD1Ehh15sAIYzFnUpW5DMtNYLsu/5yLPZDTo6SFMU/Cb5a+g fhV16MsBBM9G4Cs2PEpzKxKx04ih+Kvnrj3pUpSDcG29btZEWaSYxD80Hd9oQozXf+rk 9LfYWDHcJ/sV3/ikq+sXIh2LekifbG7wQoXSLn2dax+aLvaAzQycmxwI22kylHlqahIJ PendEycSwFzRtVmWfrQeIjHZa255vWBgVXOsmoDUWdSOcZykHAi0VtI2jyMwCRvyWFCt jyyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:subject:cc:to :from:date; bh=KYcoldIqQ0HnSpiMrjGQ/IrCDoqqzox169StGXwAWuo=; b=dPnP19LB3uDDhbo8QcreX4by5mDHrNxIcjuvgqre69nCrXXg3UeTGO3FvnOgd7WaNO JMriYDk6EGWCnF58SKaBA7fKOIf71XtFadYGwNZXK+j7RfWtt+SLa+uSQUWyeSEcL3hn /1w0KZotOUA00YkOhw6yBN+NB4lvAVzeGktMoTADAuVJaX/Bq1U5RiSvYMQ/9C4ygraB B3DFIRaeC3rAmMHPIqC44H7Z5Y3EXhT2M5HYjf54Ed7VfMSQ0PYhgBkWbg5Bl99PYUjD tbKtDoZ4kLa3L+co+5LYEourIoSScKsi57lemfBZp/Y9oUDLdj1o5U/8uBVAyetSVRKZ yDGQ== 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 b27si6801668eje.466.2020.11.16.07.37.36; Mon, 16 Nov 2020 07:37:59 -0800 (PST) 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 S1731152AbgKPPer (ORCPT + 99 others); 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 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.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 --- 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);