public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: rkuo@codeaurora.org
To: "Thomas Meyer" <thomas@m3y3r.de>
Cc: davidb@codeaurora.org, "Arnd Bergmann" <arnd@arndb.de>,
	linux-hexagon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Hexagon: Use resource_size function
Date: Tue, 8 Nov 2011 21:33:50 -0800 (PST)	[thread overview]
Message-ID: <bd0f0eff978b799baf979487756e5cde.squirrel@www.codeaurora.org> (raw)
In-Reply-To: <1320778170.8062.134.camel@localhost.localdomain>

> From: Thomas Meyer <thomas@m3y3r.de>
>
>  Use resource_size function on resource object
>  instead of explicit computation.
>
>  The semantic patch that makes this change is available
>  in scripts/coccinelle/api/resource_size.cocci.
>
>  More information about semantic patching is available at
>  http://coccinelle.lip6.fr/
>
> Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
> ---
>
> diff -u -p a/arch/hexagon/kernel/time.c b/arch/hexagon/kernel/time.c
> --- a/arch/hexagon/kernel/time.c 2011-11-07 19:37:21.719553477 +0100
> +++ b/arch/hexagon/kernel/time.c 2011-11-08 12:21:17.722176538 +0100
> @@ -200,12 +200,10 @@ void __init time_init_deferred(void)
>  		resource = rtos_timer_device.resource;
>
>  	/*  ioremap here means this has to run later, after paging init  */
> -	rtos_timer = ioremap(resource->start, resource->end
> -		- resource->start + 1);
> +	rtos_timer = ioremap(resource->start, resource_size(resource));
>
>  	if (!rtos_timer) {
> -		release_mem_region(resource->start, resource->end
> -			- resource->start + 1);
> +		release_mem_region(resource->start, resource_size(resource));
>  	}
>  	clocksource_register_khz(&hexagon_clocksource, pcycle_freq_mhz * 1000);
>
>
>
>

I don't have much to add about the form of the patch; David
noticed more than I did, but as far as content, it looks good
and I will have this patch applied to my tree.  Thanks!




      parent reply	other threads:[~2011-11-09  5:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-08 18:49 [PATCH] Hexagon: Use resource_size function Thomas Meyer
2011-11-09  1:02 ` David Brown
2011-11-10  8:39   ` Thomas Meyer
2011-11-10 15:28     ` David Brown
2011-11-09  5:33 ` rkuo [this message]

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=bd0f0eff978b799baf979487756e5cde.squirrel@www.codeaurora.org \
    --to=rkuo@codeaurora.org \
    --cc=arnd@arndb.de \
    --cc=davidb@codeaurora.org \
    --cc=linux-hexagon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thomas@m3y3r.de \
    /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