Re: [PATCH 2/2] mfd: si476x: Do not use binary constants

From: Joe Perches
Date: Mon May 13 2013 - 10:41:14 EST


On Mon, 2013-05-13 at 07:29 -0700, Andrey Smirnov wrote:
> On Wed, May 8, 2013 at 1:23 PM, Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> 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.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/