From: Jonathan Cameron <jic23@kernel.org>
To: Peter Meerwald <pmeerw@pmeerw.net>,
Dan Carpenter <dan.carpenter@oracle.com>
Cc: linux-iio@vger.kernel.org
Subject: Re: iio:magnetometer:mag3110: Scale factor missing for temperature
Date: Tue, 25 Feb 2014 20:49:55 +0000 [thread overview]
Message-ID: <530D01F3.1020209@kernel.org> (raw)
In-Reply-To: <alpine.DEB.2.01.1402252053550.30927@pmeerw.net>
On 25/02/14 20:00, Peter Meerwald wrote:
>
>> 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 ].
>
> this is indeed weird
Quite. The interesting question is how did the date format get messed up.
>
>> 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?
>
> no, this is dead code as the checker indicated
>
> thanks for reporting, sent fix to linux-iio
>
> p.
>
prev parent reply other threads:[~2014-02-25 20:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-24 22:04 iio:magnetometer:mag3110: Scale factor missing for temperature Dan Carpenter
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 [this message]
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=530D01F3.1020209@kernel.org \
--to=jic23@kernel.org \
--cc=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 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).