From: Takashi Iwai <tiwai@suse.de>
To: Benoit Taine <benoit.taine@lip6.fr>
Cc: Jaroslav Kysela <perex@perex.cz>,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 1/2] ALSA: au1x00: Use resource_size instead of computation
Date: Wed, 28 May 2014 15:51:21 +0000 [thread overview]
Message-ID: <s5hk395sxza.wl%tiwai@suse.de> (raw)
In-Reply-To: <1401290047-30005-2-git-send-email-benoit.taine@lip6.fr>
At Wed, 28 May 2014 17:14:06 +0200,
Benoit Taine wrote:
>
> This issue was reported by coccicheck using the semantic patch
> at scripts/coccinelle/api/resource_size.cocci
>
> Signed-off-by: Benoit Taine <benoit.taine@lip6.fr>
Applied, thanks.
Takashi
> ---
> Not compile tested, due incompatible architecture.
>
> sound/mips/au1x00.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/sound/mips/au1x00.c b/sound/mips/au1x00.c
> index d10ef76..fbcaa54 100644
> --- a/sound/mips/au1x00.c
> +++ b/sound/mips/au1x00.c
> @@ -648,14 +648,14 @@ static int au1000_ac97_probe(struct platform_device *pdev)
> goto out;
>
> err = -EBUSY;
> - au1000->ac97_res_port = request_mem_region(r->start,
> - r->end - r->start + 1, pdev->name);
> + au1000->ac97_res_port = request_mem_region(r->start, resource_size(r),
> + pdev->name);
> if (!au1000->ac97_res_port) {
> snd_printk(KERN_ERR "ALSA AC97: can't grab AC97 port\n");
> goto out;
> }
>
> - io = ioremap(r->start, r->end - r->start + 1);
> + io = ioremap(r->start, resource_size(r));
> if (!io)
> goto out;
>
>
next prev parent reply other threads:[~2014-05-28 15:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-28 15:14 [PATCH 0/2] Use resource_size instead of computation Benoit Taine
2014-05-28 15:14 ` [PATCH 1/2] ALSA: au1x00: " Benoit Taine
2014-05-28 15:51 ` Takashi Iwai [this message]
2014-05-28 15:14 ` [PATCH 2/2] lpc_eth: " Benoit Taine
2014-05-28 16:16 ` Joe Perches
2014-06-02 2:27 ` David Miller
2014-06-02 11:24 ` [PATCH 2/2 v2] " Benoit Taine
2014-06-02 11:34 ` [PATCH 2/2 v3] " Benoit Taine
2014-06-02 17:58 ` David Miller
2014-06-03 10:32 ` [PATCH 2/2 v4] " Benoit Taine
2014-06-03 10:45 ` [PATCH 2/2 v5] " Benoit Taine
2014-06-03 23:09 ` David Miller
2014-06-02 7:45 ` [PATCH 2/2] " walter harms
2014-06-02 11:28 ` Benoit Taine
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=s5hk395sxza.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=benoit.taine@lip6.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
/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