From patchwork Wed Jul 5 09:01:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 116038 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1742516vqx; Wed, 5 Jul 2023 02:35:06 -0700 (PDT) X-Google-Smtp-Source: APBJJlEESd1teP4+oBAjSlLbpMIT3AWh8SqILxKkSpxupuDrPh/Glfy5rjdaF/jvyvSJ2tyd/RTP X-Received: by 2002:a05:6a00:2292:b0:682:5a68:983c with SMTP id f18-20020a056a00229200b006825a68983cmr14825418pfe.34.1688549706157; Wed, 05 Jul 2023 02:35:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688549706; cv=pass; d=google.com; s=arc-20160816; b=R9ODB7conuWhHmpQfr/gx8DXrh6kHnjpVLA/1WQJEMTG82wlPl99XRWWGyogVTvvCU Tjbok5rfyieF6FoP91Ryt54ZY8YSFF5DtcvAFdqg5RRI+JAB+MgyeqPS9P8MbYgU/G4d zUHiOgfqRexszXjP8e99vAW1XKm7OWc16asRQrCOPQxR6US4H3+mq2kE7c3WrjyOZlqM IJ5ukhyZGOrn4gesSxsTl6n1tA2c5z8RHNrxhpaLK65VPi6VjxvMXR66XP+9SfUzssCZ W6tfACni4Nz0NBhegLV1Xblnx7TEy536Knie5AhiYHpA1cu/kaA1AOt8YVePhMzjpSbY wZHw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=Bi5MN2Lo1Xh02TYYVOUmZNbL2ihcOvEZTo6JAy8MYTU=; fh=IJP9zDKpX1iEnXFZXHrXp3ftQr7mqtXJn2ssOISM/B0=; b=XY2TExDM2i+LknF1mTJKL8slUSSBDczOWFPxQUor/Xe6xAs1ewC6pgTcY8evXJqVcB sD/MymX0qYvakswl+bg5KlGMdFOaBAipAerTlHcmWDuLngMFw6MgB3ACYzui+tolSdZu NgRlp61PeLdDGh6bPTO8TvrB5md0T9POdvjhKbIXWMHytFn5JVeDmfPKft5Rj8JoG3Yt LMlKLOkYjWD2VqWILzc6r575HMPS71XyBkVRAy2ItvA72G2E5ruilluGvc+txwrjZVeS SBlMBNGe8b0VgaoFJlGyZyi/ny6NS2SI5nHMMuZb3HN+F5gh1eqsDKSnLQV61HU4ratr fZEg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=RPswE7d5; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z3-20020a056a001d8300b00653c0edfd34si12271640pfw.139.2023.07.05.02.34.51; Wed, 05 Jul 2023 02:35:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=RPswE7d5; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232041AbjGEJBn (ORCPT + 99 others); Wed, 5 Jul 2023 05:01:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229906AbjGEJBk (ORCPT ); Wed, 5 Jul 2023 05:01:40 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2110.outbound.protection.outlook.com [40.107.255.110]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F42811F for ; Wed, 5 Jul 2023 02:01:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B5tV8P+icU5MNpe+Yu8IioQJ2UqpMHgIJqw7olbShCUOlAhjSF6DW8NwCcTRWiqXixAuzzL/eCZqe6UtKpJ7D/evCZqwfFcYydm/Vz03fkhgOcxiUgKVr3K21cmqqCkd2gKzz0H5Trptuq75/M1U7euPOz41JKZk80fySPcLuyKu1E8n+pThPDEptsMkeykKeOl/nfb+UjTse93Ap7PCp4QBlHAiv2O+5fe6Q75JDm+hCddztaOql+1vC5Y1kjD9kC6b7LlB1T114b2+H3oqYalFt9Zp7qSY87984Gph2TLVnT7BESmMZAxJDtLju+CK1s44MOj57h9LQxR4yuWnWw== 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=Bi5MN2Lo1Xh02TYYVOUmZNbL2ihcOvEZTo6JAy8MYTU=; b=RvmJPcWD3oMEboOoyykuNBfE3ipiCOrTmgqgdppyK8LpCOZMIFtGVSKoRZS6MMhz9GQ4s8EZVL3AWOKWDZVVk/qHajcrek5sxNiI5g6KQespaxOj90J7VeTuhlRAXO2Mw+TzsIWh93wnaZz3ag4vZWi8qCfNn4/DZaQnklPzZ8ONxF1SkM2X36CWU0NvbC6i+pwcoCD9rYmLWehFGLCoSStrS0T6h9c6Y6wkHucmOTzdLpWqp3XuQ++lmQOhfACq/gIDsXS0+w8cQaFp1DrsdR8Dj5aI/wapy1oE3K2C4+bNHBuL2EOSE0iPg8TIk3FSpBT1CSY1QDxpMeshDIbpyw== 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=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Bi5MN2Lo1Xh02TYYVOUmZNbL2ihcOvEZTo6JAy8MYTU=; b=RPswE7d5b6Vd9Hoa1X5z6wAyrtZyy/1f0f7QNSWpb6myRvjzt7Fcp0t4xKt/IJnZvdQvpHf0ZuPQjYpAtCJyaioIRO8kI1CF9gFy+IZO4ht6wOdJZgmfRpHPQR7yrqr3uMLYDyCAADjrLEVZCYsy4cu+ZSeVyXXP9GIKW1WAg/+PFY02YHNkXtRhJztmfPiEV8HaBr30o7n8oIeggX7s/OyVnPVRn5Vfkti66FFujZxRVkCHwFQTddGgkF2jpLf0bEG6AbbOjYwYOJUiiUrJ+cuiHQcYNO/1YHvAsveyLMj0Rgc0/SuFyRY572AwoZ5xisO970kEplemugPj7T7O1Q== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by KL1PR0601MB4354.apcprd06.prod.outlook.com (2603:1096:820:79::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.24; Wed, 5 Jul 2023 09:01:36 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.016; Wed, 5 Jul 2023 09:01:36 +0000 From: Yangtao Li To: Vinod Koul , Kishon Vijay Abraham I Cc: Yangtao Li , linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/4] phy: marvell: phy-mvebu-cp110-comphy: Use devm_platform_get_and_ioremap_resource() Date: Wed, 5 Jul 2023 17:01:23 +0800 Message-Id: <20230705090126.26854-1-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 X-ClientProxiedBy: SG2PR02CA0031.apcprd02.prod.outlook.com (2603:1096:3:18::19) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|KL1PR0601MB4354:EE_ X-MS-Office365-Filtering-Correlation-Id: 2bc4023c-0242-4600-7031-08db7d366fbb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2nbYAh/ljXdWpkVwx0Lxou3fWvBMqNSSIDrI4kxf4SGSiz4FNOaUGG7HnkfONWRHMHLivbKjZ431F6YFXR48ec2eIoTJJfd47PPeS8k05LCWDBYwdweXKMZkoQnUwAjwRiPq4H5GMjjDQvr5o9jZK7gm300RFJ0vrVp8xGj+RSOYuv+f8B45c4FkTD/f4z/fc3G+PlWQhk1WuHo5EFzHGhEWswZgWC3iTdK8lui4Aj9JsCFSio/4vRUVZP42Hm4z4aYKA06Txc2OVSZVVIGkhVJUsPaGO8r8tvGw0h16ryNSacE6r4la9XrLFzsJlN+bud6199JtOevJZcfjTFW1zAfSE8AoUoP7e0VcOQ8CHx0zuNC9AnS9PMsKosYnKfgXEsSk3PQkHg/1KUVZCnWnryjVH2eoF9eyCE5iYeFqnyE87uSpSl9Ijsxp04DoRE9AlYcDmDcYQSSaGubf8i7Kn8Aczlnon+aPetjioklFLb+tKoXBEQC+kVZvJ/aukNnK28uRgoSbkgw7eh/lZod3EDd9W3xVa5HFUPkHeYThTOECJkuyvBDvBQSkqqQr3PRSbJ9Fcog3EpBY0QrQ3jDQS7xRQiv9NjS5SE4VT+Ld7hGI4dQVT1ybfuAPTJ0w6oey X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(346002)(376002)(366004)(136003)(396003)(451199021)(26005)(6666004)(478600001)(1076003)(6512007)(6506007)(2616005)(186003)(38100700002)(66556008)(38350700002)(66946007)(4326008)(66476007)(83380400001)(110136005)(6486002)(52116002)(316002)(86362001)(5660300002)(8936002)(8676002)(4744005)(41300700001)(2906002)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: CQpjogTVyBlMuMEzojRZwM04uKhyJt3R3/3maLZJTpjhxwxzgDFYCRK5LaPBGRy1oGJRYDihzYROhnlb6PWKg6h8T6BbLghySK33E/FnxI7tvnQZRTiTvu7WZkvyDl8zpX/Tlb5aeWjh+JbiBVoEs6dZTAh99yf6Sj9Y107CE54YynWBn1JUG/FcFUliEBVYJxxwFYzm3WSZQgn/4alK1vuqQfizsf18aBMa5aIeLfxeRRqGhWJxuKqQgRPEg5dDk+VSsouIY9SISn3/0NUQLf6pHAwIKOBKRZioaSJyoAI6NsLGRSXBacm2+XPGk6X1Xcv8pK58gPOrQME1XDxBDpaG0PPwaShcdXV2O/Hnz6Ng9189FCCGvVi3AA9QaKz6xogc6nuyWcX7NKSlQZms9HcLq2xCCYFwI3wCHC0bESY+6GaO/+4mjkrIpSTSxn/LTABYykceO23DzdQEsQLhqklZdA81dMw9s+o3v8z/1asqc4ZZcHZXA2DlX0k3iwqFm4NujePgFbmN6SJJ5ngc2TS0wL2mLHPWiXBNweUBGIlZUtOQ8QMRYbz5iJGZKT1BeZYZJM2PjAHurmKfS9v/OVzM+VH2219Lk9h+BZ1q0E+GUkiaaC/jygWY5jv/MALL1jr9BMujEYaxD0TWYz/gpk5S5wLSP+P2Sg4Z0SRCEDrTcR47uA1SQW1GGpnLbCxroMvqysVeOj5dtp0RYqGsUKl+5OWrk4neGUVugGycYLNJCJnqka5DEGtjSBAQy8VHcN2tC8h+EypjemLNg6zN4dzZ8QBGq0fOWXmkS+sE4vCVe42g0QYkNZoTiCiRPywV0gb7nmUjBRyLtYRxjKsFq/L4/cbJcMj9agv6P5wLffvTTlRKLxoRhsHmQ0h5YTSFApuCKjtMeAS31KUcS6I8jMmJa+NbwbvE+/fPsrFo4sMPZa/T+nwo8b0SR87ghfH8e+IJ1LlF9PHUBVRaqlOh2LfW1VXXMpoxqfd2dfVj469HMMaWskM0Cebmul8rGk5vW5giYxhcpds3ixzp9zfprl/slxE0GOfFUOz6hgbVaUVsmV54S3cjBbYV7TZBfpXZn/B/IbsvX8aTC9UtjjGdzlzrrWWgx6SHBAMNZAieSmdrckRl70eCnlqjNs2SWJQoctBXOG/mrhOdNsZUeoBGX2a2hBp6KwSjkjBG8iH6X5yh7AEzRU95dTnSK7bK+6Yk2RhC3ZhJVcgKK07yPtCR4T23+jBThjI4gN1sXlShQtXOSNBjpZQTqo2JBnwuycgWh0JUxUPDrKwjWAjZ4gEHZnCxa1twBtGzBBVvlFF/hbKPpfb/QopSpsj92F06TMbhmHIWFcocdFskcck4C6NDP15hiGfFKn5fDjsmkKZ2ijuh7AfJ2G7arazkmkVtasCX3pApapcz9LuprOl0epYiXVAXmpeUg+4KJerWFic/mTc4+SKnq9Q231tmLfnnG6aFzL+GrTXJEt0x35mLaInlb4VHJK5cbplocZhpFewfRvmpfGiyECzoK7K7SQxGqNT9nGug+otkU7exREAw9kqI7RRJ5ug4tt07cOOsu7wS8XwWpCLnUQFbISGxcfTSeOfr X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2bc4023c-0242-4600-7031-08db7d366fbb X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2023 09:01:36.1480 (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: zTUBNuaHCtn+8+ATV3xiNWVL5FT+7D7FiRSsG34Wsw+MW95FLgWikmzoGDIhmjCBXk+oAtCA2+ZOT+cULjvDtA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4354 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770572696514323641?= X-GMAIL-MSGID: =?utf-8?q?1770572696514323641?= Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yangtao Li --- drivers/phy/marvell/phy-mvebu-cp110-comphy.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/phy/marvell/phy-mvebu-cp110-comphy.c b/drivers/phy/marvell/phy-mvebu-cp110-comphy.c index 34672e868a1e..ddaddb3c498f 100644 --- a/drivers/phy/marvell/phy-mvebu-cp110-comphy.c +++ b/drivers/phy/marvell/phy-mvebu-cp110-comphy.c @@ -1011,8 +1011,7 @@ static int mvebu_comphy_probe(struct platform_device *pdev) "marvell,system-controller"); if (IS_ERR(priv->regmap)) return PTR_ERR(priv->regmap); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->base = devm_ioremap_resource(&pdev->dev, res); + priv->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(priv->base)) return PTR_ERR(priv->base); From patchwork Wed Jul 5 09:01:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 116041 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1748501vqx; Wed, 5 Jul 2023 02:51:07 -0700 (PDT) X-Google-Smtp-Source: APBJJlEnGMrMkOtNnAQRDjIl27a0Op7Gj2ydO9ChQyI8AooIPdlkoaIfZ3xGvF46tLBVXCXmnizn X-Received: by 2002:a05:6870:5490:b0:1b0:4219:6b5b with SMTP id f16-20020a056870549000b001b042196b5bmr15976511oan.40.1688550667138; Wed, 05 Jul 2023 02:51:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688550667; cv=pass; d=google.com; s=arc-20160816; b=tQ1ctvxkFgalwhPLyfcnniG69eCZwwRwkaU3ouc1tRmwyy52OvkDJfObksY2vEyfJv I3zF3smZ++SClgfJalR2R/KqpgozxXB4svtAVHSmyNsJAMx9gq2m4Q12ZMkU0MH2Q6cJ vARQqsdUiUhprtbLpAziGdkwVtCEnJLbjtUJmlteCI5FgFcZWGXdpp+/mS4Pw+6iugLj nMbvKOlA3HArj/1TRwt7VeDduO+aNPv2D8KLUn37SMi/9cxBgSfBuxQ+V/14JzHfKVg7 5bu5UdkbrD7I4QIHw+wrP6p3tEuAswOtbE3JcX9qTN1BQD3rvZr6vhXuU0DBitnfFWch JXtA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=b7ZCb6gBF/T5dPOtRZRsisUuFmF+iIQAx5cwFLB54f0=; fh=qRKOll83xUuDb9BHO1WHHyccUA9JCnzwuyhvrMnjSVA=; b=ij6PtJunEGZxeULmH0TQ0AtUGlDUyUKZRIxnjyFcOLhcEmvzC1MANnNYJ8dxTKbXcN e2PijXos9EztmAOyxsxDnnm0EgHdrH751FZ0HZZoZuMRJah4BlUFvU3CmM3prTZcc476 5276AxRnbQpdQy5Ulre1RMuAuyFl5upDMSFr0XV+ukCVxZ+r4SwtDpSjjakJBoIuitpz RWkTtjnOsZULx0E37oZvXEtf7au7Y3toL9dKEpHb3u3a9ls0udWXte10pCd4BB8vU7zg 9mPBkl/74Qa6gluNItYg1M+3QSgsIT6vV49/wYS3QYA8pd5XVLilozlf7DXbciIaTnwm 5NNg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=ddoO4X0X; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ot17-20020a17090b3b5100b0025bdaaf0d17si1436641pjb.33.2023.07.05.02.50.54; Wed, 05 Jul 2023 02:51:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=ddoO4X0X; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232142AbjGEJBq (ORCPT + 99 others); Wed, 5 Jul 2023 05:01:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231267AbjGEJBm (ORCPT ); Wed, 5 Jul 2023 05:01:42 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2110.outbound.protection.outlook.com [40.107.255.110]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA98310E2 for ; Wed, 5 Jul 2023 02:01:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LDeBMHIOw8e2X8wsB6X0vA2WYYoxewtaL78iZeo9Hot2F/zUbut0xhgPwPPDnm7HgPL3TOt51mX36/FJyLmFIklPnKdzmibDPkwF/4RKdY58t+nKNbOkIvioMvw3MMUVYxFqfKYPnhXzN39J4qkVTLKaOS0f0YYyyzyuPE+7VzjIJvW7xPuy24Ek4ftrorajtK47hWOcREdp+0HRuTyuoVCg5jf3i9UOtnJoo1I8xAMEWHX/PQ4dWcg2OsdH6UukvvI3V0ClUWKRYSbkHTU4u84VPKaUC0qtNZzBekPpSy/EIoCW6Jr7PPlErRg4V43Cs9nUsgUSOdxfu2YX8C3/3A== 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=b7ZCb6gBF/T5dPOtRZRsisUuFmF+iIQAx5cwFLB54f0=; b=MLU341s1/Psi9jOMWEJKUK4d5VMaZF0oowAF1tbKFIybCXviG0Qr+UMwuvkeSrBRiRjowC6z0lI6yAB7u2iHuMxzY4tQ0g9nZ92HRv2EaZH+Ijnr/82up5fVnlRKqHo0O1kGXLHieHCV4Av58uCoq0Y8NImJnDlN8RM6FTuyVgAtf/YdiGkM6BdGMyhHu6RwjC/D87tRWLzwKM/KbJjPtrnTG1Abjxo/H6oS5xhB17/79d4R5WWLrNwfeQm/knkhELvdB8fUWFF8mTgKm/jO3AhpzqGOQGSULaKPwj98OV79ULg8WVDAtjXC6XZC+7CtgB53Gw11L/UgygpUAwKZKA== 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=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=b7ZCb6gBF/T5dPOtRZRsisUuFmF+iIQAx5cwFLB54f0=; b=ddoO4X0XN2WBsfnLeovQRRMWmrT/uawbONSss5z4SUZMCZX/eJlCb69R6IVaIKlPmJwDVcu51LCbuI2p62TmU/IgiIh7e+7qTi+pYl8jJUQViFmXmrjT0vk4lVqg5icFDHo9bMBqDGSUKv9AFB+vdgqDdh/OzITQY79amfQrxZEtBgaasEmvZfF18RLyaln1buZSFpVyo3lZkJmv5vgqc0IyiBIrrlaFFoM0gdDwP7bwasugHNp2uFeonqxO26CDBJQQ9l58kfivXNxsl93XC7NLt7ypYHcL0HfOcJoBhmW7yohEgD9wippN+o6omy5oPl9/qNS1OIkPtVhqURq+7Q== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by KL1PR0601MB4354.apcprd06.prod.outlook.com (2603:1096:820:79::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.24; Wed, 5 Jul 2023 09:01:38 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.016; Wed, 5 Jul 2023 09:01:38 +0000 From: Yangtao Li To: Vinod Koul , Kishon Vijay Abraham I , Heiko Stuebner Cc: Yangtao Li , linux-phy@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/4] phy: rockchip: phy-rockchip-typec: Use devm_platform_get_and_ioremap_resource() Date: Wed, 5 Jul 2023 17:01:24 +0800 Message-Id: <20230705090126.26854-2-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230705090126.26854-1-frank.li@vivo.com> References: <20230705090126.26854-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR02CA0031.apcprd02.prod.outlook.com (2603:1096:3:18::19) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|KL1PR0601MB4354:EE_ X-MS-Office365-Filtering-Correlation-Id: de66c3f9-59af-4460-2953-08db7d367109 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uieH5wjL6o4OqHzGnlCzwOsW47BoZFdclbPQAxdY7g2oHXaoBEww0cgtlLb0egSsym2YrfLVCb6QYZaEB8r5LK/jhLZAKFGucX3U1K7TzT5JazqkC5YnkLfNjgouWyx8Bztloz3uEErrq75LVQno4m9ZoM1hAEtrV2Fqxiyc8tt0eq6NKG8wawfzX7gQzpkajpECF0tE8nj8pnckNMgPhTluxjU5AYdEbThRc2czjblg229t2o+mr1ImIOACok47S1DVMckMswLJiZnS4LGDNoXBCqCxUgq71s6HoizuxYa/Mm85Jp5aPV0jXxC8XeIb2dGJGqJZNCyToKW6+jYMr0JBmDAv//JJdpu59cKsY/0jl/rnlStREAcOVokQ0oevsRpHFmOabyfewiL4M2nqfJY8ieKyzO5ocCHeoBn1lJHngHmspBzy7KOGdY6YlvokJyXyFMpFhh9oTwwTBzUnjSB+yOk93grfDiXmx3eb0cX0xr+LrY1sSBnDDgJWpoAedV/EOU5IaF6+HkMSIsXBJ3UvS7XNn95U51/42ClP0NT0d6O+DK7TRhtE92CDypsaP4wmkxTgZnAQc47h1hGf/Zn+xOxf6dKs/PMcEeBPNfX7lfqQr5Jx55PKTvVgafwF X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(346002)(376002)(366004)(136003)(396003)(451199021)(26005)(6666004)(478600001)(1076003)(6512007)(6506007)(2616005)(186003)(38100700002)(66556008)(38350700002)(66946007)(4326008)(66476007)(83380400001)(110136005)(6486002)(52116002)(316002)(86362001)(5660300002)(8936002)(8676002)(4744005)(41300700001)(2906002)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 26z7S4EVtT6JYZvikY1yV1Mj15fRuZmQKKxVFt63W2fAYJMQcu0/0rnFHVLkHzzaECOJUhGo9HCw1x1pUJSkyv2p2T+O8Gb/KWokSs95Bh2dKOzLLTgssb/FEAUcXg5Kyv9nAr9gz9EIBSw+bhFacA+Pd951APIinkrEkxTuidf1xlJEZuWEfCd0dsZT+G30pa9KoLL0iTmKvp9CAEYGO8q+1N/JUEbE30JGJCm7dbhCWD039oTujNyE75AVlBrN2PkqHatm+42suIDIxeumP+Rm8LqdWJk3ZMO/g46KjZ8Jthb9Xkt0/AZZH3t9aCRuY3Hk/+0YQIchwbaDF9ZQ0EnXwuJoTD0rm9276yn9IcG/ZDSGRB15Lt0j5IanbWlNL1Kyw5HU0wMHw5x0Mmg5cQ2Bb5Nc52vXEYQAuy0GVHY5LwU4m36eU7JiYb9ZTEUXdLd9tDyF8rddQfTPXotxtNEO5K4bFqr7RP2eiPQTeCkifhM3Xk0T/Vy9L/42KfWPoZpB2N3wE6amP+tbgibrfkwrCDGR32saoVtb5uGYfSQCAMSJ2mxV0EI6nOFgfEW9uwXdkBZJuWSD/5j0MhU9jM9EqoxgNSUWh5z0jbmbyudl9bM+WAbX9YAXCiI3EQJh4BB1x28opGshTvSZ+dmrTaoBjCcmMfPmKU96fifRyTu5hZslJkSg9u4pyGoZ4zyLzuPhodqrLNWzpVne60O2410/TyOINB9ibVQjzl28tmeiByxUiddK/8ohwiMMU2B+XzuslIPja8SN3yKJ3dX2X85Yw8AHUPY4ctQo5nRSmEyE20gYEyeY8+Smx1sO6czOG1ctx0XQPssk1b7AXGBL6L/FeXU5P8AaisTdhw7hQBcGGFq62ItSKIg0ziUIDH7ICdctWK233+wwfY+ENLwj3TxgzvXgALcucnTzsKUwwF+wTigYZzHslUpTnC2Wm2IhSGlT6dMibfOwzS//z3p9tTzI/VsmcHqk5bv269BCuLB7FJwjKm4VO66R3PyH4suUCSOp619Yc5+CXFdKwDmM1tDpOsfSwmzn5uX1l82XgnIZMHtrx/BiAdGAbH4qlLPmCL3h/mysoJMoeNJlZMl1TdGNud1osFjEgAD/1kOb3zGkA19IA0m2YSb5UhiEwh9aYecoNZTGzOM1yKPuPF969hAZP8hqGqg7qzrcqj6NLkNGkk4mJ5vN4WjjQS9qpDVmV+t5/WPG7kQMawixSfqHy5FjQhYihOQWTZCEHxrJ/XWsmNcemwMWkHsvKOENdjf/KPx9MfMLMStDWe3eGWYzQYPJ06gUa25c4nEtc2kh6oSDtzeOtDdaow/Z6wsTVXy7Bh878GcizK+8/UT2RdPPUxfp7gNBf7oA+Jhs/UIQCNkg0lTbSoy8ncnXC6Sv60kojb52EWGyPu8PwI9QzMVXjl4gCCAQ6pVHEZpUI4uaMMbNwt3DQ9vLSK3wD4bqp7xx7c4Pdq/vqKsLFBJGDsuK6D7Wyl9gVgDFNiUqg+8dot+7sKrPuDuv1L6Q/OqKkL4SSn8iCQn5zS5ofPfz38sV1uAyeKCy62NrdQHGYkw9WKJbm9VF6UDc8u9Qd2vLNEBN X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: de66c3f9-59af-4460-2953-08db7d367109 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2023 09:01:38.3439 (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: gLewlQxSgw+ojUdirKsO1anosoOMaP0Qi2y5JPlOcUH75r5VhyTd+8lLudUrYeRC6ufAtgk/8CwvuWzJ/iMZ1Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4354 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770573704448777400?= X-GMAIL-MSGID: =?utf-8?q?1770573704448777400?= Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yangtao Li Reviewed-by: Heiko Stuebner --- drivers/phy/rockchip/phy-rockchip-typec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/phy/rockchip/phy-rockchip-typec.c b/drivers/phy/rockchip/phy-rockchip-typec.c index 8b1667be4915..4efcb78b0ab1 100644 --- a/drivers/phy/rockchip/phy-rockchip-typec.c +++ b/drivers/phy/rockchip/phy-rockchip-typec.c @@ -1116,8 +1116,7 @@ static int rockchip_typec_phy_probe(struct platform_device *pdev) return -EINVAL; } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - tcphy->base = devm_ioremap_resource(dev, res); + tcphy->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(tcphy->base)) return PTR_ERR(tcphy->base); From patchwork Wed Jul 5 09:01:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 116034 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1735086vqx; Wed, 5 Jul 2023 02:18:39 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6QdZEAMOEYEAnEomf3e03hPLak4JzdM/Ud3jwzipGDPjbryRfwiEaGwabrHvEpoT+O0d8N X-Received: by 2002:a9d:4b0e:0:b0:6b2:9462:570e with SMTP id q14-20020a9d4b0e000000b006b29462570emr14418506otf.22.1688548718962; Wed, 05 Jul 2023 02:18:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688548718; cv=pass; d=google.com; s=arc-20160816; b=x+MMc1qWSjej05g/zXqWYOsNHcwB31om1ECcAj5502/nYaEF1kJ0xfN2VWfpxpaB4x SLArAxTcNAfsKVszpAJxiEgXR4Rkab2qcq8VNVc+A/6d0CA3HsIMGZ27g+OUAuxQsEPV 9Oc4YDKdR3en5lnKUjP6tbQ8lA0HCJw1T5VWYWxHoCRZiU/Il2HlBnN2M5WvnajpUaK7 /Ffa1/XeiDIa6NdRJX4joPqo+CB7NyHMWdLfEsOpRCZKRXrvE72VjCGyxZvBFGuIZKh4 RYrPmKvdwijOipKCahdW3/Ytxgyz99DekkFj+Xe5LOGrL1odrlgSsZHGnDBlrHIEYF5j 2Z4Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=CzM3M2AMGRYBhhdgkF86J1BOluETaIU5fbdzSgyc4xk=; fh=IJP9zDKpX1iEnXFZXHrXp3ftQr7mqtXJn2ssOISM/B0=; b=BjdxmXiM+z7ydt1SaRk5/M93Ya8TorawBjfDR4ccFosdlv4heSGYl+gW04iFz44h74 OngegasGGmv2TrfaoZE0yBxhjL+vqIw2ep8VO6KK4exWmFLVsLGYI7hMTU79k060qOEY LrPhdpC95zgLzeVnec4S7V74ziIYmV9Wx5CLC+1reGlwIj4tMun9HK0JE5IsYNyqQQWM HYxXavi7Q1M3Jym2ZHkf2ghEDgLChvGbbQ/yeY4wyZt/Uup42enDPxDKqPHu4DkdiEDt 8vlTRGenOtv5tc+NPbzmvLwuIWjk8PwY628I56huC+jejt31PhQOUsmTMcZTI2YghSu5 2tdw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="U/3hByQu"; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f25-20020a631019000000b0055382f1e985si22299304pgl.333.2023.07.05.02.18.25; Wed, 05 Jul 2023 02:18:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="U/3hByQu"; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232272AbjGEJBu (ORCPT + 99 others); Wed, 5 Jul 2023 05:01:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232107AbjGEJBn (ORCPT ); Wed, 5 Jul 2023 05:01:43 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2110.outbound.protection.outlook.com [40.107.255.110]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D37111F for ; Wed, 5 Jul 2023 02:01:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T5I4q+XD1ETMzQGeo1Hh8DFgA30539lIcQ6a86GhtYWJVNUwVgCtGqlPWSAsTWhn+p8aMEoqg8UZJLbKr0Z23potYSSNd/vSGSYMWX8Ot1k0fW1X2KW23zoZS8voCuL63nFn9/mI1Wfw2rcghJNjTHmVRA7nb6xdtRecVJBzfwnZ7eqvm0ckUtEClAW7h4FSPIPedBmp4argDCCX88cIOyUMl0ssaxEK2EPB5M0Dvpu8GptVX0R7rngBhs62RYPVPowUKkXXSJZGMiEEL2Vz9u3HPk6JU71ecpGBaXuiKOuEwVe3cNA322YJr8OdfHic/jWI16VlUelF+nnujGSG9Q== 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=CzM3M2AMGRYBhhdgkF86J1BOluETaIU5fbdzSgyc4xk=; b=LQ6JLTtOwuNH5Ngzf7GW47k/yW9S7XbGROYkRbCiakS/xKKQRf0lOBeS6AEZ1k4pb4zbCdUGm6XV3ATO0GsTooOdW6vc9qsEEhxwal3reBCgd0OZFGW+pgsYQb4oVBVBbBY/gjO2hAqxLoI+eEtFPoV38rsf6z0B1zpBuzsPyabiJqRc7i8n5sq9c65eW6WKIISczLH8Pn8JGzGDslY7Vq3SBjHa5mEQG+ci5M4gQzSIOnJWurA1QqdYdeH9URLb2LSscEOfdWBoEBxThNbgskus1ky65Vk5Ay2Hl0fU0CYDqBCi1+OWGx5TEND1qxW+T2gYplKc1FM1sco/PQWMPg== 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=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CzM3M2AMGRYBhhdgkF86J1BOluETaIU5fbdzSgyc4xk=; b=U/3hByQuOPrCanzAR4DQHR5CyD8/XgS/7/2F1sRwOF/M5cLjbRw54r8Wz/argCnLkzrKcPC+x+eu/wOhm1y2S9MZaaZR9SESD1BnpKNHYt40lQ0czlY3vH4awh0sQ/qSVAEuVmc6Gvu+86/keTF/+9InzPWVQ7OvSiV4MwRgs9tm8p+KraW87KLbGv+KofNqhb5nhNAp5aNwHh4vM/9FhlB3Q1A9dcNPsv6ybKVArvehA2ow0u+eS9lWngWj1UquV43E6MrK0c0Seq260b3cHqiFJOZ51RnEZKbZuCE1FWFgALX6xB/MmV179RnP+XVX8Vjg6Vm8e+J2JAsqdJ+lzA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by KL1PR0601MB4354.apcprd06.prod.outlook.com (2603:1096:820:79::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.24; Wed, 5 Jul 2023 09:01:41 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.016; Wed, 5 Jul 2023 09:01:41 +0000 From: Yangtao Li To: Vinod Koul , Kishon Vijay Abraham I Cc: Yangtao Li , linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/4] phy: renesas: r8a779f0-ether-serdes: Convert to devm_platform_ioremap_resource() Date: Wed, 5 Jul 2023 17:01:25 +0800 Message-Id: <20230705090126.26854-3-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230705090126.26854-1-frank.li@vivo.com> References: <20230705090126.26854-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR02CA0031.apcprd02.prod.outlook.com (2603:1096:3:18::19) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|KL1PR0601MB4354:EE_ X-MS-Office365-Filtering-Correlation-Id: fc2125e1-8bf9-4e61-6e4d-08db7d367241 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JE8fa8Dq9ijSsFcGjVXNAkNVGYmp2PLP+/qje1nKafu9x2gc70LrrYh0b2AJ4ZkrPzAd2zaBbtb7akycsxzfFwCNuLtoFhjbLS3ZHyITrCCVCor8Krgxt0kpni1LJnHnlYif+iqcFPBF2+6VAhjh/Zf4pE7DwYCvaAQpOfHCbee7yfLW/4xfcohn5b32oohpNXgVWQKjeGhYL2jqK1Q4nGHzCZDWIf0wVn00/4psNhkQhKozdWWvDhlPFylaEI59mX+VuVIKOI6tuLDyuf25dtjfEQ3dXtvcXfByXicsB4PIn03PpBp1pPznpDrSW575UTNeZesR2X7ncxx2fGB3E+VtH9C4oqF2w8DyhESO3kS56kefLj5zQCq0GY7ZxOW9WGDmmC1gnzZ3I38Hz9MHSmUH7EYEVwFeKEpn1K9Tq0FNt4bVSwIs9KI9Ai2UXKuZqRQIh3giVA18HfAcriB9BrHun9tNy77PanudpO/IzUuSmtEj1pU80ndYcksj5Gs2dmxuojpUv/vrSOMDz0/J3rwnqXEPnbddyzG9L5Hm/Z/wLLtuWXOGSmicFFKvMW5s1jQj6T3Pwt6G34+XLlOxxVI1yCL7Vc7IyQS9ci8fQGB15auhHrsmaIYKAHmDL2zO X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(346002)(376002)(366004)(136003)(396003)(451199021)(26005)(6666004)(478600001)(1076003)(6512007)(6506007)(2616005)(186003)(38100700002)(66556008)(38350700002)(66946007)(4326008)(66476007)(83380400001)(110136005)(6486002)(52116002)(316002)(86362001)(5660300002)(8936002)(8676002)(41300700001)(2906002)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: OmZKAen/9o8zatq2Nl5lhX8BdB98cesQ8qqYeorLiE9BRuSZRz/oHihnzZanT6AfYpRZ5TiLBM/k53/oUk/COJvlG7ryvEobFExUCnBv2OLTcx0YLLQ0Wk6VTHcE+FdL2c7SAjWtv78ma29uCAXSUwEk2jpEW25pi6/YicFFF+kzt9h42NJXkuVvyN+TYHnGb94v1UOPI3lhSVnhxng/JRuR155Z6ZuQRqJ2PVgWjAFZ9CIKE4HCuVUHcQx35cHP+Q8QdW88kJYlwi6b7gnjjbgfnqB1xqAfCD3U917jUqHbTLs7V8oJJcPAvj8rLB1RZw5slf1A7YCUUdtp8MAmWg0L8RYafjXPvmplaXJ4HjVzfflMxNyE4BD/Zxf9ZQXD7YCZ1c+gqAB26tAKbCiK2O0cKP5oF21VTNeCuzmQgeqP1nb1brPAA+1W9CSHXqTbK6JddOkmMhlDyGOieyC9y2q0OWTbKtZPDGiNaUG2DZj6IM12ddYChiNp4jOg12vieMV+V14TV0pxFbeda6xfLdTesKnopcLJSKcSAKtRRLPXKcCge4ZtbhJScOCFHB4i2pF5bh/0dB+LvXwV2ZLhyYwTWZ6ZbVX+yg2e0XQU2CxxZfawgUIqBIVtqa7/kgFIDB4seuNsWKYx1t8+QZV6BOqEwlLzZdT4SdrzSmnvvIwOuWhbIo4UC0Q4EjvXfMypPLpwv7bPxlHj44tv5Zg9LWZ+S3oHgtwHXQqtReMuEAqj5dj5BYEFTOHM3D+EdH5Lvs4UyUw/kClnOnfzYCGKvOoPtDzE0Mps3pmiQWkaAptPyv6a8HjrPf/QSsrS9bJuMN0J4TaBaGR9EWK5sGLs1KbbB3lZB8GbvY5dYgSe0q3uVGGIVUPhnT9dSHtTLnV8sNNFVcBMsUeST4wgsBztUqcAiSfdDqLTKHJs6x5QrRmoV+G2UjLnVxsd19ULpIcStLcgB1HVVxsopRf9Sx9WWN2mR24ee7p5oGZ58jNlBgw8kQSEb8tvZrvRs/00giWhCTo3i00eq+flaiHs0FCBbguTQ1TSiXgthi/aB5N5S9aTfR/RsCcOEx2Y5o8Ahv7dZtMOiO8yG4ncvS0yuEpea3jp3VFAwRZH/5BBe9zX03bmwpo+3zlX2FSZTdwFVBPzpqdtaa2W3uoN5Qr3DahrdeTr01r/PjPQ0F6YDduT+11tpg2AziFJ5gT42zMe2HCku+dE1AQ0fpcrlyEYwUXXSC379wptfk2z1yvAjeVkW5C6VxphAMDgca0qjBahFOw7DInwbY84cOROWMF4l/pLrxXllbb/qe5BtYFVU7hMQeM5VtFpdJFuoD9J5WbteJLFfcpWqSLWTpZOlpa694CZNOko5qEzHJk7PSOB+mtdidcOiFZJL2qI4aDJf08/+nCgnlLMQs2Pq2sw7sw99XI9lwOl7ZOFyk5fPczu9/o7n6FKnzIlKpy3vZNHaCHoLgBiNDj0knWoUXeeEAKJAsm8kXshUcdibd+Tl+662iYv6jPcIeIYVD3mNNDbL8U5sKtGT+8DKkkZDOhEHhOy+0hdbGBJWXiBlPB9Me2Z5z3+0kWi0leBzrgbj+ksZah9C9c9 X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: fc2125e1-8bf9-4e61-6e4d-08db7d367241 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2023 09:01:40.3773 (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: fOvh/oRfKG2eEjypqLCJATSAqsFpGx8OT50gksQCONCwviNgv0g0nT+PZoS7OHDsvEpZd8L3LF0exef69dVfeg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4354 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770571661645787009?= X-GMAIL-MSGID: =?utf-8?q?1770571661645787009?= Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/phy/renesas/r8a779f0-ether-serdes.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/phy/renesas/r8a779f0-ether-serdes.c b/drivers/phy/renesas/r8a779f0-ether-serdes.c index 55b7bdfc10d3..67f4c6f8ff91 100644 --- a/drivers/phy/renesas/r8a779f0-ether-serdes.c +++ b/drivers/phy/renesas/r8a779f0-ether-serdes.c @@ -339,22 +339,15 @@ static int r8a779f0_eth_serdes_probe(struct platform_device *pdev) { struct r8a779f0_eth_serdes_drv_data *dd; struct phy_provider *provider; - struct resource *res; int i; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) { - dev_err(&pdev->dev, "invalid resource\n"); - return -EINVAL; - } - dd = devm_kzalloc(&pdev->dev, sizeof(*dd), GFP_KERNEL); if (!dd) return -ENOMEM; platform_set_drvdata(pdev, dd); dd->pdev = pdev; - dd->addr = devm_ioremap_resource(&pdev->dev, res); + dd->addr = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(dd->addr)) return PTR_ERR(dd->addr); From patchwork Wed Jul 5 09:01:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 116032 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1734359vqx; Wed, 5 Jul 2023 02:16:58 -0700 (PDT) X-Google-Smtp-Source: APBJJlGZUYR56bmT9/KceFhmpz9Ukj4qN7JcmiIAsXpZN+9UnLrjyz0WdEOLtPkAcut2Om2I3WSC X-Received: by 2002:a05:6a20:60b:b0:12e:5d45:82e0 with SMTP id 11-20020a056a20060b00b0012e5d4582e0mr8899035pzl.29.1688548618716; Wed, 05 Jul 2023 02:16:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688548618; cv=pass; d=google.com; s=arc-20160816; b=0H2dCyudvN/MqksxHcTlHMdsLh7z+yZBZ1CpDyqIJsFDXmbo79YrMpgn4rodLTcoYr /83ctw7mRfBi2DvunYeciO5YeqxDqWIqtqdrkAe9aTSv++Ndr0RGdAmc8tnfQ7TWr0M3 zGWiFC0q5Zcx5GWHcVOpx4l71zX6thfKuOjeW8VHZmXPrgaNV/Aa5+pM2H86N5MCyCaj QWMmQqouTR5RU0R2Bck4yqr78Fnkl3YuYqF1uqtxABpe7IvElfRLWGl5+zl7l3RIUsUF qk4jbg0E5cY9KorIdWKZDVePPWBGfcNU7InIXGEa0IPMM9yns/B7ZdZFlfyrztmEZ2M9 KXKA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ceERcHS3vIFMT+gdi/X160XFJqjBBw4HMM1zYRm1AnM=; fh=SFSvI1aXIoeIbwRYp7K1h1hgoeaXVM8Ubl0fWA8gISA=; b=e1lMm0Q7PQ+ql5Knec3c8AiOyi24h3LAnrUrjAWNQwFCVOgVCCfYYggqhbqR3aPrIs ZKVS0FAqXoSLzOie0hvCPIh+ioB2AArthR5m7ow1MkvdIC9Ai8+9RdTliJqshXLUtbUO NPKTwNtvcdQ2SS/CozpFb6JfSsjAA+8LEFK5VZ6paBJl+krdUqDCYQZxJTYbF4toLiIU 6clBzG4BnkJhpYz4B05ZMElMvWwXhwRJ+3j+8FxE7M1G+cSuS8eAkSkQ8DYDrfl/R41N 6q2o7Gu3fW1tQU/lcJBeQxtrlc3+2rsYBcmuUVqZ+4GNfGaNbJAkYCvN7hR/7FaJED8Q XKvQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=SM3uo7c4; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h7-20020a63df47000000b0055387a0517dsi22516912pgj.529.2023.07.05.02.16.45; Wed, 05 Jul 2023 02:16:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=SM3uo7c4; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232290AbjGEJBx (ORCPT + 99 others); Wed, 5 Jul 2023 05:01:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232152AbjGEJBr (ORCPT ); Wed, 5 Jul 2023 05:01:47 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2092.outbound.protection.outlook.com [40.107.215.92]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DA2510E3 for ; Wed, 5 Jul 2023 02:01:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RreXiUEDWRsFlXFH4rteZgQJCiQabu5BrN2k5xzqN+pw1I7VUzvyjL9IPJAR9vkXbulVJonEzKgRpSPcLGH47JCq/tJ8r4yaBJNdIXVHSBZIl8E1+dPnlbOUwgoJPqJAq8v7xfrzflll6QXTYaiIFQTKreDQSlB1GBGywlDif3jLChbme8mFGJcRzKKfdwI7573804eQX8TE1xnwGzPpHBj8kR/fQJ3AhqA3TnZlcZHdIuvTii6JGxZyADrWMLy2hupAc8nIhGEDL+uSSifg1+/LkUtCED6TmvSR3RtLrd+ivJv/4QUFi0L5aF7xe3JV5NdeFmQqpZn1Mb3ExlE+cQ== 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=ceERcHS3vIFMT+gdi/X160XFJqjBBw4HMM1zYRm1AnM=; b=AeBFlhjSteoHryiyMWPIPGJ0jJXyA+MCgjovIjZ3hACTaqBChl43gJAKDdr/papZmcwBF6WQ/l8d1phhXr+yPLLPefL9j3MQpd8gbTGHOnMpEb2Yxb2PelFjZ/GXq68IHkScE2Cnp+ryOdWz0BPC+mPkZQpZ5z18AQ/e8KPhDIXH6cyGtsfuJMpGUDFs8+vw3oR+Xo2QrWD5/RckpErnGw4emfQvxMxj3FPWL7qYCM4ERBHWDSRvMFbjrickhRw9LapYuuhvrOknymoCWFPYbDMFZ2g35ppaqGaMPG7uxeYn/t+S33n2yUk6ORHpzaqncnKyEbQmn5gfRswhsGRTeA== 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=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ceERcHS3vIFMT+gdi/X160XFJqjBBw4HMM1zYRm1AnM=; b=SM3uo7c4RTqfsUIWiqroqPMmR9INNhtgWcVYpEkpp6sa/ZslwlgColAzm7hTU4f/hnEWDUVq2/Cb8LFGj5BZ0LAb8BylvUZWrAcUqFN3GzWO3OHvAjNE8OCSvBUHkhzMKVtd2BHQg0cTuBzrqM7VGBxfbpbQuOLgSx9mTqMq67CP1hH8FYkk5AEy5y5LAReUiC9atTvv5/5Dm3cAOP8hC11cDkrodadnVroAnz2pa2gHM+dAC/ZZjdUKYPosT0oqmdHen9G+5z0+GF01XvxTf+rHLtZZLmLGdoNwbeblrLUdFNe3L0loKRfmsgNmpu5KLwz5jzENiVJQXYa5KLpWdg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by TY0PR06MB5804.apcprd06.prod.outlook.com (2603:1096:400:265::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.24; Wed, 5 Jul 2023 09:01:42 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.016; Wed, 5 Jul 2023 09:01:42 +0000 From: Yangtao Li To: Chunfeng Yun , Vinod Koul , Kishon Vijay Abraham I , Matthias Brugger , AngeloGioacchino Del Regno Cc: Yangtao Li , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] phy: mediatek: tphy: Convert to devm_platform_ioremap_resource() Date: Wed, 5 Jul 2023 17:01:26 +0800 Message-Id: <20230705090126.26854-4-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230705090126.26854-1-frank.li@vivo.com> References: <20230705090126.26854-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR02CA0031.apcprd02.prod.outlook.com (2603:1096:3:18::19) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TY0PR06MB5804:EE_ X-MS-Office365-Filtering-Correlation-Id: a2f6f803-67b2-4106-fdbd-08db7d3673a6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Vx3RSBL/wOF2z9ZCcWKGfxSz9y5lpaHW5XUSZRvrV3PXOVqsLNu+C0Kn00K9lfrx1w/6mioZIOpA61AKADtIvLTAJxDAuBbkVLoz+8yvyYHW+wSL3zb0eEeTzQnWwY5tGkY+rtgzZcu3LCgYhgvJghZejOINfthuxEApjvVSOXY/9n4Ezz78NXO/6ZImiv/RbC9zy9JtUnVNq6TPgxtKm4AQgkmMwXm8WEd4rYpEmZD70VKVA8/AsI8n4DTdoN/zzGOWlHzfAR67nTjQ1FcG/jSQFaBbekUjFRwSdd5i6kMsQqK5l8WphCP3KYBDmmTw7GF1dkct36SxukLMT/Urlalm71FkybV1ShHN0gnI8IdF+EfRv+DIVvXdTjSBSeicItLlLoSoqv01XkUIe13xnz+Hv9iY46osVJUErNs4IvFtHYeq/qHxL9yjErgiqgw2zk/AcBhU2ZKhNmBzwJnTAm6PFKTo8VHOx2FC/BYZB2YjBAImGtsw5dboGbVoM419fRKZMelZYKA8CJkrBZsUFGSV5Z9nl4zDcrBiUb8NGG8r2o8IwB/pk1fcieXEaqVRant4FraM8v8FpdqdfHX79qLkf2by+Dr0J7wGPSwV3bgoHFGMd/HVTiK119M6eMSD7RK3gWOmBSyG9+bTwbw/2urnAAgRhX1RixAYJdjeoGg= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(346002)(39860400002)(396003)(376002)(366004)(136003)(451199021)(26005)(478600001)(6506007)(1076003)(6666004)(6512007)(86362001)(2616005)(186003)(38350700002)(66556008)(38100700002)(66476007)(4326008)(66946007)(110136005)(83380400001)(52116002)(6486002)(316002)(8676002)(8936002)(41300700001)(2906002)(5660300002)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 0KUbe0Vj1FiIg0lToaP9vN0/L6Nt7oOCqzeVbT7sTSbcdzaZkMrb29kgf6F0IT13OlpkPQHstjK32pLCxrrR98diZI2bhQgEz/bOtArr7evr7bDabNrOkvo265vlpjUaBK13Or8fnU0f50iPnWBSewZGCXza4fu220kEZ6WeZNjULD1vx259/OGnm3tVNNw+3c43rvs7fbtN0o9b8ZLVvDUv7xWxvb2rxRgRDCivGIZO/eciu2ktBLvgAjG5LCq9mjhq5M3V5OTItK+UcUKQegGvSAvDNv+0U967dvffla31g5nZCpde6qcbvn3nSNqtjhQl58RdE0TcngFjo67VBq+udiRQQ0tUnIwOUugpdL5AacVtjwCE59Bh5FcyxZI9UjznKdBYH3N8PrfgZxgm+Cq3QZRynj370kIln/LkqyLOXTBDdddzor/YJW1RoKG7WKKSjHr8Wq8Crz7T52zGyPJCpXh2h/DndQLljqCezde2DKfv6/97B2XQ/nyDo2jSc/GuxudPLkW/sUOPrujxxO/6JrkVHSdVcThBCr6d39WFvlurLYSv/2jRLux51nmfgRVH3I28hoPJCNcQM9+5ykV/pqL3leHUF5eBIMtYbaeJYaUL1+FahiRRwF8us7fRA77Lxu/FW7UBZMPVhPrNDDmbL5kdK/ojzbs1O90pvlG7HJ8EHDG+QumXY6z2rktRTtnUjmYAbtRqMKDnfNxVECsgaPah4ioHmxZVsKZ3achTl+sL6HKfa/BSmJ/iyvttYkcKc92ocoi8MTqNDypLjOJW6GL5Gb69+XKxvgyENBFk0lA/8/+uUSdrlCJMsOLNftU1NNJOypE0E681m2BNynSFwaozyHdICXG+jxLUfHGy1DSD00VqpjcnakxXNtx3eHGbUQYrLTY+8Yzo4siiLoanEJf7t2KHxtWJAxiTOT/WacltY9+vbX6+YpW8dI7szVaFSxNwnb/0YuF/Dh76ySWYQA+NlJWQj3OznbyxpH73j2F8BrOeJRT+8Fhac3wJTCy5B/q0r4lYQeVTvetTt2a6vT++OW0WbFo4n/OX8CO42CJ6TqeU+ysnaPdHFU3bv6abXWzaMtnC2+8PZ6AX6PNWYbnM64CLNiCKhYMsoCawclJYNQuNYn2VXAdMrcrForn7JQqca9weKysCN59ErbluJeLtqlntgOHKnw4OiM9HWWAnbBEQ1y5PM69AJih/H9aQzgKixt1EL/WmEsh3p43NG+fKrp6eTtFtjbvmFli5OU1IH7UfyyFZLS5Wd9JAwgHRoakUVZzWJ46EUJzPO+oq9a+mzenHe4lg6/lvVf41N31uH7A3nrw/gQsAVcMqm2Lv3uM1i1ccliDtma3ioIgNbcBMPK/xqzfMeUdZ6WBzirnAhIq6CPju9QMCJv8WD6yLC/8wP+CFr9HDVKn0QKWir4efYZGy3zx6Ez/1uNOY6tXSfC1IQLcbHP6flFl07bHTTpzci3Q9RH95Y/+UF0fURe8IPxwzU7vEeSBObSMqrYtrjLygeAvy9FqooWE+MAWwby+GllMG3oEGfGA47WBlM8ZEpeHo9OgmtoHJ7h5FO+sCUtMD9XM0Af69j2Xf X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: a2f6f803-67b2-4106-fdbd-08db7d3673a6 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2023 09:01:42.6609 (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: WNJ3vMXy7Un9yMJ5K25ueEIPhNDMfNjWS6y7jDbiycHG1bt+RhhFDpF3kj1HasclO/ElHyHmColtXlMH1aNWAA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5804 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770571556037171049?= X-GMAIL-MSGID: =?utf-8?q?1770571556037171049?= Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/phy/mediatek/phy-mtk-tphy.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c index 0d110e50bbfd..cb7a4e6ea017 100644 --- a/drivers/phy/mediatek/phy-mtk-tphy.c +++ b/drivers/phy/mediatek/phy-mtk-tphy.c @@ -1554,7 +1554,6 @@ static int mtk_tphy_probe(struct platform_device *pdev) struct device_node *np = dev->of_node; struct device_node *child_np; struct phy_provider *provider; - struct resource *sif_res; struct mtk_tphy *tphy; struct resource res; int port, retval; @@ -1576,15 +1575,12 @@ static int mtk_tphy_probe(struct platform_device *pdev) tphy->dev = dev; platform_set_drvdata(pdev, tphy); - sif_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); /* SATA phy of V1 needn't it if not shared with PCIe or USB */ - if (sif_res && tphy->pdata->version == MTK_PHY_V1) { + if (tphy->pdata->version == MTK_PHY_V1) { /* get banks shared by multiple phys */ - tphy->sif_base = devm_ioremap_resource(dev, sif_res); - if (IS_ERR(tphy->sif_base)) { - dev_err(dev, "failed to remap sif regs\n"); + tphy->sif_base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(tphy->sif_base) && PTR_ERR(tphy->sif_base) != -EINVAL) return PTR_ERR(tphy->sif_base); - } } if (tphy->pdata->version < MTK_PHY_V3) {