From patchwork Fri May 6 15:25:33 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Barada X-Patchwork-Id: 762342 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p46FPT68021207 for ; Fri, 6 May 2011 15:25:29 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755473Ab1EFPZ1 (ORCPT ); Fri, 6 May 2011 11:25:27 -0400 Received: from mail-gy0-f174.google.com ([209.85.160.174]:37827 "EHLO mail-gy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755439Ab1EFPZ1 (ORCPT ); Fri, 6 May 2011 11:25:27 -0400 Received: by gyd10 with SMTP id 10so1199965gyd.19 for ; Fri, 06 May 2011 08:25:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type; bh=p/bLzlAB9CaQYmIbxFBik5SvaNyvuCkNknyiZSTbbR4=; b=jVHZYoHaVXjEnAf5oNubQ+MRlKKFyWetlzVEkukqWidBZToUHf4e4lIPaUYY0cjA/O QF1R7IIXrKU7CvoAfeNG50+cjSPlhtPH9RFsSF9221Jx2CY/ymb4TqnnxJc5uS5K7AQr Yqa1ffVx2IGOKl47UuDI41iLXnCPxAPjHZMN0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; b=myNDWB/rB5Dc+g6idUeZt26BWLye59kwGMbTyPPW64TWpYMd6uUK8OTQHlkaHm+82d s1YRQme6QdBvdqoEqNeP5YQxskG8t8n+e1GLafFxjTxPcJsCRpvKnWTgYA/O1deZbzpl yP2QAT257ppxkiWpmBgmq8SSjvoDSrHo9EHoM= Received: by 10.150.250.2 with SMTP id x2mr3398622ybh.230.1304695526750; Fri, 06 May 2011 08:25:26 -0700 (PDT) Received: from [10.1.249.8] (mail.the-baradas.com [96.237.191.3]) by mx.google.com with ESMTPS id t16sm808394anm.42.2011.05.06.08.25.25 (version=SSLv3 cipher=OTHER); Fri, 06 May 2011 08:25:26 -0700 (PDT) Message-ID: <4DC412ED.1070805@gmail.com> Date: Fri, 06 May 2011 11:25:33 -0400 From: Peter Barada User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 MIME-Version: 1.0 To: Kevin Hilman CC: "linux-omap@vger.kernel.org" Subject: Re: Module + offset calculations have to be signed in arch/arm/mach-omap2/pm-debug.c References: <4DC2CED3.80206@gmail.com> <87liyljcnd.fsf@ti.com> <4DC2DC03.4020200@gmail.com> <87oc3hf1wk.fsf@ti.com> In-Reply-To: <87oc3hf1wk.fsf@ti.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 06 May 2011 15:25:29 +0000 (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. From 6857bb52af1fcd90e64d3e6c45de3ff0f071be7a Mon Sep 17 00:00:00 2001 From: Peter Barada 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