public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Barada <peter.barada@gmail.com>
To: Kevin Hilman <khilman@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: Re: Module + offset calculations have to be signed in arch/arm/mach-omap2/pm-debug.c
Date: Fri, 06 May 2011 11:25:33 -0400	[thread overview]
Message-ID: <4DC412ED.1070805@gmail.com> (raw)
In-Reply-To: <87oc3hf1wk.fsf@ti.com>

[-- Attachment #1: Type: text/plain, Size: 489 bytes --]

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.

-- 
Peter Barada
peter.barada@gmail.com


[-- Attachment #2: pm-debug-signed-offset.patch --]
[-- Type: text/x-patch, Size: 911 bytes --]

>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


  parent reply	other threads:[~2011-05-06 15:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-05 16:22 Module + offset calculations have to be signed in arch/arm/mach-omap2/pm-debug.c Peter Barada
2011-05-05 17:11 ` Kevin Hilman
2011-05-05 17:18   ` Peter Barada
2011-05-05 18:16     ` Kevin Hilman
2011-05-05 19:30       ` Peter Barada
2011-05-05 20:11         ` Kevin Hilman
2011-05-06 15:25       ` Peter Barada [this message]
2011-05-06 19:55         ` Kevin Hilman

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=4DC412ED.1070805@gmail.com \
    --to=peter.barada@gmail.com \
    --cc=khilman@ti.com \
    --cc=linux-omap@vger.kernel.org \
    /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