From: Jiri Slaby <jirislaby@kernel.org>
To: Rosen Penev <rosenp@gmail.com>, linux-wireless@vger.kernel.org
Cc: Nick Kossifidis <mickflemm@gmail.com>,
Luis Chamberlain <mcgrof@kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH ath-next] wifi: ath5k: ahb: use devm for ioremap
Date: Tue, 24 Feb 2026 19:23:49 +0100 [thread overview]
Message-ID: <cf50211c-4f0c-45e3-860d-220b49f4cc11@kernel.org> (raw)
In-Reply-To: <20260223030803.19451-1-rosenp@gmail.com>
On 23. 02. 26, 4:08, Rosen Penev wrote:
> Simplifies the code by quite a bit in probe.
>
> Also allows removing a goto and returning directly.
Looks good except:
> --- a/drivers/net/wireless/ath/ath5k/ahb.c
> +++ b/drivers/net/wireless/ath/ath5k/ahb.c
...
> @@ -95,35 +94,21 @@ static int ath_ahb_probe(struct platform_device *pdev)
>
> if (!dev_get_platdata(&pdev->dev)) {
> dev_err(&pdev->dev, "no platform data specified\n");
> - ret = -EINVAL;
> - goto err_out;
> + return -EINVAL;
> }
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - if (res == NULL) {
> - dev_err(&pdev->dev, "no memory resource found\n");
> - ret = -ENXIO;
> - goto err_out;
> - }
> -
> - mem = ioremap(res->start, resource_size(res));
> - if (mem == NULL) {
> - dev_err(&pdev->dev, "ioremap failed\n");
> - ret = -ENOMEM;
> - goto err_out;
> - }
> + mem = devm_platform_ioremap_resources(pdev, 0);
Is this a typo or devm_platform_ioremap_resources() is new?
--
js
suse labs
next prev parent reply other threads:[~2026-02-24 18:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-23 3:08 Rosen Penev
2026-02-24 18:23 ` Jiri Slaby [this message]
2026-02-26 23:58 ` Rosen Penev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cf50211c-4f0c-45e3-860d-220b49f4cc11@kernel.org \
--to=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=mickflemm@gmail.com \
--cc=rosenp@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®