From: Jonathan Cameron <jic23@kernel.org>
To: Hartmut Knaack <knaack.h@gmx.de>, linux-iio@vger.kernel.org
Cc: Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald <pmeerw@pmeerw.net>,
Tiberiu Breana <tiberiu.a.breana@intel.com>
Subject: Re: [PATCH v2 5/7] iio:accel:stk8312: use appropriate variable types
Date: Sat, 8 Aug 2015 12:23:14 +0100 [thread overview]
Message-ID: <55C5E6A2.7070509@kernel.org> (raw)
In-Reply-To: <edc03b2d6ca2a5ffe767192a02f5cdd2ca021b34.1438204273.git.knaack.h@gmx.de>
On 29/07/15 22:39, Hartmut Knaack wrote:
> Adapt some variable types to reduce unnecessary casting.
>
> Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
> Reviewed-by: Tiberiu Breana <tiberiu.a.breana@intel.com>
Applied.
> ---
> drivers/iio/accel/stk8312.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/iio/accel/stk8312.c b/drivers/iio/accel/stk8312.c
> index 8807927d4d0b..8b9b3815aac2 100644
> --- a/drivers/iio/accel/stk8312.c
> +++ b/drivers/iio/accel/stk8312.c
> @@ -69,8 +69,8 @@ static const int stk8312_scale_table[][2] = {
> };
>
> static const struct {
> - u16 val;
> - u32 val2;
> + int val;
> + int val2;
> } stk8312_samp_freq_table[] = {
> {400, 0}, {200, 0}, {100, 0}, {50, 0}, {25, 0},
> {12, 500000}, {6, 250000}, {3, 125000}
> @@ -103,7 +103,7 @@ static const struct iio_chan_spec stk8312_channels[] = {
> struct stk8312_data {
> struct i2c_client *client;
> struct mutex lock;
> - int range;
> + u8 range;
> u8 sample_rate_idx;
> u8 mode;
> struct iio_trigger *dready_trig;
> @@ -243,7 +243,7 @@ static const struct iio_trigger_ops stk8312_trigger_ops = {
> .owner = THIS_MODULE,
> };
>
> -static int stk8312_set_sample_rate(struct stk8312_data *data, int rate)
> +static int stk8312_set_sample_rate(struct stk8312_data *data, u8 rate)
> {
> int ret;
> u8 masked_reg;
>
next prev parent reply other threads:[~2015-08-08 11:23 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-29 21:39 [PATCH v2 0/7] stk8312 fixes and cleanup Hartmut Knaack
2015-07-29 21:39 ` [PATCH v2 1/7] iio:accel:stk8312: add triggered buffer dependency Hartmut Knaack
2015-07-29 21:39 ` [PATCH v2 2/7] iio:accel:stk8312: check for invalid value Hartmut Knaack
2015-07-30 7:09 ` Crt Mori
2015-07-31 22:54 ` Hartmut Knaack
2015-08-01 7:35 ` Crt Mori
2015-08-06 22:23 ` Hartmut Knaack
2015-08-08 11:18 ` Jonathan Cameron
2015-08-10 9:24 ` Breana, Tiberiu A
2015-08-11 18:32 ` Hartmut Knaack
2015-07-29 21:39 ` [PATCH v2 3/7] iio:accel:stk8312: improve error handling Hartmut Knaack
2015-07-30 7:04 ` Crt Mori
2015-07-30 9:07 ` Breana, Tiberiu A
2015-07-30 9:39 ` Crt Mori
2015-07-31 23:45 ` Hartmut Knaack
2015-08-01 7:40 ` Crt Mori
2015-08-03 8:05 ` Breana, Tiberiu A
2015-08-08 11:21 ` Jonathan Cameron
2015-07-29 21:39 ` [PATCH v2 4/7] iio:accel:stk8312: rework macro definitions Hartmut Knaack
2015-08-08 11:22 ` Jonathan Cameron
2015-07-29 21:39 ` [PATCH v2 5/7] iio:accel:stk8312: use appropriate variable types Hartmut Knaack
2015-08-08 11:23 ` Jonathan Cameron [this message]
2015-07-29 21:39 ` [PATCH v2 6/7] iio:accel:stk8312: code style cleanup Hartmut Knaack
2015-08-08 11:24 ` Jonathan Cameron
2015-07-29 21:39 ` [PATCH v2 7/7] iio:accel:stk8312: drop local buffer Hartmut Knaack
2015-08-08 11:25 ` 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=55C5E6A2.7070509@kernel.org \
--to=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
--cc=tiberiu.a.breana@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;
as well as URLs for NNTP newsgroup(s).