From patchwork Thu May 5 03:02:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiabing Wan X-Patchwork-Id: 12839030 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AD5D6C433F5 for ; Thu, 5 May 2022 03:02:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240485AbiEEDGY (ORCPT ); Wed, 4 May 2022 23:06:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240491AbiEEDGT (ORCPT ); Wed, 4 May 2022 23:06:19 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2108.outbound.protection.outlook.com [40.107.117.108]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46F4A245A7; Wed, 4 May 2022 20:02:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HVjkvekQFgpRMYtnJJNfI9ep8sAvIG4nFjgjEvQ1W+JW0196RSDFIgzJ2J1uxKhDg6pWHzweXlJnyDwoyqJP3yI5lT33YndJgjktZguJUwIi6H3RayhC/iKwTYBrtPu2zVSTRuwWZidztmPRnsnuHxDTFUT7XIBXQmI5EKXg/2seNl3+m9Ts6MuK9fLX3oy+20T7sNQKRnAn1wBTrX/vuP2ATSn95kDvI+rPQZUUVSkredl9Y2PIoy9m6ZULUoMLRb+fBUyDBRD3ugapjlAMWhL912gDnbEISQO17ZsL6Zp8czTmdih39Cvd8ysDzyERUIHGzjoAAOey3HJgES2MaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=PlBQDYDt+sTbID8ZwDzg0uoa+LpLWoDFST6Oempcp0o=; b=T+W0B5BdRpXw2XcK2wZb7Af0Nay6Pjqe1aUe8bc39js0PgPfyPafetxGeDPF61Kp9wtimg5AiHq0rIFM2orcojF+DZ9kLPNZcx64eJhgs74mNXg+u5G3fqWhodbJRTihAr+lMcSsfecaXwcDoLBA4gGcDRl0kZUTF7N0X9eQ9mPsKQGIZvAN66xIK69u+HOWSRmG3mrYKKhjBLf+g4pqnvHNjEzLJOOT4j9w6vV2uMOivCM8RnrEo97hLJKqtTOHcTZ2Z0xIVHvLxH7+tKtLJ/P7uQICoPSRnNu/pUeN4YD05IcQ+AbJilsZrOMM4fT8q/w8bBH+qip5nuYa8n4ZlQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo0.onmicrosoft.com; s=selector2-vivo0-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PlBQDYDt+sTbID8ZwDzg0uoa+LpLWoDFST6Oempcp0o=; b=IMn3Dmmz21lXR50Zvo6eOJ0DSXKTlyUkMF8dAMbxH3pQUhU4h/C30lOjrFUJJvE6wT1R89S9VeT5rFdyN9rTEHpLQXbhP8RlZT9/VgRXQZb5oKvA8+TGLcsRWwLrrDa8xU/+5crjNAMFecQBiMDv9sbbS0SSftpumB2IXUYxfZM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SG2PR06MB3367.apcprd06.prod.outlook.com (2603:1096:4:78::19) by SI2PR06MB4506.apcprd06.prod.outlook.com (2603:1096:4:156::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5206.24; Thu, 5 May 2022 03:02:35 +0000 Received: from SG2PR06MB3367.apcprd06.prod.outlook.com ([fe80::4591:4f3e:f951:6c8c]) by SG2PR06MB3367.apcprd06.prod.outlook.com ([fe80::4591:4f3e:f951:6c8c%7]) with mapi id 15.20.5186.028; Thu, 5 May 2022 03:02:35 +0000 From: Wan Jiabing To: Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Wan Jiabing Subject: [PATCH] net: phy: micrel: Remove unnecessary comparison in lan8814_handle_interrupt Date: Thu, 5 May 2022 11:02:17 +0800 Message-Id: <20220505030217.1651422-1-wanjiabing@vivo.com> X-Mailer: git-send-email 2.36.0 X-ClientProxiedBy: HK2PR02CA0181.apcprd02.prod.outlook.com (2603:1096:201:21::17) To SG2PR06MB3367.apcprd06.prod.outlook.com (2603:1096:4:78::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4469903a-25ee-4093-b3b5-08da2e43b405 X-MS-TrafficTypeDiagnostic: SI2PR06MB4506:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KkX2O19w55UrUyZYELaJsKM6pTDGHgEOUj6iAJA0/FS0W3ICN9NGKzGhMvLXcBRg8Y8JebGY8/JmC0iZiYnZxHkccF2cXMVNKIVy9syQ5NP7IUG3H8aMeSoQ48FzT+l7RmQmpgWmr3P2ldT/JN30qA76BIGdZDJje+GVMLIsK+0JKK9X8PkLhnwgBoLFwORse5OT606e4YSButQkVGogBPs/msZpi3zgv6M+AYwQwGtD8X+o1wFGHTmqKdPwqFGi+1CqlqJ7Pg+qYGzEkGdTTwDrK8SdTGVgti98wP1qYN0FFBUyUpgGxIIY3li/Y1ggtRCbkNihFYly0fvYiEiXqZveGSDI5617nXmAWQEFUQarwJW5kISbKEJ4iFse9arPmoxrof7DSnAKSdtdKxjxzn+P6+wvS+shBPeGcfG1fjiqB/OMX0MVb0+UryK/Y/s76Bnl1+s79QiKbiZ479nxKe1hoXQ2FacPhfwxO1DeD+Zd/Dvc5qaVlN9Y8ev6nHewiLj52aFQpSqY7uwnHDf/3smkOS0wKIK6WcDYYdvlG47aozIHYZfdtR98MYGt110nYBqojVN5nceAet6XxudU1sb2E8FneLpc+qeWj07zWdFrgY0fb8heF3vUKwUaSVwcmqvwxeLAG+IEu2RuZj3GLepQSzamyRkuZdWPdgB0vTEHlaR9EpcQhSJILTbCu6BMeGQSiCWiBvXq+dO40ZI+MQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SG2PR06MB3367.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(508600001)(6512007)(26005)(2906002)(36756003)(6506007)(1076003)(186003)(316002)(83380400001)(8936002)(6486002)(6666004)(110136005)(38100700002)(38350700002)(52116002)(107886003)(2616005)(5660300002)(66556008)(4326008)(8676002)(66476007)(66946007)(86362001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: UAJ/PoNeChlc7hQk9XP2v9h73kdwBDjZCXo+HD0J7pmK6Hi3oRlzOI8JvCPjT0roCHOLiH6wNU4QTvjRLNjS1dzWrfCfDkISwuee8QhIJOVGA1ESPrZ6P2uTLHCTKZpJYRJhN3wIzqHX/dcHPSYttT9ZDJYV8W4f3R4myPFVUuj7DIgUVmFv0d52pfYIohJg+x1La0Rj4vfQGQTfyDnqKIyho9bz6cdZOWG0+89w+BV7IM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OowaSkNvk4n62ZwUVM7dwb3MrHvsNrGKY+3EqXztGmp4z/kMTCJb50NKps2zvMbWN0C16inPYOK+1kllLW25XvgzcSy1fQa/CHZB5irUhe1JvVIfR14sl+cqHak813cgTB55it7dkIFLvBPc16pvqa3UvPVJ+UlTLdrZCLyehKiZsvLPULugijvxAsmhrveSacobLGX133UY4S0VaeDK95E2QJ7vG+caQyHbine6XoJ2v5ApwEV1wbHJK27BW5EbkEmIS2xH+zKCLu5vq8LWAzSM9xsN2geLV9BvrpEjsTa89bZOyL9OEZDI0UnKhMxmNW/qcOrCz5E6DI7SGinhlsfcmIQC1W92cYTZEVXdkHT5jzhY9xRpQ+xIoPm2KQj0M5xUGv+/GfJAM89NkHIVVlPR2gEBcx5KsiBFj+lGNtY/z6V46Q== X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4469903a-25ee-4093-b3b5-08da2e43b405 X-MS-Exchange-CrossTenant-AuthSource: SG2PR06MB3367.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2022 03:02:34.8992 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: aB3ffA8O38qQfjqGuMUnSTAAnvrlManMXApXX8dQCKd8jd3FgV50hHfQ5WpX1jcOhap6S2zeGM4IFD4Rf/r6sw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4506 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Fix following coccicheck warning: ./drivers/net/phy/micrel.c:2679:6-20: WARNING: Unsigned expression compared with zero: tsu_irq_status > 0 Remove unnecessary comparison to make code better. Signed-off-by: Wan Jiabing --- drivers/net/phy/micrel.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index 685a0ab5453c..6820882be59b 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c @@ -2676,11 +2676,10 @@ static irqreturn_t lan8814_handle_interrupt(struct phy_device *phydev) tsu_irq_status = lanphy_read_page_reg(phydev, 4, LAN8814_INTR_STS_REG); - if (tsu_irq_status > 0 && - (tsu_irq_status & (LAN8814_INTR_STS_REG_1588_TSU0_ | - LAN8814_INTR_STS_REG_1588_TSU1_ | - LAN8814_INTR_STS_REG_1588_TSU2_ | - LAN8814_INTR_STS_REG_1588_TSU3_))) + if (tsu_irq_status & (LAN8814_INTR_STS_REG_1588_TSU0_ | + LAN8814_INTR_STS_REG_1588_TSU1_ | + LAN8814_INTR_STS_REG_1588_TSU2_ | + LAN8814_INTR_STS_REG_1588_TSU3_)) lan8814_handle_ptp_interrupt(phydev); else break;