From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Subject: Re: [PATCH] drm/radeon: fix endian bugs in radeon_atom_get_clock_dividers() Date: Mon, 22 Apr 2013 17:31:05 +0300 Message-ID: <20130422143105.GB26760@mwanda> References: <20130418184709.GA11596@elgon.mountain> <1366639393-10190-1-git-send-email-alexdeucher@gmail.com> <20130422140857.GC8936@mwanda> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from userp1040.oracle.com (userp1040.oracle.com [156.151.31.81]) by gabe.freedesktop.org (Postfix) with ESMTP id 0E07FE66A9 for ; Mon, 22 Apr 2013 07:31:12 -0700 (PDT) Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Alex Deucher Cc: Alex Deucher , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Mon, Apr 22, 2013 at 10:18:09AM -0400, Alex Deucher wrote: > On Mon, Apr 22, 2013 at 10:08 AM, Dan Carpenter > wrote: > > On Mon, Apr 22, 2013 at 10:03:13AM -0400, alexdeucher@gmail.com wrote: > >> From: Alex Deucher > >> > >> Reported-by: Dan Carpenter > >> Signed-off-by: Alex Deucher > >> --- > >> drivers/gpu/drm/radeon/atombios.h | 2 ++ > >> drivers/gpu/drm/radeon/radeon_atombios.c | 6 ++---- > >> 2 files changed, 4 insertions(+), 4 deletions(-) > >> > >> diff --git a/drivers/gpu/drm/radeon/atombios.h b/drivers/gpu/drm/radeon/atombios.h > >> index 4b04ba3..de678dd 100644 > >> --- a/drivers/gpu/drm/radeon/atombios.h > >> +++ b/drivers/gpu/drm/radeon/atombios.h > >> @@ -459,6 +459,7 @@ typedef struct _COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V3 > >> { > >> ATOM_COMPUTE_CLOCK_FREQ ulClock; //Input Parameter > >> ATOM_S_MPLL_FB_DIVIDER ulFbDiv; //Output Parameter > >> + ULONG ulClockFbDiv; > > > > Why is this a long instead of an __le32 or u32? > > atombios.h is shared across OSes and has it's own types. Can ULONG be 64 bit? It's ugly when ULONG, ulong and "unsigned long" are different types. > > > > I'm confused by this patch as well. I assumed the datatypes were > > determined by the hardware spec. > > I'm not sure I follow. The atombios interpretor requires data in > little endian format. I was expecting that the code would stay the same and the annotations would change is all... I haven't tested this so I'm sure it's right, but it just wasn't the change I was expecting. regards, dan carpenter