[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090215133512.GA32621@uranus.ravnborg.org>
Date: Sun, 15 Feb 2009 14:35:12 +0100
From: Sam Ravnborg <sam@...nborg.org>
To: Borislav Petkov <petkovbb@...glemail.com>
Cc: bzolnier@...il.com, linux-ide@...r.kernel.org,
linux-kernel@...r.kernel.org, Borislav Petkov <petkovbb@...il.com>
Subject: Re: [PATCH 01/10] ide: add flags query macros
On Sun, Feb 15, 2009 at 01:08:03PM +0100, Borislav Petkov wrote:
> There should be no functionality change resulting from this patch.
>
> Signed-off-by: Borislav Petkov <petkovbb@...il.com>
> ---
> include/linux/ide.h | 166 +++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 files changed, 166 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/ide.h b/include/linux/ide.h
> index c75631c..f133062 100644
> --- a/include/linux/ide.h
> +++ b/include/linux/ide.h
> @@ -497,6 +497,82 @@ enum {
> IDE_AFLAG_NO_AUTOCLOSE = (1 << 24),
> };
>
> +#define ide_drv_drq_int(drive) \
> + ((drive)->atapi_flags & IDE_AFLAG_DRQ_INTERRUPT)
Why not use a static inline here so we get proper typecheck.
And then convert the return result to a bool (0/1) so you
do not have to do this at the call site.
I counted at least three places in ide-cd that does a local
transformation to a bool and I saw nowhere the actual bit value
was used.
Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists