From: Cristina Opriceana <cristina.opriceana@gmail.com>
To: Daniel Baluta <daniel.baluta@gmail.com>
Cc: Julia Lawall <julia.lawall@lip6.fr>, outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH 3/6] Staging: iio: Prefer using the BIT macro
Date: Sat, 14 Mar 2015 14:40:48 +0200 [thread overview]
Message-ID: <1426336848.6446.10.camel@Inspiron> (raw)
In-Reply-To: <CAEnQRZCbvjZCnrz8e+rt20ZjfUczZ2SewzArbm=L2NqcN7puZg@mail.gmail.com>
> e.g:
>
> 2 << 14 = BIT(15) | BIT(14)
> 7 << 13 = BIT(15) | BIT(14) | BIT(13)
>
> You could also search for the datasheet to see the correct bit
> definitions.
>
That's a very nice idea, thank you!
> >> /* Command Control Bits */
> >>
> >> -#define AD9834_B28 (1 << 13)
> >> -#define AD9834_HLB (1 << 12)
> >> -#define AD9834_FSEL (1 << 11)
> >> -#define AD9834_PSEL (1 << 10)
> >> -#define AD9834_PIN_SW (1 << 9)
> >> -#define AD9834_RESET (1 << 8)
> >> -#define AD9834_SLEEP1 (1 << 7)
> >> -#define AD9834_SLEEP12 (1 << 6)
> >> -#define AD9834_OPBITEN (1 << 5)
> >> -#define AD9834_SIGN_PIB (1 << 4)
> >> -#define AD9834_DIV2 (1 << 3)
> >> -#define AD9834_MODE (1 << 1)
> >> +#define AD9834_B28 BIT(13)
> >> +#define AD9834_HLB BIT(12)
> >> +#define AD9834_FSEL BIT(11)
> >> +#define AD9834_PSEL BIT(10)
> >> +#define AD9834_PIN_SW BIT(9)
> >
> > You could clean up the indentation at the same time.
> >
> > julia
I did check the indentation, cause it seemed to be inappropriate for me
too, but they are aligned in my sources. I don't know why git diff
messes with the indentation so badly. I thought it might be the
mix of tabs and spaces, but this is not the case, since they are aligned
at 2 tabs.
I'll try to modify them by hand, without the script, to see if this
problem still persists.
Thanks,
Cristina
next prev parent reply other threads:[~2015-03-14 12:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-14 1:33 [PATCH 0/6] Staging: iio/frequency: Fix style issues Cristina Opriceana
2015-03-14 1:35 ` [PATCH 1/6] Staging: iio: Remove space after type cast Cristina Opriceana
2015-03-14 1:36 ` [PATCH 2/6] Staging: iio: Remove explicit comparison to NULL Cristina Opriceana
2015-03-14 1:37 ` [PATCH 3/6] Staging: iio: Prefer using the BIT macro Cristina Opriceana
2015-03-14 6:36 ` [Outreachy kernel] " Julia Lawall
2015-03-14 7:41 ` Daniel Baluta
2015-03-14 12:40 ` Cristina Opriceana [this message]
2015-03-14 1:38 ` [PATCH 4/6] Staging: iio: Do not use multiple blank lines Cristina Opriceana
2015-03-14 1:39 ` [PATCH 5/6] Staging: iio: Alignment should match open parenthesis Cristina Opriceana
2015-03-14 6:34 ` [Outreachy kernel] " Julia Lawall
2015-03-14 7:50 ` Daniel Baluta
2015-03-14 12:58 ` Cristina Opriceana
2015-03-14 14:17 ` Julia Lawall
2015-03-14 1:40 ` [PATCH 6/6] Staging: iio: Use braces on all arms of if statement Cristina Opriceana
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=1426336848.6446.10.camel@Inspiron \
--to=cristina.opriceana@gmail.com \
--cc=daniel.baluta@gmail.com \
--cc=julia.lawall@lip6.fr \
--cc=outreachy-kernel@googlegroups.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.