Message ID | 20210607135714.3979032-1-yangyingliang@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | b5d64b43f8ccc25428009e5263619e34a6f3d787 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next] net: enetc: Use devm_platform_get_and_ioremap_resource() | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net-next |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | success | CCed 4 of 4 maintainers |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 16 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Mon, 7 Jun 2021 21:57:14 +0800 you wrote: > Use devm_platform_get_and_ioremap_resource() to simplify > code. > > Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> > --- > drivers/net/ethernet/freescale/enetc/enetc_ierb.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) Here is the summary with links: - [net-next] net: enetc: Use devm_platform_get_and_ioremap_resource() https://git.kernel.org/netdev/net-next/c/b5d64b43f8cc You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/drivers/net/ethernet/freescale/enetc/enetc_ierb.c b/drivers/net/ethernet/freescale/enetc/enetc_ierb.c index 8b356c485507..ee1468e3eaa3 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc_ierb.c +++ b/drivers/net/ethernet/freescale/enetc/enetc_ierb.c @@ -99,15 +99,13 @@ EXPORT_SYMBOL(enetc_ierb_register_pf); static int enetc_ierb_probe(struct platform_device *pdev) { struct enetc_ierb *ierb; - struct resource *res; void __iomem *regs; ierb = devm_kzalloc(&pdev->dev, sizeof(*ierb), GFP_KERNEL); if (!ierb) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - regs = devm_ioremap_resource(&pdev->dev, res); + regs = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); if (IS_ERR(regs)) return PTR_ERR(regs);
Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> --- drivers/net/ethernet/freescale/enetc/enetc_ierb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)