lkml.org 
[lkml]   [2014]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] staging: vt6655: correct coding style issue
On Sun, May 04, 2014 at 09:52:09PM +0200, Clément Calmels wrote:
> Remove C99 comment and rewrite lines over 80 characters.
> Warnings and error found by checkpatch.pl script.
>
> Signed-off-by: Clément Calmels <clement.calmels@free.fr>
> ---
> drivers/staging/vt6655/tmacro.h | 13 +++++++++----
> 1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/vt6655/tmacro.h b/drivers/staging/vt6655/tmacro.h
> index 59c6e72..264c6ed 100644
> --- a/drivers/staging/vt6655/tmacro.h
> +++ b/drivers/staging/vt6655/tmacro.h
> @@ -44,17 +44,22 @@
> #define LOWORD(d) ((unsigned short)(d))
> #endif
> #if !defined(HIWORD)
> -#define HIWORD(d) ((unsigned short)((((unsigned long)(d)) >> 16) & 0xFFFF))
> +#define HIWORD(d) \
> + ((unsigned short)((((unsigned long)(d)) >> 16) & 0xFFFF))
> #endif
>
> #define LODWORD(q) ((q).u.dwLowDword)
> #define HIDWORD(q) ((q).u.dwHighDword)
>
> #if !defined(MAKEWORD)
> -#define MAKEWORD(lb, hb) ((unsigned short)(((unsigned char)(lb)) | (((unsigned short)((unsigned char)(hb))) << 8)))
> +#define MAKEWORD(lb, hb)\
> + ((unsigned short)(((unsigned char)(lb)) \
> + | (((unsigned short)((unsigned char)(hb))) << 8)))
> #endif
> #if !defined(MAKEDWORD)
> -#define MAKEDWORD(lw, hw) ((unsigned long)(((unsigned short)(lw)) | (((unsigned long)((unsigned short)(hw))) << 16)))
> +#define MAKEDWORD(lw, hw)\
> + ((unsigned long)(((unsigned short)(lw)) \
> + | (((unsigned long)((unsigned short)(hw))) << 16)))
> #endif
>
> -#endif // __TMACRO_H__
> +#endif /* __TMACRO_H__ */

Why not just switch to use the built-in macros the kernel provides for
this?

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2014-05-04 23:41    [W:0.045 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site