From: Greg KH <gregkh@linuxfoundation.org>
To: Haneen Mohammed <hamohammed.sa@gmail.com>
Cc: outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH 2/2] Staging: iio: use the BIT macro in adc
Date: Mon, 23 Mar 2015 22:25:03 +0100 [thread overview]
Message-ID: <20150323212503.GA17603@kroah.com> (raw)
In-Reply-To: <1427048894-7159-1-git-send-email-hamohammed.sa@gmail.com>
On Sun, Mar 22, 2015 at 09:28:14PM +0300, Haneen Mohammed wrote:
> This patch replace bit shifting on 0,1,2, and 3 with the BIT(x) macro.
> Issue addressed by checkpatcg.pl.
>
> This was done with the help of Coccinelle:
>
> @r1@
> constant int g;
> @@
>
> (
> 0<<g
> |
> 1<<g
> |
> 2<<g
> |
> 3<<g
> )
>
> @script:python b@
> g2 <<r1.g;
> y;
> @@
>
> coccinelle.y = int(g2) + 1
>
> @c@
> constant int r1.g;
> identifier b.y;
> @@
>
> (
> -(1 << g)
> +BIT(g)
> |
> -(0 << g)
> + 0
> |
> -(2 << g)
> +BIT(y)
> |
> -(3 << g)
> +(BIT(y)| BIT(g))
> )
>
> Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
> ---
> drivers/staging/iio/adc/ad7192.c | 64 ++++++++++++++++++------------------
> drivers/staging/iio/adc/ad7280a.c | 58 ++++++++++++++++-----------------
> drivers/staging/iio/adc/ad7780.c | 18 +++++-----
> drivers/staging/iio/adc/ad7816.c | 2 +-
> drivers/staging/iio/adc/mxs-lradc.c | 65 +++++++++++++++++++------------------
> drivers/staging/iio/adc/spear_adc.c | 6 ++--
> 6 files changed, 107 insertions(+), 106 deletions(-)
This patch causes a bunch of compiler warnings to suddenly show up. I
know it's not directly your fault, but I can't take this patch because
of it. Feel free to break up your patch to not include the offending
file (hint, I'm not going to tell you because you should have caught
this yourself), or send a patch series that includes this one and then
fixes up those warnings.
thanks,
greg k-h
next prev parent reply other threads:[~2015-03-23 23:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-22 18:17 [PATCH 0/2] Staging: iio: use the BIT macro in .h and adc Haneen Mohammed
2015-03-22 18:23 ` [PATCH 1/2] Staging: iio: use the BIT macro in .h files Haneen Mohammed
2015-03-22 18:28 ` [PATCH 2/2] Staging: iio: use the BIT macro in adc Haneen Mohammed
2015-03-23 21:25 ` Greg KH [this message]
2015-03-24 15:34 ` [PATCH v2] " Haneen Mohammed
2015-03-25 11:15 ` [Outreachy kernel] " Greg KH
2015-03-25 23:23 ` [PATCH v3] " Haneen Mohammed
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=20150323212503.GA17603@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=hamohammed.sa@gmail.com \
--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.