* [PATCH] Hexagon: Use resource_size function
@ 2011-11-08 18:49 Thomas Meyer
2011-11-09 1:02 ` David Brown
2011-11-09 5:33 ` rkuo
0 siblings, 2 replies; 5+ messages in thread
From: Thomas Meyer @ 2011-11-08 18:49 UTC (permalink / raw)
To: Richard Kuo, Arnd Bergmann, linux-hexagon, linux-kernel
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);
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] Hexagon: Use resource_size function
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-09 5:33 ` rkuo
1 sibling, 1 reply; 5+ messages in thread
From: David Brown @ 2011-11-09 1:02 UTC (permalink / raw)
To: Thomas Meyer; +Cc: Richard Kuo, Arnd Bergmann, linux-hexagon, linux-kernel
Some minor nits about the formatting of the patch.
On Tue, Nov 08, 2011 at 07:49:30PM +0100, Thomas Meyer wrote:
> From: Thomas Meyer <thomas@m3y3r.de>
Shouldn't need a From: line, since it is the same as the email you
sent it from.
> Use resource_size function on resource object
> instead of explicit computation.
The commit text shouldn't be indented.
> 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/
I'm curious if these patches are generated directly by coccinelle,
since they don't appear to be coming from git. It'd be nice to have
diffstats in them (especially when they are larger).
Thanks,
David
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Hexagon: Use resource_size function
2011-11-09 1:02 ` David Brown
@ 2011-11-10 8:39 ` Thomas Meyer
2011-11-10 15:28 ` David Brown
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Meyer @ 2011-11-10 8:39 UTC (permalink / raw)
To: David Brown; +Cc: Richard Kuo, Arnd Bergmann, linux-hexagon, linux-kernel
Am Dienstag, den 08.11.2011, 17:02 -0800 schrieb David Brown:
> Some minor nits about the formatting of the patch.
>
> On Tue, Nov 08, 2011 at 07:49:30PM +0100, Thomas Meyer wrote:
> > From: Thomas Meyer <thomas@m3y3r.de>
>
> Shouldn't need a From: line, since it is the same as the email you
> sent it from.
So do I need a From: line or not?
Documentation/SubmittingPatches says:
The "from" line must be the very first line in the message body,
and has the form:
From: Original Author <author@example.com>
The "from" line specifies who will be credited as the author of the
patch in the permanent changelog. If the "from" line is missing,
then the "From:" line from the email header will be used to determine
the patch author in the changelog.
MUST in the meaning of RFC2119, means it is an absolut requirment. What
should I do?
OTOH some people seems to ignore this, too:
Do not send more than 15 patches at once to the vger mailing lists!!!
>
> > Use resource_size function on resource object
> > instead of explicit computation.
>
> The commit text shouldn't be indented.
Will fix that.
>
> > 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/
>
> I'm curious if these patches are generated directly by coccinelle,
> since they don't appear to be coming from git. It'd be nice to have
> diffstats in them (especially when they are larger).
coccinelle doesn't work that way. It's independent from git. I need to
check the manual of spatch.bin if it's possible to produce a diffstat.
> Thanks,
> David
>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] Hexagon: Use resource_size function
2011-11-10 8:39 ` Thomas Meyer
@ 2011-11-10 15:28 ` David Brown
0 siblings, 0 replies; 5+ messages in thread
From: David Brown @ 2011-11-10 15:28 UTC (permalink / raw)
To: Thomas Meyer
Cc: David Brown, Richard Kuo, Arnd Bergmann, linux-hexagon,
linux-kernel
On Thu, Nov 10, 2011 at 09:39:24AM +0100, Thomas Meyer wrote:
> Am Dienstag, den 08.11.2011, 17:02 -0800 schrieb David Brown:
> > Some minor nits about the formatting of the patch.
> >
> > On Tue, Nov 08, 2011 at 07:49:30PM +0100, Thomas Meyer wrote:
> > > From: Thomas Meyer <thomas@m3y3r.de>
> >
> > Shouldn't need a From: line, since it is the same as the email you
> > sent it from.
>
> So do I need a From: line or not?
>
> Documentation/SubmittingPatches says:
>
> The "from" line must be the very first line in the message body,
> and has the form:
>
> From: Original Author <author@example.com>
>
> The "from" line specifies who will be credited as the author of the
> patch in the permanent changelog. If the "from" line is missing,
> then the "From:" line from the email header will be used to determine
> the patch author in the changelog.
>
> MUST in the meaning of RFC2119, means it is an absolut requirment. What
> should I do?
The absolute requirement is that the from line must be the first line
in the message body. The "If the 'from' line is missing" even
suggests that it is optional. I agree that the wording isn't all that
great.
I don't believe it hurts anything to use it, it just looks kind of odd
to have a From line that is the same as the originating email address.
You certainly don't need it, given that a vast majority of patches
posted don't contain a from line. Git send-email only generates one
if the author is different from the one sending the message.
David
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Hexagon: Use resource_size function
2011-11-08 18:49 [PATCH] Hexagon: Use resource_size function Thomas Meyer
2011-11-09 1:02 ` David Brown
@ 2011-11-09 5:33 ` rkuo
1 sibling, 0 replies; 5+ messages in thread
From: rkuo @ 2011-11-09 5:33 UTC (permalink / raw)
To: Thomas Meyer; +Cc: davidb, Arnd Bergmann, linux-hexagon, linux-kernel
> 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!
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-11-10 15:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox