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@xxxxxxxxxxx> > --- > 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@xxxxxxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe linux-embedded" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html