Message ID | 20210607134354.3582182-1-yangyingliang@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 809660cbc82d1bef9a2da1839d5c26a53760252c |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next] net: macb: 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 | warning | 1 maintainers not CCed: claudiu.beznea@microchip.com |
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: 25 this patch: 25 |
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, 9 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 25 this patch: 25 |
netdev/header_inline | success | Link |
On 07/06/2021 at 15:43, Yang Yingliang wrote: > Use devm_platform_get_and_ioremap_resource() to simplify > code. > > Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> > --- > drivers/net/ethernet/cadence/macb_main.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c > index a0c7b1167dbb..7d2fe13a52f8 100644 > --- a/drivers/net/ethernet/cadence/macb_main.c > +++ b/drivers/net/ethernet/cadence/macb_main.c > @@ -4655,8 +4655,7 @@ static int macb_probe(struct platform_device *pdev) > struct macb *bp; > int err, val; > > - regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - mem = devm_ioremap_resource(&pdev->dev, regs); > + mem = devm_platform_get_and_ioremap_resource(pdev, 0, ®s); > if (IS_ERR(mem)) > return PTR_ERR(mem); > > -- > 2.25.1 >
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Mon, 7 Jun 2021 21:43:54 +0800 you wrote: > Use devm_platform_get_and_ioremap_resource() to simplify > code. > > Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> > --- > drivers/net/ethernet/cadence/macb_main.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) Here is the summary with links: - [net-next] net: macb: Use devm_platform_get_and_ioremap_resource() https://git.kernel.org/netdev/net-next/c/809660cbc82d 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/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c index a0c7b1167dbb..7d2fe13a52f8 100644 --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -4655,8 +4655,7 @@ static int macb_probe(struct platform_device *pdev) struct macb *bp; int err, val; - regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); - mem = devm_ioremap_resource(&pdev->dev, regs); + mem = devm_platform_get_and_ioremap_resource(pdev, 0, ®s); if (IS_ERR(mem)) return PTR_ERR(mem);
Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> --- drivers/net/ethernet/cadence/macb_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)