Message ID | 20210608135718.3009950-1-yangyingliang@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 52481e585951f4a199678cd6e61f85db52548a01 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next] sh_eth: 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 | 7 maintainers not CCed: michael@walle.cc andrew@lunn.ch s.shtylyov@omprussia.ru geert+renesas@glider.be linux-renesas-soc@vger.kernel.org jesse.brandeburg@intel.com rikard.falkeborn@gmail.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: 38 this patch: 38 |
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, 17 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 38 this patch: 38 |
netdev/header_inline | success | Link |
Hello! On 6/8/21 4:57 PM, Yang Yingliang wrote: > Use devm_platform_get_and_ioremap_resource() to simplify > code. > > Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Reviewed-by: Sergei Shtylyov <sergei.shtylyov@gmail.com> Is my understanding correct that you tried to convert the ravb driver too (and failed)? MBR, Sergei
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Tue, 8 Jun 2021 21:57:18 +0800 you wrote: > Use devm_platform_get_and_ioremap_resource() to simplify > code. > > Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> > --- > drivers/net/ethernet/renesas/sh_eth.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) Here is the summary with links: - [net-next] sh_eth: Use devm_platform_get_and_ioremap_resource() https://git.kernel.org/netdev/net-next/c/52481e585951 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/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c index c5b154868c1f..177523be4fb6 100644 --- a/drivers/net/ethernet/renesas/sh_eth.c +++ b/drivers/net/ethernet/renesas/sh_eth.c @@ -3225,9 +3225,6 @@ static int sh_eth_drv_probe(struct platform_device *pdev) struct net_device *ndev; int ret; - /* get base addr */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ndev = alloc_etherdev(sizeof(struct sh_eth_private)); if (!ndev) return -ENOMEM; @@ -3245,7 +3242,7 @@ static int sh_eth_drv_probe(struct platform_device *pdev) mdp = netdev_priv(ndev); mdp->num_tx_ring = TX_RING_SIZE; mdp->num_rx_ring = RX_RING_SIZE; - mdp->addr = devm_ioremap_resource(&pdev->dev, res); + mdp->addr = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(mdp->addr)) { ret = PTR_ERR(mdp->addr); goto out_release;
Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> --- drivers/net/ethernet/renesas/sh_eth.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)