From patchwork Thu Jul 6 12:08:47 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: 116654 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp2516747vqx; Thu, 6 Jul 2023 05:18:46 -0700 (PDT) X-Google-Smtp-Source: APBJJlFltXVizlFHcNCEKbBR9ddGdvzQmIl1pzIbUy4OGSU9vnB5vq0k4iLx2+VH4PxhprrhEh4k X-Received: by 2002:a05:6a00:1404:b0:682:4ef7:9b0b with SMTP id l4-20020a056a00140400b006824ef79b0bmr2105413pfu.0.1688645926090; Thu, 06 Jul 2023 05:18:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688645926; cv=pass; d=google.com; s=arc-20160816; b=keG/HmNfIs3O7GeqSWVDHz/vYPBq8o7Zs439ArimwLCxEZc6c2NUH4lxgRrMRysYEp G61JKvPrmP6W+nBm3MsZBM1hlnyzvK50TTDPZ/sE43F/QbCUEMlq4G5aVbrKl9jMPOqX uGrdZX2jsl5145LKeMXPmRz+lVmg4PxBFxosEtjSY04CTBcmbW+9fNZFFastSD9njrcz yhNJK/eA+g1Yjfi6WMP4OlTIvp1PZE/eNMVa8i1fOkitO4fy27M/3DPngIHNWP9+5/wt KrWb2KTXdvW8YJzdCMTAIk8CTwky0RH+iO0esYYkFp4ShJDlGri874uthg26RUrySLJN 53RA== 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=RIQFtyrZI7r77TsQYgyiBaI6pBVrzhHfNhyoBtEs3u0=; fh=DRJOfmrmgU29H/5wu4MWbdp1JKCYA5lUHKZHeIBXqLM=; b=h3BKBCLw8kpHLPsEBmBn+YMmfwbHcihU9f74ZK00gTiZ3+1PdFgEf2PNAcffxCs98+ ZvfSeSPJHYEjI9U4koz3FFybX9kdsXwUm/ARF8MdQ3tcfZwZ6MR6+itQSgTlmfxrebxj 7bbMIawoOgGFkfy32aTrkTg/6co9MIRxIpIS+D8LAOWgnRgQ/oZ7wIlWAkvRL1+4x/Hu sAdZhJWtZ6Z3MubkvnEg/hsinrRTdt/nTDywJfTdBfttv2RRSj7Munoat563kgj25zbX ZFUu7/LCtWJt1Or0Nz+ggoEXQg7C9QRf1CbEDTbKhv4a/9JnBNnH8VO3MIY0tqP0Id6I zeHw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=JFu0CWLF; 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 z9-20020a631909000000b005574480a875si1332440pgl.898.2023.07.06.05.18.31; Thu, 06 Jul 2023 05:18:46 -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=JFu0CWLF; 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 S232692AbjGFMJI (ORCPT + 99 others); Thu, 6 Jul 2023 08:09:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229509AbjGFMJG (ORCPT ); Thu, 6 Jul 2023 08:09:06 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2107.outbound.protection.outlook.com [40.107.215.107]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A180171A; Thu, 6 Jul 2023 05:09:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZA2RCWLuzV3lLr7GMQ0I1/0tMKMlKyJ2TbD41Z0zwiOcIQ7xmdYplIW5i9BReoseI8ksqLJFR7YidOyMwt3tOL86kPPR8xlAC9I7BbS5yUIagY3qNJ27RT2U53cYWePfj96x5BvjtwjYf7lBej2F2d4LmQKUkZcGMri79EK8JgXOQ/7rcFSbwIWRYb24U4LU9rH8vouGF/7GpFjg26wRG0UjhPkbWIHTvjfceaG78AlE+j8a8TWjklWaK8jTEivpUalA/UDmCWYlJRQBEiIGM0Xlqcn+WpywLbZ/LbaMSzhtzUlnUrUv7qk3cVFKxxwTvTVfn7teMDSvujYqcmSXHw== 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=RIQFtyrZI7r77TsQYgyiBaI6pBVrzhHfNhyoBtEs3u0=; b=hzYMMPZBYDB9ChOwSID3e7TX5FJo1K3aeA/KVspk0ys2buLcu5GPaAtHsyCtcFp5ytnXgtIEGFq0uCnuwKJqgjtBOxlkagDzUXUsa1Hnz72K6ycvKNxna+YrE+8YUPMssJ64ZSqXjnDnD5MGHKfO+1ws2OmMVD0mETwvD8TKzkEbJnaWEaaW9O5/3kPtuiXeDbpro2E7BM79733Nlw9n/8yMuZB08msaVQR9PNN1QxmQ7s8wHxhrsF40xrpEafsE7h6BjJ/H1T9NC4m3vE4U17pYEmuWc9cHyQZvs3NlxPYComRLPXJnVY7hkYEae9MKYJMHYPGAPFgA8fdyAPE7jA== 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=RIQFtyrZI7r77TsQYgyiBaI6pBVrzhHfNhyoBtEs3u0=; b=JFu0CWLFPrttmzpEFcYXtlolfGd5+HHClZTb81Y+TBysErwQBGPaDCVT3GO14x7zzBHUnEcbEHCK310ua3KJ8DEm3Xsk1SQeuqLomDZutsrok9NM9yQoMRn3yFL19znjd69tTs97sClexcG0c2MCZm0WQOxA/hML1QFcw+NxrfE9rGkedaBjdjVULa5Q2y3Nz5eg14Om8XfPoEArT3xOzEq3lHjL5EnNowYBJSPINlkaOoRG1AW4mDM6l0O5GK6JR0yOOH4J756/D5kntwp/up+vs+/xCmvxkShE8gHfFm8Gqo1pF4Wzzl8au5jv0dcNrYZhaoWDb2bKGBcBfdiS0A== 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 TY0PR06MB5634.apcprd06.prod.outlook.com (2603:1096:400:278::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.17; Thu, 6 Jul 2023 12:09:01 +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; Thu, 6 Jul 2023 12:09:01 +0000 From: Yangtao Li To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Michal Simek Cc: Yangtao Li , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/4] net: emaclite: Use devm_platform_get_and_ioremap_resource() Date: Thu, 6 Jul 2023 20:08:47 +0800 Message-Id: <20230706120850.11026-1-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 X-ClientProxiedBy: SI2PR04CA0004.apcprd04.prod.outlook.com (2603:1096:4:197::22) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TY0PR06MB5634:EE_ X-MS-Office365-Filtering-Correlation-Id: e814c854-0180-4c4b-75aa-08db7e19c875 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1G37IJmceuO6UMQin1Aj0oKjw8UO/yFZ6EnIePBJYrHtn0Kb0cEO4hZUNG9Ih8nN99addgEHNUwEmAsnieFm2NwD6hZrL+zKvViSggP+CMaHU+2kJfvPuQXUjIhX3lA6/SkdHmHU4nTUD7ucTD84nQK4nrRb/lSGjlEKAm3ZnOt5ZPVIZdIqKY2Np1J+i50168NA0z4iaj+LZmivFicruqpRruRRuie6a+gUuxlGfVVyoFMLKht0No78lFJt0q4+hfXx9CTxu4srHY8zKQlTILFGfAAJhCM19GTnZhZESKABzWJ0a2AIfyZA05A+lkw74RcJK/Io1lpcoz/h44pNrmwJfWWuXrVzmSjOfuDMJObXgmMq8k1fYZXxoAqjIHhe91ViZrAy2TC4RRJPdYfVNawTg1p6hM7X4kds5b1Ma0cISZQWIWIqj1rKou66bRdTEEYQ943MvzbLVadflnwh8SvXgmfaRTAkzSga9TghlzC4hD5bzzqIe1qXY+O4tfP2mSZTJQRKIqQNw0VDM1lKM8J4mG3grRjz5nySlYNaxz+6liSkvrh+gYKxNdiksNHvXvZvieGCFFwpQbdWFK4r0R1Y2VJXNiX0pSG/nxI8owr5WygDzQnbmhD0MVVwGlFh 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)(366004)(376002)(346002)(136003)(396003)(451199021)(6486002)(52116002)(478600001)(6666004)(110136005)(83380400001)(86362001)(2616005)(36756003)(4744005)(2906002)(66946007)(6506007)(1076003)(26005)(6512007)(186003)(38350700002)(38100700002)(8676002)(316002)(66476007)(66556008)(4326008)(41300700001)(8936002)(5660300002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: z7JNU+QfwV7I3Me6vjEXua/CPLJjT6TE7mF7mMHaaoGl2cHeiph/fgQ407OWqLIJarOn58XJ4l5tqfvSad58ZkY4ZyRqNztehQHjfA8SltvucC/Ilay13kcw3+AHdBWLr544aaTBnus7AgyS8UipsW07Zh/eo3zF1VbFq9nQRCqyDDQdL/e5+iAzUz+Td7jxHsy/ZAEynDdaWbMnmRESa/HGYGJygm5e36EIropGQbfU2iOYc/21I8ioWA3vmf3CeSxiI1D0NxRgx9Z8BlVQMzQHH/MM+ApUGmTNOn9RvRrHdHeuFJu1jbx2NHDUBSy8AlSzwLe9zkJa9r49aDIAMg7LvIsMsAqUtk2YgI7cVFo0Xdw4oeADQtdteFF9xd99BedjyyhSbXX8j0xwThGuHTffEEpbIuVNkfa7k8rChLC5F1CbaddtIuZtQJm5xYbBhX1FsVJYx+KEP55xpbGIsPm2J1YAPR0c20sBwo8DOTqH2vmppMuszi23KTCuAUe/P4JyXB2oCNsjs7lqO/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Exchange-CrossTenant-Network-Message-Id: e814c854-0180-4c4b-75aa-08db7e19c875 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2023 12:09:00.8447 (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: VIBl3Uz8EISM/ZRnvpLNsqo25KU9/YymQCoxEp334lxXfo8EWY8zJQAN+ZGbyTIM7WIl6YuiBJEzqqA5OJlEPw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5634 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 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?1770673590588561117?= X-GMAIL-MSGID: =?utf-8?q?1770673590588561117?= 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/net/ethernet/xilinx/xilinx_emaclite.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c index ad2c30d9a482..3cba947e4cbd 100644 --- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c +++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c @@ -1114,8 +1114,7 @@ static int xemaclite_of_probe(struct platform_device *ofdev) ndev->irq = rc; - res = platform_get_resource(ofdev, IORESOURCE_MEM, 0); - lp->base_addr = devm_ioremap_resource(&ofdev->dev, res); + lp->base_addr = devm_platform_get_and_ioremap_resource(ofdev, 0, &res); if (IS_ERR(lp->base_addr)) { rc = PTR_ERR(lp->base_addr); goto error;