[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F31EA7D.2010706@am.sony.com>
Date: Tue, 7 Feb 2012 19:22:37 -0800
From: Frank Rowand <frank.rowand@...sony.com>
To: Tim Bird <tim.bird@...sony.com>
CC: Greg KH <gregkh@...e.de>,
linux-embedded <linux-embedded@...r.kernel.org>,
linux kernel <linux-kernel@...r.kernel.org>,
Brian Swetland <swetland@...gle.com>,
Dima Zavin <dima@...roid.com>, Andrew Morton <akpm@...l.org>
Subject: Re: [PATCH 1/5] logger: Change logger_offset() from macro to function
On 02/07/12 18:21, Tim Bird wrote:
> Convert to function and add log as a parameter, rather than relying
> on log in the context of the macro.
>
> Signed-off-by: Tim Bird <tim.bird@...sony.com>
> ---
> drivers/staging/android/logger.c | 16 ++++++++++------
> 1 files changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/android/logger.c b/drivers/staging/android/logger.c
> index ffc2d04..92456d7 100644
> --- a/drivers/staging/android/logger.c
> +++ b/drivers/staging/android/logger.c
> @@ -60,7 +60,11 @@ struct logger_reader {
> };
>
> /* logger_offset - returns index 'n' into the log via (optimized) modulus */
> -#define logger_offset(n) ((n) & (log->size - 1))
> +size_t logger_offset(struct logger_log *log, size_t n)
> +{
> + return n & (log->size-1);
return n & (log->size - 1);
> +}
> +
Reviewed-by: Frank Rowand <frank.rowand@...sony.com>
--
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