All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: pmeerw@pmeerw.net
Cc: linux-iio@vger.kernel.org
Subject: re: iio:magnetometer:mag3110: Scale factor missing for temperature
Date: Tue, 25 Feb 2014 01:04:19 +0300	[thread overview]
Message-ID: <20140224220419.GC29170@elgon.mountain> (raw)

Hello Peter Meerwald,

The patch f9279d3a8cc8: "iio:magnetometer:mag3110: Scale factor
missing for temperature" from Oct 1, 2014, leads to the following
                              ^^^^^^^^^^^
[ just the other day people were searching the internet for time
  travellers from the future ].

static checker warning:

	drivers/iio/magnetometer/mag3110.c:197 mag3110_read_raw()
	info: ignoring unreachable code.

drivers/iio/magnetometer/mag3110.c
   185          case IIO_CHAN_INFO_SCALE:
   186                  switch (chan->type) {
   187                  case IIO_MAGN:
   188                          *val = 0;
   189                          *val2 = 1000;
   190                          return IIO_VAL_INT_PLUS_MICRO;
   191                  case IIO_TEMP:
   192                          *val = 1000;
   193                          return IIO_VAL_INT;
   194                  default:
   195                          return -EINVAL;
   196                  }
   197                  return IIO_VAL_INT_PLUS_MICRO;
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Was -EINVAL intended here?

regards,
dan carpenter

             reply	other threads:[~2014-02-24 22:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-24 22:04 Dan Carpenter [this message]
2014-02-25 19:53 ` [PATCH] iio:magnetometer:mag3110: Fix unreachable code Peter Meerwald
2014-02-25 20:50   ` Jonathan Cameron
2014-02-25 20:00 ` iio:magnetometer:mag3110: Scale factor missing for temperature Peter Meerwald
2014-02-25 20:49   ` Jonathan Cameron

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=20140224220419.GC29170@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.