linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	devel@driverdev.osuosl.org, linux-iio@vger.kernel.org,
	Jonathan Cameron <jic23@kernel.org>
Subject: Re: [PATCH 3/4] staging:iio: Add missing event code extract macros
Date: Fri, 10 Feb 2012 23:47:40 +0300	[thread overview]
Message-ID: <20120210204740.GA13116@mwanda> (raw)
In-Reply-To: <20120210204531.GI4141@mwanda>

[-- Attachment #1: Type: text/plain, Size: 1428 bytes --]

On Fri, Feb 10, 2012 at 11:45:31PM +0300, Dan Carpenter wrote:
> On Fri, Feb 10, 2012 at 07:15:00PM +0100, Lars-Peter Clausen wrote:
> > Add macros for extracting whether the event is for a differential channel and
> > the second channel number from the event code. These were the only two fields
> > which did not have such an macro yet.
> > 
> > Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> > Acked-by: Jonathan Cameron <jic23@kernel.org>
> > ---
> >  drivers/staging/iio/events.h |    2 ++
> >  1 files changed, 2 insertions(+), 0 deletions(-)
> > 
> > diff --git a/drivers/staging/iio/events.h b/drivers/staging/iio/events.h
> > index 416800e..c25f0e3 100644
> > --- a/drivers/staging/iio/events.h
> > +++ b/drivers/staging/iio/events.h
> > @@ -97,7 +97,9 @@ enum iio_event_direction {
> >  /* Event code number extraction depends on which type of event we have.
> >   * Perhaps review this function in the future*/
> >  #define IIO_EVENT_CODE_EXTRACT_CHAN(mask) ((__s16)(mask & 0xFFFF))
> > +#define IIO_EVENT_CODE_EXTRACT_CHAN2(mask) ((__s16)(((mask) >> 16) & 0xFFFF))
> >  
> >  #define IIO_EVENT_CODE_EXTRACT_MODIFIER(mask) ((mask >> 40) & 0xFF)
> > +#define IIO_EVENT_CODE_EXTRACT_DIFF(mask) (((mask) >> 55) & 0x1)
> >  
> 
> Breaks the build.
> 

Oops.  This isn't a rename.  It doesn't break the build.  Why are
we adding macros which nobody uses?

regards,
dan carpenter


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2012-02-10 20:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-10 18:14 [PATCH 1/4] staging:iio:events: Remove obsolete documentation Lars-Peter Clausen
2012-02-10 18:14 ` [PATCH 2/4] staging:iio: Rename IIO_EVENT_CODE_EXTRACT_NUM to IIO_EVENT_CODE_EXTRACT_CHAN Lars-Peter Clausen
2012-02-10 18:30   ` Greg Kroah-Hartman
2012-02-10 20:44   ` Dan Carpenter
2012-02-10 18:15 ` [PATCH 3/4] staging:iio: Add missing event code extract macros Lars-Peter Clausen
2012-02-10 20:45   ` Dan Carpenter
2012-02-10 20:47     ` Dan Carpenter [this message]
2012-02-11 10:13       ` Lars-Peter Clausen
2012-02-11 18:08         ` Dan Carpenter
2012-02-10 18:15 ` [PATCH 4/4] staging:iio: Add event monitor example application 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=20120210204740.GA13116@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    /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).