From: Dan Carpenter <dan.carpenter@oracle.com>
To: Amir Mahdi Ghorbanian <indigoomega021@gmail.com>
Cc: lars@metafoo.de, devel@driverdev.osuosl.org,
Michael.Hennerich@analog.com, linux-iio@vger.kernel.org,
gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
pmeerw@pmeerw.net, knaack.h@gmx.de, jic23@kernel.org
Subject: Re: [PATCH] Staging: iio: ad7192: replaced bool in struct
Date: Wed, 2 Jan 2019 14:33:46 +0300 [thread overview]
Message-ID: <20190102113346.GM3781@kadam> (raw)
In-Reply-To: <1545434786-15220-1-git-send-email-indigoomega021@gmail.com>
On Fri, Dec 21, 2018 at 03:26:26PM -0800, Amir Mahdi Ghorbanian wrote:
> Replaced bool in struct with unsigned int bitfield to conserve space and
> more clearly define size of varibales
>
> Signed-off-by: Amir Mahdi Ghorbanian <indigoomega021@gmail.com>
> ---
> drivers/staging/iio/adc/ad7192.h | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/staging/iio/adc/ad7192.h b/drivers/staging/iio/adc/ad7192.h
> index 7433a43..7d3e62f 100644
> --- a/drivers/staging/iio/adc/ad7192.h
> +++ b/drivers/staging/iio/adc/ad7192.h
> @@ -35,13 +35,13 @@ struct ad7192_platform_data {
> u16 vref_mv;
> u8 clock_source_sel;
> u32 ext_clk_hz;
> - bool refin2_en;
> - bool rej60_en;
> - bool sinc3_en;
> - bool chop_en;
> - bool buf_en;
> - bool unipolar_en;
> - bool burnout_curr_en;
> + unsigned int refin2_en : 1;
> + unsigned int rej60_en : 1;
> + unsigned int sinc3_en : 1;
> + unsigned int chop_en : 1;
> + unsigned int buf_en : 1;
> + unsigned int unipolar_en : 1;
> + unsigned int burnout_curr_en : 1;
Don't put spaces around the :. Just do:
unsigned int burnout_curr_en:1;
Otherwise it looks like part of a select statement or something.
regards,
dan carpenter
next prev parent reply other threads:[~2019-01-02 11:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-21 23:26 [PATCH] Staging: iio: ad7192: replaced bool in struct Amir Mahdi Ghorbanian
2018-12-22 17:28 ` Jonathan Cameron
2018-12-24 9:58 ` Himanshu Jha
2019-01-02 21:25 ` Matt Ranostay
2019-01-07 17:57 ` Himanshu Jha
2019-01-12 16:59 ` Jonathan Cameron
2019-01-02 11:33 ` Dan Carpenter [this message]
[not found] <CAMW2b-maU7+WrwYnqqr7eUVw+S_MC9_do27ms-or8wWDapbqZA@mail.gmail.com>
2019-01-05 18:22 ` 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=20190102113346.GM3781@kadam \
--to=dan.carpenter@oracle.com \
--cc=Michael.Hennerich@analog.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=indigoomega021@gmail.com \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@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