Message ID | 20210208151244.16338-7-calvin.johnson@oss.nxp.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=U7wc=HK=lists.infradead.org=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@kernel.org> 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=-17.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 DA3BAC433E0 for <linux-arm-kernel@archiver.kernel.org>; Mon, 8 Feb 2021 15:16:30 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9941164F26 for <linux-arm-kernel@archiver.kernel.org>; Mon, 8 Feb 2021 15:16:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9941164F26 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=BwfDSWwKHFmk+SAb50PoqWJ6O3xZbTjVFytT10UlOJg=; b=b3y14i9+6RS12oQK3LS7iuso4 LweZJg8g+bh13gjHaEaDgkkp9FqTeBb4wbTJ3uDEOS2nPF+Hvq7iIeoVd4y72EO2VMmYSdn1m4shE JCqhe91GFFJ0N+65UAZuaC+4VqoATEgRc/9Gxk/oqiDFd7bZNKQTs8TgfGBD8LurZjpROUKygmeVm OQPMlSpaf7BoSMlkqpKGOGAaEOQmZb7vSo9C+eFKwTFZm78V6BaaGam9TxcD2vJwA0TO58LlIlP8B P1vCgevbFIaYaxE4tzqcHS2dE3JusybWxEJPtSpORgZsI6Zs1A0wEZj1KKkBSOBGU11qMwA/0ppWS OzIGo6WDA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l98Fb-0005jl-Cr; Mon, 08 Feb 2021 15:14:55 +0000 Received: from mail-he1eur04on0613.outbound.protection.outlook.com ([2a01:111:f400:fe0d::613] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l98Ey-0005NL-II for linux-arm-kernel@lists.infradead.org; Mon, 08 Feb 2021 15:14:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EGR8i2qnpYBYsBpwlhgEqiM8BMdNJG9Odlil5YYq8JqQaZIGVj8sE+O8dcTMfCyZ3dRKTtvSzY6FQBL4mmKZDL0uGcwC1R2UDT6qNyweoDSPGStxQ2oo3ZcJFfOpjyEl0M4JCm7K4RL9+ggZsqJNROx9gnFsaZYCgQmr7pBQGDuchR+xUUxTn5DNIa0ONgEid8i+KgZIPHYHQNeUhassyFbo6fQjbPtxNz1fCBS7kBqYaFcQJRgv3mzMTwsmKmkIDTv3nJUbZsOslw2UcCu4LW/1LR//2DcReCGh2mYpN4SQlx7psrwqsC+EyskuJnuSUhduhCjGcMl22V3ISwhyGQ== 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-SenderADCheck; bh=Mr0qwQO9Qn/2Fvqmt6x3cOBdgVvKHvDjHxHWCZw6rXU=; b=TBXa2L2xrmQeas0LZf0mEJndKbEQjVl6jQwT0iRbrUUwVl2DvkbY7LqEhF7KmE4JHRghhTWR233crIjsNQwYo6eMG2fQUR/qY2x/FlhM9ceYBsSVoheLcfnfu+h2URKxkEGvBldbZ1DsFoRTabL16m1h9IWrb3EY2E211Ea+0PyZUDdUf3Pr5kGMzEAvKd95Q0ueHVxaeESFGsPlxlWiQ/patELNIPV4Pyq5znVBd2o/ddSgGTrlMGX15jp3NTFxCrhCmIPh0gLgpOCAXNW9CTvXPu11xGBysS0WArp2fAtrqIFY4aXgORHML6CoX3fnqRjGClR/EncfHhzKNFFMZA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Mr0qwQO9Qn/2Fvqmt6x3cOBdgVvKHvDjHxHWCZw6rXU=; b=JPk0fqbXla8HdzjnuLOQW2NmSmHIRWqnhmYnAMw87VYX86YKSBVreoJwE5usCzP5PFDXwQDHR3M30DO9cX90AvUXSgXlb8m620DeZn+f/JrBj5W+esTKM31q02KCwtEnLrdddMD/a1pplTzHRyMnJXLonsmjD2ws2Xa3bmSnzoo= Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=oss.nxp.com; Received: from AM0PR04MB5636.eurprd04.prod.outlook.com (2603:10a6:208:130::22) by AM0PR04MB4772.eurprd04.prod.outlook.com (2603:10a6:208:c2::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3825.30; Mon, 8 Feb 2021 15:13:59 +0000 Received: from AM0PR04MB5636.eurprd04.prod.outlook.com ([fe80::e90e:b1d6:18a2:2d42]) by AM0PR04MB5636.eurprd04.prod.outlook.com ([fe80::e90e:b1d6:18a2:2d42%6]) with mapi id 15.20.3825.030; Mon, 8 Feb 2021 15:13:59 +0000 From: Calvin Johnson <calvin.johnson@oss.nxp.com> To: Grant Likely <grant.likely@arm.com>, "Rafael J . Wysocki" <rafael@kernel.org>, Jeremy Linton <jeremy.linton@arm.com>, Andrew Lunn <andrew@lunn.ch>, Andy Shevchenko <andy.shevchenko@gmail.com>, Florian Fainelli <f.fainelli@gmail.com>, Russell King - ARM Linux admin <linux@armlinux.org.uk>, Cristi Sovaiala <cristian.sovaiala@nxp.com>, Florin Laurentiu Chiculita <florinlaurentiu.chiculita@nxp.com>, Ioana Ciornei <ioana.ciornei@nxp.com>, Madalin Bucur <madalin.bucur@oss.nxp.com>, Heikki Krogerus <heikki.krogerus@linux.intel.com>, Marcin Wojtas <mw@semihalf.com>, Pieter Jansen Van Vuuren <pieter.jansenvv@bamboosystems.io>, Jon <jon@solid-run.com>, Saravana Kannan <saravanak@google.com>, Randy Dunlap <rdunlap@infradead.org> Subject: [net-next PATCH v5 06/15] of: mdio: Refactor of_get_phy_id() Date: Mon, 8 Feb 2021 20:42:35 +0530 Message-Id: <20210208151244.16338-7-calvin.johnson@oss.nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210208151244.16338-1-calvin.johnson@oss.nxp.com> References: <20210208151244.16338-1-calvin.johnson@oss.nxp.com> X-Originating-IP: [14.142.151.118] X-ClientProxiedBy: SG2PR04CA0176.apcprd04.prod.outlook.com (2603:1096:4:14::14) To AM0PR04MB5636.eurprd04.prod.outlook.com (2603:10a6:208:130::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from lsv03152.swis.in-blr01.nxp.com (14.142.151.118) by SG2PR04CA0176.apcprd04.prod.outlook.com (2603:1096:4:14::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3825.19 via Frontend Transport; Mon, 8 Feb 2021 15:13:53 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 9a041cb5-baf2-4ab5-3cc1-08d8cc4428f6 X-MS-TrafficTypeDiagnostic: AM0PR04MB4772: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: <AM0PR04MB47724E1309125F056B3079F4D28F9@AM0PR04MB4772.eurprd04.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:4502; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yWx8N6o0QkVFm6ajY5+ycsOzNjT9gSgXGv0hVdJ50wr6AwmrmESlnUYc9XCT0kf0WWtdQnMABs1eFAlunZ/W/wlklleRtFOCB2wOV1esJDPi5XRZ4PVhbWrFy6EJYJ2e/KuDjcZcz7xlEZ1ClqD39V6a0ouYM3GkN5xnwa4Ho65NlLKYuttgVgQo653weazZ9s7NegtV4uULk0xg3wQ1Wpi96BTwrjrrLV1hB9UkSBB9oQF7v3pzSCm9aTUexcxP+Qfx9u8R+RuHFPq2BlwHwwyDm1FkcKDnJBnaO9iJ1Ys8XLRg+a6cNP1Ey+VEVI5jy8bYcmvvruWrbshHcPUSJ7biqmb60KfrH42lipr885TU74q8orDD0n3HRStZqimyB0NNvaBmHbWjAH3qEy+SXS5XCWqiW+ihKwjXnX4099RcteLiirhw2CjJ1yJthG9jiti0wYzJMg6ulXHNeGAUdM5UBwSljQs3eNvwIN4nPL+EBaw8NNQGpLAJZYBdnxOyqz8tBbrzvoEzELsbF/m+DxdWhHz0M65/NoPozxOnb+sD6sfzMv19E2Pfmt+ST5JECqTN83fHLftuRUzyWXQjpA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR04MB5636.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(396003)(366004)(346002)(39860400002)(376002)(86362001)(8936002)(6486002)(7416002)(16526019)(83380400001)(2906002)(6506007)(478600001)(8676002)(26005)(52116002)(44832011)(2616005)(55236004)(66556008)(66476007)(5660300002)(66946007)(1006002)(316002)(110136005)(6666004)(1076003)(921005)(956004)(6512007)(4326008)(186003)(54906003)(110426009); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: yFtUSHz9l/T9Z4LJRVl/umaKO9XsRqcM20ivkQTUsIFWoxAUR7SMnCDoH10W+1QiPQncofV3T088oJYJVr3I/7roHzt/yHW+S4i5C8ppQipMfZsVTwY/YmaL+zi3vHgnMTzep257oDjvL3lrX+vXgpFZEQpio6rg1DpIfydkwYUfMCG2Fh8/V3zPbczZzAmNvzbiJHy8sbQz/ReB+fBPXei8M4LibbSNAiy0Izji2McpvItyqdQuroYDLLMcha+bKek6MQhRBqPYR8YtuH8JdyzIG4h20+oEPmUSiqIN0E+a35QjwncYQE/2EfHaoSFCPI/srhStqwx+Y1hQFgUPnVMoX7jyd0iEIGnOrotdQ4fUvYqSDRRYpEzm0Ldbw7J3lwUcj9Umn6AbTRC1ltTGiqPH/eRYQfuKtD5h1coef4EqrnD4Ye+AqUzZJHR08aNWXuYOmaR6n0UwKZWA+VH1C9p4YWyXULHP9ACq67UssZaMiKiDWqo3PHdRTdnlDOfHVX1zg3m6NfGfRDoPntrd1yPLLLEWG09uRCQ0easa6DQ5WwxEuyoI2z3Ni+XfhNeW4MJf+dcBJuJgoFkR4484ClUR+Q23cx5wmvHv1Pm8c3OGwD6syRYHy4/kfjXp18nXnKFnzozHk5YSLyQVJJBq+5YYCHBH9NEQUDnij557AWObWMv473BPwvOicMggeg4Xq8Vki55bkzBR2NJpjJGUXkh2WufXrkk+RD9ks7A1VIKPZsmWTGiQDZ5ziFAu25wdNaJBtKgEMbFR6xkL1+U8obz2UilooZrzWGKU11+osCE+R5P9pQB942k/T3fzycBtpKlSjJyrwq0rbW1S4j5WMkeYa97vxNREcXHRz7jJ8Km/i2wHRxB1tBwhTMFKK62iJ9h99j1SeI0SM1QtYe9eBzzoO839kGelIFSvMYSy6AvrHzlmZjiowXfAYUa2ujf7BtW4ov2zA/o++aANohG7gCQaSNyskIaCB110OvIhXdEYd4aajC9g+t9xzcqEnbi5eT3fmNKubD1RunR6z5lo1Mu/WcvOn7KRM4BJ8SFbMUlIQ7YSuctWqV5PkcAMxRqiSTgssfUG6bsajrMjVDQTVysq5nxNAPRUVDknc56OgwxoWd7L2pl6kB1uSIfNGVJTUZCLcB+66LWPHxGw45v3qElkSGO2fS96W6BJT0JBV64NB89uio4yE6yth/2IRNyaxcjx++hM/w63YCDnhZXV2V6fNoRYbDTmJqxqWwbuePFaR4waj4CX+DqqYWBlX12bOlJtuhyJlHauVazYPzoZIf0A7KVAAX3+pwEYKWl+4zVRDRweUrtNuTGycBY5p7vt X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9a041cb5-baf2-4ab5-3cc1-08d8cc4428f6 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB5636.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2021 15:13:59.3761 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: xRckg273teGyb1yPMg0oUxHekXv2hFjwoB8HVwhzTxifhlUGGL6S4VgDX6h2Nm9YPHBBzovcTr8HzDBjkQTTMQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4772 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210208_101416_653732_DECB988E X-CRM114-Status: GOOD ( 13.84 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Calvin Johnson <calvin.johnson@oss.nxp.com>, Diana Madalina Craciun <diana.craciun@nxp.com>, linux-acpi@vger.kernel.org, linux.cj@gmail.com, Jakub Kicinski <kuba@kernel.org>, Heiner Kallweit <hkallweit1@gmail.com>, "David S. Miller" <davem@davemloft.net>, linux-arm-kernel@lists.infradead.org, Laurentiu Tudor <laurentiu.tudor@nxp.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
ACPI support for dpaa2 driver
|
expand
|
diff --git a/drivers/net/mdio/of_mdio.c b/drivers/net/mdio/of_mdio.c index 94ec421dd91b..d4cc293358f7 100644 --- a/drivers/net/mdio/of_mdio.c +++ b/drivers/net/mdio/of_mdio.c @@ -29,17 +29,7 @@ MODULE_LICENSE("GPL"); * ethernet-phy-idAAAA.BBBB */ static int of_get_phy_id(struct device_node *device, u32 *phy_id) { - struct property *prop; - const char *cp; - unsigned int upper, lower; - - of_property_for_each_string(device, "compatible", prop, cp) { - if (sscanf(cp, "ethernet-phy-id%4x.%4x", &upper, &lower) == 2) { - *phy_id = ((upper & 0xFFFF) << 16) | (lower & 0xFFFF); - return 0; - } - } - return -EINVAL; + return fwnode_get_phy_id(of_fwnode_handle(device), phy_id); } static struct mii_timestamper *of_find_mii_timestamper(struct device_node *node)
With the introduction of fwnode_get_phy_id(), refactor of_get_phy_id() to use fwnode equivalent. Signed-off-by: Calvin Johnson <calvin.johnson@oss.nxp.com> --- Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None drivers/net/mdio/of_mdio.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-)