linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: michael.hennerich@analog.com
Cc: linux-iio@vger.kernel.org
Subject: re: iio: frequency: New driver for AD9523 SPI Low Jitter Clock Generator
Date: Thu, 7 Jun 2012 15:12:07 +0300	[thread overview]
Message-ID: <20120607121207.GA4784@elgon.mountain> (raw)

Hello Michael Hennerich,

The patch cd1678f96329: "iio: frequency: New driver for AD9523 SPI
Low Jitter Clock Generator" from May 29, 2012, leads to the following
warning:

drivers/iio/frequency/ad9523.c:378 ad9523_vco_out_map()
	 warn: value 2 can't fit into 1 'out'


   363  static int ad9523_vco_out_map(struct iio_dev *indio_dev,
   364                                unsigned ch, bool out)
                                                   ^^^^^^^^
Bool.

   365  {
   366          struct ad9523_state *st = iio_priv(indio_dev);
   367          int ret;
   368          unsigned mask;
   369  
   370          switch (ch) {
   371          case 0 ... 3:
   372                  ret = ad9523_read(indio_dev, AD9523_PLL1_OUTPUT_CHANNEL_CTRL);
   373                  if (ret < 0)
   374                          break;
   375                  mask = AD9523_PLL1_OUTP_CH_CTRL_VCXO_SRC_SEL_CH0 << ch;
   376                  if (out) {
   377                          ret |= mask;
   378                          out = 2;
                                ^^^^^^^
Should be either true or false.  Two implies FileNotFound.
http://thedailywtf.com/Articles/What_Is_Truth_0x3f_.aspx

   379                  } else {
   380                          ret &= ~mask;
   381                  }

regards,
dan carpenter


             reply	other threads:[~2012-06-07 12:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-07 12:12 Dan Carpenter [this message]
2012-06-08  7:25 ` iio: frequency: New driver for AD9523 SPI Low Jitter Clock Generator Michael Hennerich

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=20120607121207.GA4784@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=michael.hennerich@analog.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;
as well as URLs for NNTP newsgroup(s).