* [PATCH] staging: vt6655: correct coding style issue
@ 2014-05-04 19:52 Clément Calmels
2014-05-04 21:26 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Clément Calmels @ 2014-05-04 19:52 UTC (permalink / raw)
To: devel, linux-kernel
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__ */
--
2.0.0.rc0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: vt6655: correct coding style issue
2014-05-04 19:52 [PATCH] staging: vt6655: correct coding style issue Clément Calmels
@ 2014-05-04 21:26 ` Greg KH
2014-05-05 19:16 ` Clément Calmels
0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2014-05-04 21:26 UTC (permalink / raw)
To: Clément Calmels; +Cc: devel, linux-kernel
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: vt6655: correct coding style issue
2014-05-04 21:26 ` Greg KH
@ 2014-05-05 19:16 ` Clément Calmels
2014-05-05 21:10 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Clément Calmels @ 2014-05-05 19:16 UTC (permalink / raw)
To: Greg KH; +Cc: devel, linux-kernel
On Sun, 4 May 2014 17:26:58 -0400
Greg KH <greg@kroah.com> wrote:
> 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
Are you talking about changing types (unsigned char => u8) as used
there:
http://lxr.free-electrons.com/source/sound/isa/msnd/msnd.h#L182 or
there:
http://lxr.free-electrons.com/source/include/acpi/actypes.h#L481 ?
C.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: vt6655: correct coding style issue
2014-05-05 19:16 ` Clément Calmels
@ 2014-05-05 21:10 ` Greg KH
0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2014-05-05 21:10 UTC (permalink / raw)
To: Clément Calmels; +Cc: devel, linux-kernel
On Mon, May 05, 2014 at 09:16:03PM +0200, Clément Calmels wrote:
> On Sun, 4 May 2014 17:26:58 -0400
> Greg KH <greg@kroah.com> wrote:
>
> > 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
>
> Are you talking about changing types (unsigned char => u8) as used
> there:
> http://lxr.free-electrons.com/source/sound/isa/msnd/msnd.h#L182 or
> there:
> http://lxr.free-electrons.com/source/include/acpi/actypes.h#L481 ?
No, how about get_unaligned_le16() and put_unaligned_le16()? Don't
those do what you want here?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-05-05 21:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-04 19:52 [PATCH] staging: vt6655: correct coding style issue Clément Calmels
2014-05-04 21:26 ` Greg KH
2014-05-05 19:16 ` Clément Calmels
2014-05-05 21:10 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).