diff mbox

Module + offset calculations have to be signed in arch/arm/mach-omap2/pm-debug.c

Message ID 4DC412ED.1070805@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Peter Barada May 6, 2011, 3:25 p.m. UTC
On 05/05/2011 02:16 PM, Kevin Hilman wrote:
>
> In any case, you've found a real bug, and your patch is valid.  However,
> it doesn't currently apply to mainline, and it looks like it's because
> your patch is using spaces and the code being patched is using tabs.
>
> Also, you can simplify the changelog to to just describe the fix needed
> due to using negative offsets in some PRM modules.
I've attached a new patch to fix the tabs/changelog.

Comments

Kevin Hilman May 6, 2011, 7:55 p.m. UTC | #1
Hi Peter,

Peter Barada <peter.barada@gmail.com> writes:

> On 05/05/2011 02:16 PM, Kevin Hilman wrote:
>>
>> In any case, you've found a real bug, and your patch is valid.  However,
>> it doesn't currently apply to mainline, and it looks like it's because
>> your patch is using spaces and the code being patched is using tabs.
>>
>> Also, you can simplify the changelog to to just describe the fix needed
>> due to using negative offsets in some PRM modules.
> I've attached a new patch to fix the tabs/changelog.

Thanks for the updated patch.

[...]

> From 6857bb52af1fcd90e64d3e6c45de3ff0f071be7a Mon Sep 17 00:00:00 2001
> From: Peter Barada <peter.barada@logicpd.com>
> Date: Fri, 6 May 2011 11:07:50 -0400
> Subject: [PATCH] Make offset in pm_module_def signed to allow negative offsets.

Please post in separate mail, and give subject a prefix like:

OMAP: PM debug: use signed offset in pm_module_def

Also, please Cc the linux-arm-kernel mailing list:
linux-arm-kernel@lists.infradead.org for patches intended for mainline.

> Since PRM module offsets can be negative (IVA2 is -0x800), offset in
> pm_module_def struct has to be signed.

OK, but...

> ---
>  arch/arm/mach-omap2/pm-debug.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git b/arch/arm/mach-omap2/pm-debug.c a/arch/arm/mach-omap2/pm-debug.c
> index b731ef3..125f565 100644
> --- b/arch/arm/mach-omap2/pm-debug.c
> +++ a/arch/arm/mach-omap2/pm-debug.c
> @@ -199,7 +199,7 @@ enum {
>  struct pm_module_def {
>  	char name[8]; /* Name of the module */
>  	short type; /* CM or PRM */
> -	short offset;
> +	unsigned short offset;

...this changes it from signed to unsigned.

>  	int low; /* First register address on this module */
>  	int high; /* Last register address on this module */
>  };

Kevin

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

From 6857bb52af1fcd90e64d3e6c45de3ff0f071be7a Mon Sep 17 00:00:00 2001
From: Peter Barada <peter.barada@logicpd.com>
Date: Fri, 6 May 2011 11:07:50 -0400
Subject: [PATCH] Make offset in pm_module_def signed to allow negative offsets.

Since PRM module offsets can be negative (IVA2 is -0x800), offset in
pm_module_def struct has to be signed.

---
 arch/arm/mach-omap2/pm-debug.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git b/arch/arm/mach-omap2/pm-debug.c a/arch/arm/mach-omap2/pm-debug.c
index b731ef3..125f565 100644
--- b/arch/arm/mach-omap2/pm-debug.c
+++ a/arch/arm/mach-omap2/pm-debug.c
@@ -199,7 +199,7 @@  enum {
 struct pm_module_def {
 	char name[8]; /* Name of the module */
 	short type; /* CM or PRM */
-	short offset;
+	unsigned short offset;
 	int low; /* First register address on this module */
 	int high; /* Last register address on this module */
 };
-- 
1.7.1