[PATCH] staging: rts5208: add parethesis to macros

Daniel Baluta daniel.baluta at gmail.com
Mon Sep 22 22:15:45 EEST 2014


On Mon, Sep 22, 2014 at 7:36 PM, Roxana Blaj <roxanagabriela10 at gmail.com> wrote:
> This fixes the error:
> ERROR: Macros with complex values should be enclosed in parenthesis
>
> Signed-off-by: Roxana Blaj <roxanagabriela10 at gmail.com>
> ---
>  drivers/staging/rts5208/trace.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/rts5208/trace.h b/drivers/staging/rts5208/trace.h
> index a9ab407..cc92b10 100644
> --- a/drivers/staging/rts5208/trace.h
> +++ b/drivers/staging/rts5208/trace.h
> @@ -80,8 +80,8 @@ static inline char *filename(char *path)
>                 goto label;                                             \
>         } while (0)
>  #else
> -#define TRACE_RET(chip, ret)   return ret
> -#define TRACE_GOTO(chip, label)        goto label
> +#define TRACE_RET(chip, ret)   { return ret }
> +#define TRACE_GOTO(chip, label) { goto label }
>  #endif

You should do something like this:

-#define TRACE_RET(chip, ret)   return ret
+#define TRACE_RET(chip, ret)                                           \
+       do {
+               return ret;
+       } while (0)
 #define TRACE_GOTO(chip,

thanks,
Daniel.


More information about the firefly mailing list