lkml.org 
[lkml]   [2012]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Staging: panel: Fixed a macro coding style issue
From
Date
On Thu, 2012-09-20 at 01:07 +0530, Adil Mujeeb wrote:
> Removed do {} while (0) loop for a single statement macros
>
> Signed-off-by: Adil Mujeeb <mujeeb.adil@gmail.com>
> ---
> linux-3.6-rc6/drivers/staging/panel/panel.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/linux-3.6-rc6/drivers/staging/panel/panel.c b/linux-3.6-rc6/drivers/staging/panel/panel.c
> index 39f9982..d9fec5b 100644
> --- a/linux-3.6-rc6/drivers/staging/panel/panel.c
> +++ b/linux-3.6-rc6/drivers/staging/panel/panel.c
> @@ -137,8 +137,8 @@
> #define r_ctr(x) (parport_read_control((x)->port))
> #define r_dtr(x) (parport_read_data((x)->port))
> #define r_str(x) (parport_read_status((x)->port))
> -#define w_ctr(x, y) do { parport_write_control((x)->port, (y)); } while (0)
> -#define w_dtr(x, y) do { parport_write_data((x)->port, (y)); } while (0)
> +#define w_ctr(x, y) (parport_write_control((x)->port, (y)))
> +#define w_dtr(x, y) (parport_write_data((x)->port, (y)))

Unnecessary parentheses too.
It might be better to use static inlines instead.




\
 
 \ /
  Last update: 2012-09-19 22:21    [W:0.043 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site