From: Lars-Peter Clausen <lars@metafoo.de>
To: Shubhrajyoti Datta <omaplinuxkernel@gmail.com>
Cc: Jonathan Cameron <jic23@cam.ac.uk>,
Michael Hennerich <michael.hennerich@analog.com>,
linux-iio@vger.kernel.org,
device-drivers-devel@blackfin.uclinux.org, drivers@analog.com
Subject: Re: [PATCH] staging:iio:dac: Add AD5764 driver
Date: Mon, 21 Nov 2011 11:46:43 +0100 [thread overview]
Message-ID: <4ECA2C13.6080901@metafoo.de> (raw)
In-Reply-To: <CAM=Q2cv2kbpLxtgmJ=zSGRnmd6MyxuqRb3ErMjKmLbUitm4+bg@mail.gmail.com>
On 11/21/2011 10:04 AM, Shubhrajyoti Datta wrote:
>> +static int ad5764_chan_info_to_reg(struct iio_chan_spec const *chan, long info)
>> +{
>> + switch (info) {
>> + case 0:
>> + return AD5764_REG_DATA(chan->address);
>> + case IIO_CHAN_INFO_CALIBBIAS:
>> + return AD5764_REG_OFFSET(chan->address);
>> + case IIO_CHAN_INFO_CALIBSCALE:
>> + return AD5764_REG_FINE_GAIN(chan->address);
>> + default:
>> + BUG();
> Should we BUG here?
> Is it that severe because it will halt the whole system?
given that this should only trigger if something went wrong really bad I
think it is OK to BUG here. As far as I can see the compiler will even
remove it, since it is in a dead code path.
- Lars
next prev parent reply other threads:[~2011-11-21 10:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-21 8:53 [PATCH] staging:iio:dac: Add AD5764 driver Lars-Peter Clausen
2011-11-21 9:04 ` Shubhrajyoti Datta
2011-11-21 10:46 ` Lars-Peter Clausen [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-12-05 16:05 Lars-Peter Clausen
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=4ECA2C13.6080901@metafoo.de \
--to=lars@metafoo.de \
--cc=device-drivers-devel@blackfin.uclinux.org \
--cc=drivers@analog.com \
--cc=jic23@cam.ac.uk \
--cc=linux-iio@vger.kernel.org \
--cc=michael.hennerich@analog.com \
--cc=omaplinuxkernel@gmail.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 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.