mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	linux-kernel@vger.kernel.org,
	Samuel Ortiz <sameo@linux.intel.com>
Subject: Re: [PATCH 2/2] mfd: si476x: Do not use binary constants
Date: Mon, 13 May 2013 07:41:05 -0700	[thread overview]
Message-ID: <1368456065.1913.6.camel@joe-AO722> (raw)
In-Reply-To: <CAHQ1cqFL4WNq5QfdCk3jWmr0ATEukdrxG0qArn5Zwkj_ZVOxvA@mail.gmail.com>

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.



  reply	other threads:[~2013-05-13 14:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-08 20:23 [PATCH 1/2] [media] v4l2: SI476X MFD - " Geert Uytterhoeven
2013-05-08 20:23 ` [PATCH 2/2] mfd: si476x: " Geert Uytterhoeven
2013-05-13 14:29   ` Andrey Smirnov
2013-05-13 14:41     ` Joe Perches [this message]
2013-05-16 22:16   ` Samuel Ortiz
2013-05-13 14:29 ` [PATCH 1/2] [media] v4l2: SI476X MFD - " Andrey Smirnov

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=1368456065.1913.6.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=andrew.smirnov@gmail.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sameo@linux.intel.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

all inboxes | Powered by JetHome®