public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@ti.com>
To: Peter Barada <peter.barada@gmail.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 12:55:43 -0700	[thread overview]
Message-ID: <87mxiz7ge8.fsf@ti.com> (raw)
In-Reply-To: <4DC412ED.1070805@gmail.com> (Peter Barada's message of "Fri, 06 May 2011 11:25:33 -0400")

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


      reply	other threads:[~2011-05-06 19:55 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
2011-05-06 19:55         ` Kevin Hilman [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=87mxiz7ge8.fsf@ti.com \
    --to=khilman@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=peter.barada@gmail.com \
    /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