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/h2b3QE8AFDp81kQNGEK/vqJN9NZRgVKa8NnweIXKBC6LAYDvpfT47Q+a/NVWfVKidBnUiSkbaCVDz+mqf/Y3liT0N5LIkjG5YSvztCisDqiXukfr2CsRV38RaOAy4Kvgxu9GBbAMvGBziV8uWZDL5RNxU7DaJ6DtI2lwBUlVUNmROtDCf6XFrtLiwG4CIZT06McJedK9PKtUjha4fD7qJmukIiEXe/IJxCimt/VPGn05Rp6C+CIxmpzgEUEQdk5Fp6i2UQxD56k8IiZsFpHIat3VdAJK3fBkQQRTsMS7EBkgdcD7Dt5hnO2qPdqWOhpb4SgNUUUTRDRLNHa4kOfx3O7xjaOT6cAFPcYLnj0/78pDbRAbAIQKk4Zz1V3APVETbS0XgRjheDicMNmifpv1f84PZO6fcXjGz+Bav69T72sOyPcejgzkcLdrT8fOwN42FtKWPUIv6UDnQW3jUzRcdMYhgnlpgWiLd7khxvadSMv/RthOA4DRhFnuLm6fG+jt/vHtHhsDpFCn41EtgM2m1bM/3vX9OhSIswODgqHkCOYTTICj01Cr+PyfsPI1K4qfI9f3Y5P9ttA3jccebAdoY9oYQUJRAFtumefJzcFnrZ6ZhAV07S31+0wbosmE5qkYMhh3rMul/cGh++rSJZu4Iz8c6PHocoHSCyeOtBI7RmI47y/fasuqnniP94dnHaIJN7inHqKvSBKDYOcEkAVe6fgr2xf/eNKOdATyXjrmeFUWFsnBYhyfU3au05f165yp/ulQ1mmgF045s/Iz2mczmW82D33p2TaklX23SVzeHFXeRgIDyMmACzp8CEK16AvwTz7su6lFVIHT4VV+4LtaNI3jqHcSXRq1q61F3lNbW7lc+WjfIb1OPHMzT6B3sOIxReX6htxfjjIgK8uIBdXK9vllg9OPPfoLrY5UXgkhyRqQwxQaPGi5Da0HcqQJjkyRpI1VZFCReD5wIGkTabCk4JkL8fUAulfJMSuP4vWXDzPTmkI0FmkXHtesGkB0C9Ib6jINVm/569RjqxbxT2t1TN0+bfoZl10QT56z9VE56cs1bT X-OriginatorOrg: vivo.com X-MS-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; From patchwork Thu Jul 6 12:08:48 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: 116660 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp2524980vqx; Thu, 6 Jul 2023 05:33:17 -0700 (PDT) X-Google-Smtp-Source: APBJJlGZf4mgUnYxb7ylcHYhrtyPSpWESPZt/dfyqC4teFVv1OlVrbtSrF9fnRImCeeMzNM2HYZ1 X-Received: by 2002:a05:6808:1b11:b0:3a3:b602:395a with SMTP id bx17-20020a0568081b1100b003a3b602395amr1713632oib.46.1688646797493; Thu, 06 Jul 2023 05:33:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688646797; cv=pass; d=google.com; s=arc-20160816; b=MSeX8AhGBH3scDRBZb6Q9HcWJxkAWQ0Ise4wm8VtTa1XL2mcZTo2YMwijYdSSxtLLz IfDfCW2dXps2pulIRlermhTeOXWup/PIQInstB/aWXlQ75x/aOL9tRbp+RVZYcXOZTfD dzI+gBZGVPfG4arvJCL1MGWysWSq8DA7+Koa8zuQ2WS/R9/6VDnSn1gy6dtYmyA2PgEb lRCo/FQYIiV7rEWERW8Pdm1wCUIEzm7C1fvXE2kp+XUqrgAKIiQCf4WtnsOMtsSJ9WC0 YBTyhHMhMiRLlkr4q2RtT5v7WPil74NLZDE71PWM/p6LzUNOWZ1vnO4VPHbYteiowDU/ JMWg== 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=+/WML68uYj2jXuL5bSi9UsazKB1sPPP+ROnGfU5ckbc=; fh=JxBGot9+rHFWo3OLvF15NYTNyFN7I1qxqEpaTsCxKjI=; b=Q8IK7F0929Rl8RaooxN6bRgOhmKBexso3OSdHXTaMW2UIzWeKAQFSKSQdlOmfhHECT 11qgonrCR+9pTIb6y2I+FCUb7xRCvADn+LCmfuNzcGJFXqH5ThIgqK8/drDWv2BZRrbo VioOUcwYztsJ8X9NeReeVSaZkbW/9tGu87IsEiNBcHDdwOiQ7lArXswquN47x4nqW5sq QfmoMmYUDPLfjGAX+ZYgBiq3i8sekFwNVITFSKRNWNOql1VjEm6vvvMTAqnlLm+VAiWY xqKJG4wW3vmOUk27AgDvr5gWw3DBQuHlm8aMkQ+NrSOx+fdX2WZ/2IEuXcFtqr9pwHQs wcIA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Ycfnw5dO; 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 h184-20020a6383c1000000b005537c93c40asi1434204pge.146.2023.07.06.05.33.04; Thu, 06 Jul 2023 05:33:17 -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=Ycfnw5dO; 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 S232709AbjGFMJK (ORCPT + 99 others); Thu, 6 Jul 2023 08:09:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231921AbjGFMJH (ORCPT ); Thu, 6 Jul 2023 08:09:07 -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 D3109172B; Thu, 6 Jul 2023 05:09:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RVllzy5E14X4FmPK/+dW0LxDhaM3wNhvLrtjs0OC+80O3tLV//hiFLAJM8jHPrWmAi1Z2JCUJS7+SbLtDITuc5hS8BwQhUhiPw0h8Nur2swQkGcLjIWC4EyQt51rZM+IxdnMBk3A7jTlPb7sOBMk1MW0WOkGYZqOVN0oHmJXnW0p2afMkeQSjE2CrGGgSRvswQD1MdGLSM0AZBEdRSHWlngRvx0lGLjwiQTL1ZDFRsfle4N/fQFG+nmL90ZZBEUi14abhJz7TSqm9/AoVu7jfqCvhFh1aCg73llVwn7mlr98jJaEWXqpHblOi3DO/JTxUAB70B0aVdNYGVz6UnZBgQ== 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=+/WML68uYj2jXuL5bSi9UsazKB1sPPP+ROnGfU5ckbc=; b=jSeIGI3zytK9HspkgY6CfdLQ7Lco/18wkTgZ4dAO+4tkLupX3BoplplHm9vFicGlCNmk+7t+4yNqq7jTqm6/Ss1utLeSdQEJE32hpWlGH4AiNvWRRlB2sG0sDFtl4ADpWRGctz4juhXqdA0EHC+MmQN6akkzV1AOsgyGpheyB0sZ2/WOQybF06EIBtdNA3e2tzRkYSDq3h3Dy/P7R53j6YYx/uvrIjEs6TNPWNEONgE7yu89NTK9MHUt9+HKTfhpTTC7NVL7ZH9KQx1mV+sEBYBoZaISqhw4+fLwWmNGVjCvxS5mrDyQ4V4Uw/M9FE/VkLlH89vKGkPvQ9EGSAJhww== 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=+/WML68uYj2jXuL5bSi9UsazKB1sPPP+ROnGfU5ckbc=; b=Ycfnw5dOSu8ey5y9BI5qPLo3sE9PCUOU40iu6IY1+6f+qUl2DeXZ29lnZdnPRtsp5A5CCKgIFRqogGtaUIe7cfbESp6LJZ1vbG+JIhb1o5npSlFOPbOjHOFENSsplc/Qf2idZkGzEJiKvNG3yG37E9W0+LrCN5DoZknapUaYaoq+l9Wz2dTthoDtQLIce1m7pnWYZWeICj2FBWvoSy2JUULzJQLL41xc1Uz98PcnydV8CutvPhRdzgmWrITSTbDtPLNJ4QqAqRE7id4T70kal1qBSh1TAhr7zhR5nkExvnLOx97L3yWAqGlPJ3RX5l3HEUG2DpS7H0o2P5jWsXNm5A== 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:03 +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:02 +0000 From: Yangtao Li To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Yangtao Li , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/4] tsnep: Use devm_platform_get_and_ioremap_resource() Date: Thu, 6 Jul 2023 20:08:48 +0800 Message-Id: <20230706120850.11026-2-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230706120850.11026-1-frank.li@vivo.com> References: <20230706120850.11026-1-frank.li@vivo.com> 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: c4fc680c-90e7-483f-7f3a-08db7e19c9b2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yx7uHWb+DMEFtBhq7XeTPtEK7rOBM0emScPv9pauop2zifao6ZJy92JGZsKtTP5XdCIofdNh+Fe6+iRZDbfSZC62BNQxaEPAvMH5PexQJlxeOpSolSum+8gakyOMXu+LBa7/T0CJg1T+TNh2cdpDdzSYy3mRDDk6rvPpv9cSDVcLbpOq9oNkPImLCd/ceffC3x3Qv2MorkNeeN6C1z63GkOwXwDYENWqEx4Kz+hfGBxRA0bLPh+XixdAyRg14X5L83fgxLnQGWgjjhugsTmuKDeSJbokjsvqWt1qrXv9UEn80Cs19mhgVuKZD0dGQnZokcohWYIIomGoWIF6KhS0FqBDJCykmJxhQSmUZUnUheqEidx7e395lXjkhBwlLknZ1jTyJfJk+NL4+/QfCMoZA6pOKRvPqYfmuSywNmiak6F6T6aeJeKRgG1kHSJffo8r76laadRQctf31P4nNsfjckIKgi5vnugCgNn4JWNV0/ivvdeWNeJaNJ4oOS3sp92cH8XSCqWGd9Y7gGcV5WNoBlj8GgCVGcuzgmrzQ549337DJgLHEVQulJtUzGM5ug2uZFx/rVBI5GvIcyDw1zZrH7npLtqwyusYskNxDoGExl6Z06rusoNk0PPG5McLU32m 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: tc0RBPFoOh/wjapFtrvuKfuWc3BHG//EiDfVWwgfCsl71tLXkWfzppqKVRlJ83yFCr1olVFYbSHnferzQSsJ+QAVTPCYsAezLWmrymonhcRi9mBdlNRpn4HfpdsUt1XxT3siUaS/YzM6VRjytJDAoemp+799t98hfgWpipd1ML/lF4iOz4AmNxfSrOSsbCGC8PEhuTYxUlgo0+Esy5YDHU1YHBtSJ0G6MmTmy4gX/kV96eiNZFINkOgIgzSpMpPeqXCuT/Oke/ok5YQJ3bkJmgU1P3YbGf4Lg8U2gW1ljgzeWSdx4+JLe0VAWvdj4sKTczOqmTpi4eoknTTUYbhjL2ieGg070hXcMFA12b7rFUX87nZael08w69kUcgzEx+a/1Iopklxeuw8iMv8kuFe1Mra3WGrk4Zkj8Gx+xG5gY/clua49WcdyC0zGjL9X+1hXkce3Wh/DvVd+e1lmy6fOYS7fRFEHDGXhg1sZ/t9nXeIu5ABmSF+dmY9MJILDfhPLHSCK9vtLu1lrAWh/wG2E2MUtdZqHsNcqA2ZCG59p/7sqYTIYSKZMtnaskCfYU8oljs/BjoGhVpj1m1Wsd4oOXI1+IY172n8bJvqEhvygXOTGFEVEUfEtGNIHrnFhOISrvsqjINz63fbB8hFKiM5B4IPr5jNC3UOgRnCIWwWmj3+bogmIKzceHi78Pz+In4sPz4C4YAVx7fRdWusNr4vll3Fv7wuz/bQ8cvppI/jys7C9u9jvYbS/HHEv+TcfR+qGiOU6ICtCDTh8FB4i5ZxjYnNpHnLeO+Uue1GC25wfrYCyCVlq4EYUq4IothYC0fpuNgR2u3qzClgFMJXIPF54BgbtuIbA1evJ9CLqWEekmRvcGj7ovCn6p5fquWStCLeGm7JddzQOf9ljZ0H+phIq/gC/AfYVRd4yvHwzrPPKGIbjeZB6i+dYK7uzeBGTXpMZiB4zJVatGvP6Zua8Ckh2DkTNYGI3BGX/q9E7Tk2GNLjCb6gj6MbtTBFA3eI+BI7wvqOncKEymnk40t1o87Be+HtToiJk/b2Hcsfw9k7nUHlOz9KZywSsr4VPFMM61N26rc4EFW+7BjTAzevqo7oveCu5pSgU/wiF74iLIfq/CRgF8PAyqfeRZ9lVxNXyemBdSgwYSuaq/2o/i6TYtyoO1fGLZiXBiEpNsApF7I4bh6i+Wnsllj3gSZCZSQZ7+WzIHr+4SYEiqy4mf6i7dYeADAvwEasnOIRphhUFuinMkZEMINTZiL/Tt9nf+7GKrKBa6ccF/AFn+sCOZM5W89Hzcopfld6j6Ndl4tgW0DgMp7u6B7+I8a9zNo5wlDH3JPfXzYb0jtnljF//99PqKP0FGMzbn2b60Cua2fpPG8HcAts1whR+bSqj5MMzgNC1DPjjnOHC/szgotjczCnyBn19nNko9RyBg9akpbGY2mX3EeOy11hLyFtDed/COvepuwEzn/b89/QIuoAYg1dQj8r5ECW5aXeHc79ZAo3i8HxDZlDSsinBuNGTWs3yAbOO//BNI8Nlyp2TSw/g0vS6nmTOvIm7FQte7Nk2MCg2jCUWsbkRyOdamHe31slWQFYOhRC X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: c4fc680c-90e7-483f-7f3a-08db7e19c9b2 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:02.8902 (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: VJUz9YNiWZmBxJEpEHtzrj5h5YOxfdvvv4cMvjQ3lH/yL2qHgWV2q+N1jv9VqcxekRbytjdT92gfsKv4RAmlMg== 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?1770674504180015645?= X-GMAIL-MSGID: =?utf-8?q?1770674504180015645?= 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/engleder/tsnep_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/engleder/tsnep_main.c b/drivers/net/ethernet/engleder/tsnep_main.c index 84751bb303a6..28a1a4f5d7b3 100644 --- a/drivers/net/ethernet/engleder/tsnep_main.c +++ b/drivers/net/ethernet/engleder/tsnep_main.c @@ -2487,8 +2487,7 @@ static int tsnep_probe(struct platform_device *pdev) mutex_init(&adapter->rxnfc_lock); INIT_LIST_HEAD(&adapter->rxnfc_rules); - io = platform_get_resource(pdev, IORESOURCE_MEM, 0); - adapter->addr = devm_ioremap_resource(&pdev->dev, io); + adapter->addr = devm_platform_get_and_ioremap_resource(pdev, 0, &io); if (IS_ERR(adapter->addr)) return PTR_ERR(adapter->addr); netdev->mem_start = io->start; From patchwork Thu Jul 6 12:08:49 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: 116664 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp2525362vqx; Thu, 6 Jul 2023 05:33:52 -0700 (PDT) X-Google-Smtp-Source: APBJJlFYnxQIwZ76GSkyp5xqXL4c2M++AektBKja72yC4Lei6gchysG/z9e+4Yh4lJ5yBj+pLhxD X-Received: by 2002:a17:903:190:b0:1b8:a389:4410 with SMTP id z16-20020a170903019000b001b8a3894410mr1322748plg.0.1688646832012; Thu, 06 Jul 2023 05:33:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688646831; cv=pass; d=google.com; s=arc-20160816; b=WW6edNOS6DZYeviR8Z/WQ1NRdSeOP1jOedPWH2C+JmGHXet7FnFoc8ccM3DhSkpiAU iE7P7KLPf0aaUJe8b4xL9ZrzXO+lnTuV8+8bo+7XBsoT7TRaeD1H8F7YZwbkuhGrNPPu x9cfOm94jjXuz+yx5eF+ZytX+QRV2zH0uT/84kxWFpT82iNb5y4j23XfKsDb3cSXLVLz y8FP23yeXHE/jk+zwTWzI+pFvbxeBC4K8SoSG+JV3Ru3KgA4ochNdLr+Jn4+wl5gPtEI w5y/CK3B8mi7mjGYUzj3NJB/AIASZn+fQ8XGuXgbqbOdGdFBLGbmNlCYAmDzDuUPHUtl ZS7g== 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=K1QJOnv0L/kXb1i7P7/EaFdEP4hTXsMvzzi3EjjrNjU=; fh=JxBGot9+rHFWo3OLvF15NYTNyFN7I1qxqEpaTsCxKjI=; b=QAlKd9SxCuH9M56fYEO2vnd6Qop09bTwDUsRyJqOss7y9pubwiL1/gP4aMxqgdFS0E u3ICf/nDpMm7JdVG9IqNjJKwDEnQ1r+w0fe4Kooqjm+cPF1OGpNSo+RRjlMWnukZyLth W5i1EWtUqApBD5ZBhlpBkMvGEZL9rlkfy6+A4Wck/h3g0Vw3NCvPFb3m7Rw1DidPkmom 5ZDBPMU19Cbz1WTt56pfJ2HNwDFyPdR4ZVv1oe2YxUSEG3rMS0Rn82rASeBU6K1+Y9SJ 0N2YP4jXpuJdxhvishKDSKb5mA8QSlEfMK3fICrkyoZDsMPPTxwrveRqecqdV6zu5xNq xOjw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=BZXRK8RL; 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 t14-20020a170902e84e00b001b820de73bfsi1296421plg.229.2023.07.06.05.33.38; Thu, 06 Jul 2023 05:33:51 -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=BZXRK8RL; 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 S232723AbjGFMJO (ORCPT + 99 others); Thu, 6 Jul 2023 08:09:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229509AbjGFMJJ (ORCPT ); Thu, 6 Jul 2023 08:09:09 -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 2506C199C; Thu, 6 Jul 2023 05:09:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SXKnyRnepurAxqwyS8cwGPNkFjaSChJyocf07UNqPfPH8vxdyuc9EBHGGlJbvKXfKkW3W4UaMYz+j9XdeyJ7fIPaWV5o03JVfI3qL6k3Mf6vxOcm44fKloX20wW70iye3Knycs0josY89pyAQCvKkNw7BcwXGHQTdjz5iI5/H3cWy0NIA5b0+S2wY28aLUrcAR/dGkXq4FD5iExrxXZxl1aoI9DxzWmes3g69I0FsRnXIPCxIJ+a7kyewx7N+SmccBQQZmOfe3uDpXv6G528f3GA7vjxDJOper2BUdcAy+rsZofJXeow3bOTudIxRCSFRY6wpsbVkX50Ok78Km7aXA== 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=K1QJOnv0L/kXb1i7P7/EaFdEP4hTXsMvzzi3EjjrNjU=; b=TKo7YEc0hESNTNTjn8/siSyzyrOGAqSCrrLgpPaZEE2JqeBOnsVrwV5sjVwSznczJezafgN3IE64hSfpvMJtsR8+NstE2wVBuAoxzBoPLjs8k+SGaooTkpFopXxrnK8KxTfG6NJ+XbeMUpQUsvOg0ZhI8nTa82C53RMJDBr5ckX2EETWQN3pkEYSky4ONPh3w2X7J32+3MDFQCSys2VF1Pe8TsY+Xw+8Su+JRZbzwOrXmXi42Oe92fuK1xu5h1lxDU9UL6yl+/SY7pHOEtnRbICse6st0YurH0LM6ux704ssUeT7TNYNjyr6WeKj2bT0qYX2T9OupRwnB2twHs9ZWQ== 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=K1QJOnv0L/kXb1i7P7/EaFdEP4hTXsMvzzi3EjjrNjU=; b=BZXRK8RLOhh2IihiLvgqjAUElp7IjahjPARLNRdwx2FHgbocAjGp/zJhyPKlvVXffU3FAQRYwTDTL81RerPW/U82aQKX14AUXrE/S0RGXL1kTvQxY6xB2ng1ofReufmJkBo9mzicBKCsW0GMJKuRniWpLpEl6090xXKfPBYWE3lbMho72NxjJbgUc89XB6ACJQlD0/BhZoKY/PweN4Y8puZFa/bxQK/L0wFK27eaCoD6l+LGUoAiDARnwtcmP9PRxXC1gziHtD/WfZEodgPFPujE4QuCpbzwIX/2GY+MVdo89j/trRuZLoHsmrJ6TaudgxE/VfPlriRqQVw6oll+ZA== 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:05 +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:05 +0000 From: Yangtao Li To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Yangtao Li , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/4] net: wiznet: Use devm_platform_get_and_ioremap_resource() Date: Thu, 6 Jul 2023 20:08:49 +0800 Message-Id: <20230706120850.11026-3-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230706120850.11026-1-frank.li@vivo.com> References: <20230706120850.11026-1-frank.li@vivo.com> 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: 25e516cf-3abf-4727-f9ce-08db7e19cb23 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5PJaEBtglH1jdGXqbj+Sr9IUk/dkuaGpMX07cVxFax7QcGMzdsvBUh4zrvnFiOkfSA3M89qcBkWHXXB1OQKariH/Ai0sK4u2di+gMqFrVTMCgZfhVEY7NyQO+P2XgKNVrfE0NQhzgwTxWpzYK5EUQRWDLT4AtekxVTuvvRSYBGoxnC3h3Cr+OS9ZY9rmbcBqu8X6ejojVEhL0zVYziS3fAzd3wlQzaTcgZ7LancjFSwAhG3+nTq2bI1r+HdWv1fhmhlXxMkzFQZEElwfDv4klQHdIx2PDbUR+eLKPyJ7zyMG8heFbgg3HMaRc0HFl7aGEn19pPRC6/Mfx1wm2hlz1tQtXO0MAxJg0J/Bl7j2a+4gS/T8DqjDIVMNtX6b6SLh/OPYvN4OTn5dVhAl0D8YLE25uGqmYz0yqtIPgkhj/qfLWTB5z24Hal3wG/qwpuz+axjnivjmOgwtp1Pguz0S8eLyJmnmaXQrOBuSjr1QDnRi1+AVN3i0bYJNhqRdNHbSp6z2MHFlztpBOFi1pVQVcKsxyBQ7mPoC+p3h5F9fMyyQV6B/7ts1iA8OWXdccFBi77q3Hu6w4Yv5FxkCcMyCEtqKc1uUbpW975M1ijqraj4VmcP0wmX6jnzzV9ZWn/XY 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: Aqs1ByKrBDdPSLRphVffx0/V8X44kDnWkg0JGl6fmRxTCSR3JdQdEZUP+4DG8rsRVMYWvcdEtO1fmr/ouGS+ia3wl6UweslUFKLinuTDP12eyC7QO6WRolyEDdp/jpIc69aUIEAkNAnoPwiZ64D2UXwnMSiobZYjP4LMtUh/Lu1nPfPy2xjecOSwjaqbpaQ3F0yiqJudgoDZbbrrwwbYtQzqomQibR6L/XE0ksSCPAtTq0H34Dz4dllT4TtFOpP8bDe+DOenvUn6LiqUxNaebZ0NCGuCdh77t8GBVKtkMSm4r2rWOLNaB6hUS/OMTqPi7VoOUagQJQ4NLX/Vk1aeJ1KrYFgtROsj4NigZk+2WfnABjm0ae+Pk2sIoKmRCkkRv5df3wCER3gPL0RMCogPWYMqEK/dct86jbL4TW2NrtVwcvLS1QdD4mgiJkZZNWEmt5nXaDJZs2NLDSL5DkOj1SjaW3WEbeU7PMQjiOmBkcUZOTQOKz3/Og3M2flAYb11EqtxO1HqnYLCUdOf3WV1MVAKj5JcCWrnLEwdCLwVTyw0+wI85qRfZ9dIYOi1vTvBCvg03oLWWnK3Kv+jG8fa9IRNQWvF8lpClYEZWeeMZX8UtfRJX6o6fSLClrvLy7nZm1ylXova0hz9lJIRz6TVTJS00Zm8xOM+vV+eyuuYsFDJl+JeZRF4CMXs+rCEBWVrn88eJfKpiLZ2wlFjGbRkANXNwfiUdSAsvv3s4wRlgVw+BU9H+wFg8+m3spXMLNZqNUo4Rpyv5lH0QAKfEpKywKiKvGCz3fPEw4YRukg8YQGjNbZNj/s1RMOS330oRuMiYv/R6pe199i7HX9AA6pmXOdIpb+fDZp6pSszCVIxQdP2AbEEoCnhwh3vC3jpDHNkauzW4SU2HeOasFkGeIi/ufqsUEbb8Gv1HTnbTfVy87SaI4MMWJsechNSVrBHtoCK2Zm1UYbLoMKVtNliX7jXWX3KpgN5sv5YBuPGtQwwTt/mdHAbFDIssFN9/5N0hR0BYpiOLuc7UIacGS+j+WxmFUXIBqcK7u2lis+krR48B7KrGJGdBeexH/iKCz0L8R9BNxfrPpjw7kISOJxKcxeNdDSQKR4DMRt+3c4UZwuSJVZOXCA2XoYHdb8poeO5HBSNbVmEAtHERI5f5dngVbPSbfrA8HLlZfnfxJxg456JJCvCv1mlqv6IFR3LrpeB4hWRNCks6iUjx9ivqv2QNzVHnYwKMYCDHuwOL9n6avpRhIBOCHGyg+QihyBxRXr6bgj2ZmDkV0vz/XgQmQdrdguXwK/ZebSveM4tzvXJnu4Gw0TZT4LFfAP9jpbBMq3tAsuxHcniJPrOjEWD4LXimObxFiLX9vMlyE/7UwQ5mnk6VmrEFLFf/dWUOD12RSHD1kgx3SLtcKrSjCNr0fy/n5zD43f+YerZFzlTaO9WK/fE61jbNo2IIZytrlFuZZl03rcAh+72LlkvXhEjNj6q43NPGus2QW273rzllncfmNrdnmSZiHUJNHwfzIs8ikIaCn7QI86Sd9zGBhPTtbRxx176HQSAj/9KCZ9MlCpXcPzRgPxAmZwGeWfbtch3J5z72oSH X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 25e516cf-3abf-4727-f9ce-08db7e19cb23 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:05.2457 (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: YPoIc/d3V1J8UmxpAI/1752AgwLTJMY9mW1m5ggruZ0QfybPL7UxQt+7fQH70UKAl5oRp/5SfZVXIZiOZ0vtAQ== 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?1770674540217452265?= X-GMAIL-MSGID: =?utf-8?q?1770674540217452265?= 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/wiznet/w5300.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/wiznet/w5300.c b/drivers/net/ethernet/wiznet/w5300.c index b0958fe8111e..8ba931c98435 100644 --- a/drivers/net/ethernet/wiznet/w5300.c +++ b/drivers/net/ethernet/wiznet/w5300.c @@ -539,8 +539,7 @@ static int w5300_hw_probe(struct platform_device *pdev) eth_hw_addr_random(ndev); } - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->base = devm_ioremap_resource(&pdev->dev, mem); + priv->base = devm_platform_get_and_ioremap_resource(pdev, 0, &mem); if (IS_ERR(priv->base)) return PTR_ERR(priv->base); From patchwork Thu Jul 6 12:08:50 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: 116663 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp2525365vqx; Thu, 6 Jul 2023 05:33:52 -0700 (PDT) X-Google-Smtp-Source: APBJJlEhPBCsofelDz2MWvmvd7dVw+2jg4FDJ74wUvvzHb8isuG3io4iU4eJoP+3Cx+8GGSKfJ5U X-Received: by 2002:a17:90a:f2d1:b0:263:4685:f9a5 with SMTP id gt17-20020a17090af2d100b002634685f9a5mr1193675pjb.8.1688646832201; Thu, 06 Jul 2023 05:33:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688646832; cv=pass; d=google.com; s=arc-20160816; b=sbxBz1CkaAUOu29QMWK84SQGxXLGHOqSOTToj6h/LbNvQNoocT8cLs/21XUpCXU0eT 4gnYUTZLH/LtNpGPYzlNemyjHVpjNqCZv702IQb6whnvwm0pQB3XD7dl2r5l9o0U4hr0 e3fyeAVj41fd/kcdp+I2L+jmEkyt5SfnrjG2GBbCk6myWDYXAEU93e1ZO8Z4MYPQWRyA IeF+cfp99+lk3rXo2rPBoGxWn2r6XLdqGan0pwueuV8ZWhq0RfLTGea10KcbtkDkaUJi CZ+Q3Pjp/VI2iZDkkvpwxNWv/NnY3xAp++Focs0ACCJeYYJmI1UB0VrBOdIQagxFPoAB qn/Q== 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=CYK0gWsmtg565K4lS9dtcMG4ncAikY/JtazCy2/f1rU=; fh=JxBGot9+rHFWo3OLvF15NYTNyFN7I1qxqEpaTsCxKjI=; b=ICx/IMIS54ecBYyvsOMSOdNOU0SV9VfEGl2+I8U1T/AR+HfM/66u6lPBuIiMqe/t4l JrDqrqGVKcVsbnF0N8N1tebSuTL5f1SRQ08/NamGfTLEDaT5qq+om0HiR3AUBUWBofm0 UX+0sdqxS4+K7LjYMShTmV3BuDFrlc7NVDgmbaXEeN6lwpfIngkfIRcCqBbVehKqAQtj 7VBU15LMRpISZdjr8F4n9S9jMlmEwyLM7f/zSX1kr+DHRExn2/V2lm67d+hW7HJZ7P4P yCXsr0OF/+cVJ3CJrS8GUH+7KU5fPNznUi+fMaXe+/IIWVHdv3/0o+qA/P7bWt9gKT/2 kQeA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Kbm3cTKY; 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 w2-20020a17090aaf8200b0026319a0a04asi3591226pjq.171.2023.07.06.05.33.39; Thu, 06 Jul 2023 05:33:52 -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=Kbm3cTKY; 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 S229509AbjGFMJR (ORCPT + 99 others); Thu, 6 Jul 2023 08:09:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232713AbjGFMJM (ORCPT ); Thu, 6 Jul 2023 08:09:12 -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 7237B19A0; Thu, 6 Jul 2023 05:09:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S01MHSq8s8RU5jy8X0Aucdahm/e50vmvrKiaoTq0u/qAqq8sblbGOj7GOU4D6UiZFZSALqcqCMs0NGCG/MUQ8TdJ8HuoP7oJAoMyKuiPL26lJAE+wKVWyaKu/mGtGJJUW8bk2pD4bEIvkKk5vuMpj/x0ztp2N5Lk30BRVpGfgTOgqVOe9HUzr5TKdYuGYO4otCh3DIBu4b08IgpcYioarXWjgkapRtlpRxWHHkyu/febIRUUZwikFZNDpkHN+AwJPo+ZXljw3R+mPdJ1qCHT+jdrJxoeyAKM4BFFJUOLmieMA684aEJyL5IWcfaDcuIzL0/39h5u4Yj16slVTmFibA== 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=CYK0gWsmtg565K4lS9dtcMG4ncAikY/JtazCy2/f1rU=; b=nKCFYqprL96OUx/dAykuJcO3Z5YmTgPCllhcJa/XlKdsqDXDZmMWbj8QNO9oSAFf1EQ6F0EdTBn6hzrLeePc0iBVlsE0C7LTmA/LHu+myh/+xTXqIzZsXzE28o0DibNTQGm+15KyDPWzf6QC3tkFXLfbafwdSVbhG68BiA+Pv3+q7CxVZcINGZFtEIFi6pfinu66n1BNWPLPHSC6qK7ZMomKphi6w6qAQuKiovJfD72WkcIwxwbxWxVG+XQvJfDiMXe9rQCSYgD0Lvz7g1RyirW0ho3Dt9ERfdQJfvSdHjnMpoKiIuex+ogDRsEN7rkTDxAn06KgDsqAWB/n+DgPTg== 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=CYK0gWsmtg565K4lS9dtcMG4ncAikY/JtazCy2/f1rU=; b=Kbm3cTKYMEEYpaZk6wKMNJRja82hJVXx/CjiVbhtKV/FolRhtMnqj9K9ZDUSUZLvJNCY5xQBFh2Ac/qhCjQQ9e2Hvihi13JtuaDivn87XJ5+769KMAcyspw8Ka19eq5WmwmvPMmOZ093iOKg4TvFTyxgTpuUhX8d8HKiNkl9mQMBOp0a11kTya3CTRqBhApM5dZbdqHDcWykTE30CGzbdBSl6KLiZ1jQacDW4/WYMqFFzw2YYP15DUR3sFELXCIvAlYcmGFME2d2cLxHysMCpKwg2asliE0Uc8hA2pj7q3iCTpC7ZGqbUTXgaiVA8Ls8FPEYXkN7ubvtKfzBocIvBw== 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:07 +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:07 +0000 From: Yangtao Li To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Yangtao Li , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] net: ethernet: broadcom: Convert to devm_platform_ioremap_resource() Date: Thu, 6 Jul 2023 20:08:50 +0800 Message-Id: <20230706120850.11026-4-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230706120850.11026-1-frank.li@vivo.com> References: <20230706120850.11026-1-frank.li@vivo.com> 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: befcd9bc-7106-4868-5546-08db7e19cc50 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1TPU7ynRUIz/fpMHptuvDX3mmZPvihlruo1HL30AXkuuANcnA5r+RNIaqGIgmZYPW/dq2cRLqQBK4fR3CVs8osUv6MxEJLXw3xpIS6oaxJBC5QIwiKnGPWxsRv3Zpu+dLA7DKUXU6Sf6Dre4YK31vbc0uuwWS0fxV0U9Q0A5D2EaKkuTwkEvGyBI5Is6mnX4kHxOrwJVljXGwH4hQuknVmSpAmgH0NbtOPrddFKarMSlqJlVpEvKYif+CiioA6Pqvuk7aQKyYDoi5TjCzu7JHMQZsK3DxjvC4zSMyo3b0Y5yYREaEI8IvdwBs0AaZFqcsL22s04YLdTnCAsXiwLQBOfMkkz/9A+Fv7GJqZQK9/+qguPnvCCyvYlth5pK4Zft8x+bs5RDlJNEjUSxOlb/n0AbGjgA45JheZQMBggpJTTDHsbff0zRoMS3xKca4WZcSdMev2TEYqB3A8TEHtIVdKii+QG6ShEktzVSz+ujMzIEExxrv2JyvOMzyl/8ktQuBnNGnPkBnXSWi3WARn+8QeDosyqtO0hU1aiHuNh0qI+JyPbU1G6p7dp+V0I2gKJG4LmTEMXAnYkJCn6lKOAoDWDf1blUGjvAbLNMN1nK1pDr0CJQ+cM/kNPjzlDgclZW 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)(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: f8NMqAueIIIt6LE4wGGaCohlRWwGqtyyRFISlxaHhvw99XvtrCcp+5ZZuIYuBXokwaRcJCB7wFWmmYjrbCYUxBGq1Zwlbn/aKqqaW7iB32Ufh305uEgFdJK92P0HApd5liq6UM3by9lmQgh43Xh/nt51qi7BbuVGGbde5KQLnwLMXOOXkN62Hb+RyUYFdkknnjYqBwOsQcu5en3yz721wQeOMMI9DhmRKhAdzSSUDv/HFeLs7kdvf4U2E9FHEhExsTZKZQCak4Vr8Oq9QkdHsOrmRSmbPOoj8hHzAJCNYw+6WDg8azBaVZHouhJw9oedf9ypl35Zzqt6QZ/VOQmmw7rq7lREZ/SsQ+0GAHgLteFBrJ3ULeyCYb7F40rmaLWGx+fRfJozX0jHFwxBny18KzTrBUuHJlN5pXhkDsPfXjp8wD/LzNeecbvnJXvv3wfYuqJPPn82a2vdP8MjUbIEXNZvz4IiV3r4DY2mzmfUxWqUzBflXqgXkX3Z8ZXhUQ+1MiNWyQhkN7teXX2yUBg+hCvVWJzhTq2UfKfJliC4NEmKiDe6RkkymWb1Kyomn3Id1xma44lLZwVbOqwsSb11cddqNTj8Bhrjn67al+pBfPoOVWZEm+xy6KO9GpoverW+wPzfSLQldckOTimlpxno/ooo4t55CeSEXW+NUbfkvn9+N/ht52XLME8cw11ln3vSxZA+Wpg99Yr0ZFDJqgJg3ze0mhHATgsITiYnOx7tRY94foHRdoIAHqss9IeaAFA6QwrwKE4f1SQHcYppgGTHCXRQAZhOCH0ChwNQwmGgJfvOzBtjAz1Je8ix2OXAJa77+DoRZCR9f7OD3yGYcMB15OcTCmrG9v0DO0gtLO5z414HKZMxdmR7xE2ht7BYYTuRXLnCXON5qY2Tws+3y+lMFkuoK0N482H9oT3fKnXW+PQgecVX7Vz1ms+3Ws6qqWbTO3s4bOI8Hn4CNWYb4Slr0dGBLr9kAkDgACgxRuc1dYClFiZfdezU+SeYXsVIKgvigNojZLNyXAHPO9w2HR+PFD9/bhuwuCzLTyg1btaUifeYx8gEu8ov4hIfk7I9Zi6OlrsrYwHFyTbsxY6U4Pl+7xqQimQiO1V+d1CoklToxgeWWPrmvhq6fCFXb9lx5QF/d7epk6kWrpUciGzC5E8szuFaqpS2ljOIrB3jB2TBKDDtkiPNNgcARsYaW7ed3abNOzCTYxQu570/nNrO7XskpvA1b8qTPRDMd7XuqtZyuz1bBkcQaCIpS+CYDcQKof7Ggq6cX3dV/KzQAaCUIFyXxH1I3XhxM1DC5Cc/xa/+uZ9BFN7n1pgz/ns1JkximL7b40hfj4DHdJvWvTmCx3wO/EsgfB7DjJyIXunKtJoAU5wKfRea3DvVBCye8uXO1q3i0I9j8pGskoSVp+SbQiBDbcB0kambTH0NwOxE7sG9D+SBrnitkqF7uwgiinbStjwddeh9WJPoi8JsXL1y30qgYIkqaiXs2cbRr0B57MwC0ckfiVawxzHX1yucBFTrK22z1A1f0JjXwBWXR/jBCMCfUqYLirll13bvHaEhplqt7aP2o+tRH0MIqZbEaFQDUnvY X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: befcd9bc-7106-4868-5546-08db7e19cc50 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:07.1460 (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: 2qH3u63wBOexqLDt/E9kLWLIddetmVCCD0eidV+uTsMKYR2awAHw1hyDErFmRjnCqMKtOw+meaIro2fvL6Obnw== 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?1770674540894040103?= X-GMAIL-MSGID: =?utf-8?q?1770674540894040103?= Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c b/drivers/net/ethernet/broadcom/bcm63xx_enet.c index 2cf96892e565..e6b28077449b 100644 --- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c +++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c @@ -2648,17 +2648,18 @@ static int bcm_enetsw_probe(struct platform_device *pdev) struct bcm_enet_priv *priv; struct net_device *dev; struct bcm63xx_enetsw_platform_data *pd; - struct resource *res_mem; int ret, irq_rx, irq_tx; if (!bcm_enet_shared_base[0]) return -EPROBE_DEFER; - res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); irq_rx = platform_get_irq(pdev, 0); + if (irq_rx < 0) + return irq_rx; + irq_tx = platform_get_irq(pdev, 1); - if (!res_mem || irq_rx < 0) - return -ENODEV; + if (irq_tx < 0) + return irq_tx; dev = alloc_etherdev(sizeof(*priv)); if (!dev) @@ -2690,7 +2691,7 @@ static int bcm_enetsw_probe(struct platform_device *pdev) if (ret) goto out; - priv->base = devm_ioremap_resource(&pdev->dev, res_mem); + priv->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->base)) { ret = PTR_ERR(priv->base); goto out;