lkml.org 
[lkml]   [2013]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/2] mfd: si476x: Do not use binary constants
From
Date
On Mon, 2013-05-13 at 07:29 -0700, Andrey Smirnov wrote:
> On Wed, May 8, 2013 at 1:23 PM, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > Gcc < 4.3 doesn't understand binary constanrs (0b*):
[]
> > Hence use hexadecimal constants (0x*) instead.
[]
> I really begin to regret my decision to use those constants in place
> instead of defining a corresponding symbol in a header file. Because
> now that those binary constants are replaced the code looks a little
> bit more cryptic. Currently I am doing some additional work on the
> driver(adding the support of a different chip) and I'll try to make
> patches to address the issue.
[]
> > diff --git a/drivers/mfd/si476x-cmd.c b/drivers/mfd/si476x-cmd.c
[]
> > @@ -772,16 +772,16 @@ int si476x_core_cmd_am_rsq_status(struct si476x_core *core,
[]
> > + report->snrhint = 0x08 & resp[1];
> > + report->snrlint = 0x04 & resp[1];
> > + report->rssihint = 0x02 & resp[1];
> > + report->rssilint = 0x01 & resp[1];

You might also want to change all the
u8 report variables to bool.




\
 
 \ /
  Last update: 2013-05-13 17:21    [W:0.963 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site