[PATCH] staging: csr: Fix coding style

2012-10-25 Thread SeongJae Park
Fix coding style for csr_log.h

Signed-off-by: SeongJae Park 
---
 drivers/staging/csr/csr_log.h |  165 -
 1 file changed, 80 insertions(+), 85 deletions(-)

diff --git a/drivers/staging/csr/csr_log.h b/drivers/staging/csr/csr_log.h
index b280856..26657a5 100644
--- a/drivers/staging/csr/csr_log.h
+++ b/drivers/staging/csr/csr_log.h
@@ -2,11 +2,11 @@
 #define CSR_LOG_H__
 /*
 
-(c) Cambridge Silicon Radio Limited 2010
-All rights reserved and confidential information of CSR
+   (c) Cambridge Silicon Radio Limited 2010
+   All rights reserved and confidential information of CSR
 
-Refer to LICENSE.txt included with this source for details
-on the license terms.
+   Refer to LICENSE.txt included with this source for details
+   on the license terms.
 
 */
 
@@ -77,34 +77,31 @@ u8 CsrLogTaskIsFiltered(CsrSchedQid taskId, CsrLogLevelTask 
level);
 /*
  * Logging stuff
  */
-#define CSR_LOG_STRINGIFY_REAL(a) #a
+#define CSR_LOG_STRINGIFY_REAL(a) (#a)
 #define CSR_LOG_STRINGIFY(a) CSR_LOG_STRINGIFY_REAL(a)
 
 #ifdef CSR_LOG_ASSERT_ENABLE
-#define CSR_LOG_ASSERT(cond)\
-do {\
-if (!(cond))\
-{   \
-char *panic_arg = "[" __FILE__ ":" CSR_LOG_STRINGIFY(__LINE__) "] 
- " CSR_LOG_STRINGIFY(cond); \
-CsrPanic(CSR_TECH_FW, CSR_PANIC_FW_ASSERTION_FAIL, panic_arg); \
-}   \
-} while (0)
+#define CSR_LOG_ASSERT(cond) \
+   do { \
+   if (!(cond)) { \
+   char *panic_arg = "[" __FILE__ ":" 
CSR_LOG_STRINGIFY(__LINE__) "] - " CSR_LOG_STRINGIFY(cond); \
+   CsrPanic(CSR_TECH_FW, CSR_PANIC_FW_ASSERTION_FAIL, 
panic_arg); \
+   } \
+   } while (0)
 #else
 #define CSR_LOG_ASSERT(cond)
 #endif
 
-typedef struct
-{
-u16primitiveType;
-const char *primitiveName;
-CsrMsgConvMsgEntry  *messageConv; /* Private - do not use */
+typedef struct {
+   u16primitiveType;
+   const char *primitiveName;
+   CsrMsgConvMsgEntry  *messageConv; /* Private - do not use */
 } CsrLogPrimitiveInformation;
 
-typedef struct
-{
-const char*techVer;
-u32   primitiveInfoCount;
-CsrLogPrimitiveInformation *primitiveInfo;
+typedef struct {
+   const char*techVer;
+   u32   primitiveInfoCount;
+   CsrLogPrimitiveInformation *primitiveInfo;
 } CsrLogTechInformation;
 
 /*-*/
@@ -118,21 +115,19 @@ typedef u32 bitmask32_t;
 #ifdef CSR_LOG_INCLUDE_FILE_NAME_AND_LINE_NUMBER
 /* DEPRECATED - replaced by csr_log_text.h */
 #define CSR_LOG_TEXT(text) \
-do { \
-if (!CsrLogTaskIsFiltered(CsrSchedTaskQueueGet(), 
CSR_LOG_LEVEL_TASK_TEXT)) \
-{ \
-CsrLogTaskText(text, __LINE__, __FILE__); \
-} \
-} while (0)
+   do { \
+   if (!CsrLogTaskIsFiltered(CsrSchedTaskQueueGet(), 
CSR_LOG_LEVEL_TASK_TEXT)) { \
+   CsrLogTaskText(text, __LINE__, __FILE__); \
+   } \
+   } while (0)
 #else
 /* DEPRECATED - replaced by csr_log_text.h */
 #define CSR_LOG_TEXT(text) \
-do { \
-if (!CsrLogTaskIsFiltered(CsrSchedTaskQueueGet(), 
CSR_LOG_LEVEL_TASK_TEXT)) \
-{ \
-CsrLogTaskText(text, 0, NULL); \
-} \
-} while (0)
+   do { \
+   if (!CsrLogTaskIsFiltered(CsrSchedTaskQueueGet(), 
CSR_LOG_LEVEL_TASK_TEXT)) { \
+   CsrLogTaskText(text, 0, NULL); \
+   } \
+   } while (0)
 #endif
 #else
 #define CSR_LOG_TEXT(text)
@@ -140,8 +135,8 @@ typedef u32 bitmask32_t;
 
 /* DEPRECATED - replaced by csr_log_text.h */
 void CsrLogTaskText(const char *text,
-u32 line,
-const char *file);
+   u32 line,
+   const char *file);
 
 #define CSR_LOG_STATE_TRANSITION_MASK_FSM_NAME  (0x001)
 #define CSR_LOG_STATE_TRANSITION_MASK_NEXT_STATE(0x002)
@@ -153,16 +148,16 @@ void CsrLogTaskText(const char *text,
 
 /* DEPRECATED - replaced by csr_log_text.h */
 void CsrLogStateTransition(bitmask16_t mask,
-u32 identifier,
-const char *fsm_name,
-u32 prev_state,
-const char *prev_state_str,
-u32 in_event,
-const char *in_event_str,
-u32 next_state,
-const char *next_state_str,
-u32 line,
-const char *file);
+   u32 identifier,
+   const char *fsm_name,
+   u32 prev_state,
+   const char *prev_state_str,
+   u32 in_event,
+   const char *in_event_str,
+   u32 next_state,
+   const char *next_state_str,
+  

[PATCH] staging: csr: Fix coding style

2012-10-25 Thread SeongJae Park
Fix coding style for csr_log.h

Signed-off-by: SeongJae Park sj38.p...@gmail.com
---
 drivers/staging/csr/csr_log.h |  165 -
 1 file changed, 80 insertions(+), 85 deletions(-)

diff --git a/drivers/staging/csr/csr_log.h b/drivers/staging/csr/csr_log.h
index b280856..26657a5 100644
--- a/drivers/staging/csr/csr_log.h
+++ b/drivers/staging/csr/csr_log.h
@@ -2,11 +2,11 @@
 #define CSR_LOG_H__
 /*
 
-(c) Cambridge Silicon Radio Limited 2010
-All rights reserved and confidential information of CSR
+   (c) Cambridge Silicon Radio Limited 2010
+   All rights reserved and confidential information of CSR
 
-Refer to LICENSE.txt included with this source for details
-on the license terms.
+   Refer to LICENSE.txt included with this source for details
+   on the license terms.
 
 */
 
@@ -77,34 +77,31 @@ u8 CsrLogTaskIsFiltered(CsrSchedQid taskId, CsrLogLevelTask 
level);
 /*
  * Logging stuff
  */
-#define CSR_LOG_STRINGIFY_REAL(a) #a
+#define CSR_LOG_STRINGIFY_REAL(a) (#a)
 #define CSR_LOG_STRINGIFY(a) CSR_LOG_STRINGIFY_REAL(a)
 
 #ifdef CSR_LOG_ASSERT_ENABLE
-#define CSR_LOG_ASSERT(cond)\
-do {\
-if (!(cond))\
-{   \
-char *panic_arg = [ __FILE__ : CSR_LOG_STRINGIFY(__LINE__) ] 
-  CSR_LOG_STRINGIFY(cond); \
-CsrPanic(CSR_TECH_FW, CSR_PANIC_FW_ASSERTION_FAIL, panic_arg); \
-}   \
-} while (0)
+#define CSR_LOG_ASSERT(cond) \
+   do { \
+   if (!(cond)) { \
+   char *panic_arg = [ __FILE__ : 
CSR_LOG_STRINGIFY(__LINE__) ] -  CSR_LOG_STRINGIFY(cond); \
+   CsrPanic(CSR_TECH_FW, CSR_PANIC_FW_ASSERTION_FAIL, 
panic_arg); \
+   } \
+   } while (0)
 #else
 #define CSR_LOG_ASSERT(cond)
 #endif
 
-typedef struct
-{
-u16primitiveType;
-const char *primitiveName;
-CsrMsgConvMsgEntry  *messageConv; /* Private - do not use */
+typedef struct {
+   u16primitiveType;
+   const char *primitiveName;
+   CsrMsgConvMsgEntry  *messageConv; /* Private - do not use */
 } CsrLogPrimitiveInformation;
 
-typedef struct
-{
-const char*techVer;
-u32   primitiveInfoCount;
-CsrLogPrimitiveInformation *primitiveInfo;
+typedef struct {
+   const char*techVer;
+   u32   primitiveInfoCount;
+   CsrLogPrimitiveInformation *primitiveInfo;
 } CsrLogTechInformation;
 
 /*-*/
@@ -118,21 +115,19 @@ typedef u32 bitmask32_t;
 #ifdef CSR_LOG_INCLUDE_FILE_NAME_AND_LINE_NUMBER
 /* DEPRECATED - replaced by csr_log_text.h */
 #define CSR_LOG_TEXT(text) \
-do { \
-if (!CsrLogTaskIsFiltered(CsrSchedTaskQueueGet(), 
CSR_LOG_LEVEL_TASK_TEXT)) \
-{ \
-CsrLogTaskText(text, __LINE__, __FILE__); \
-} \
-} while (0)
+   do { \
+   if (!CsrLogTaskIsFiltered(CsrSchedTaskQueueGet(), 
CSR_LOG_LEVEL_TASK_TEXT)) { \
+   CsrLogTaskText(text, __LINE__, __FILE__); \
+   } \
+   } while (0)
 #else
 /* DEPRECATED - replaced by csr_log_text.h */
 #define CSR_LOG_TEXT(text) \
-do { \
-if (!CsrLogTaskIsFiltered(CsrSchedTaskQueueGet(), 
CSR_LOG_LEVEL_TASK_TEXT)) \
-{ \
-CsrLogTaskText(text, 0, NULL); \
-} \
-} while (0)
+   do { \
+   if (!CsrLogTaskIsFiltered(CsrSchedTaskQueueGet(), 
CSR_LOG_LEVEL_TASK_TEXT)) { \
+   CsrLogTaskText(text, 0, NULL); \
+   } \
+   } while (0)
 #endif
 #else
 #define CSR_LOG_TEXT(text)
@@ -140,8 +135,8 @@ typedef u32 bitmask32_t;
 
 /* DEPRECATED - replaced by csr_log_text.h */
 void CsrLogTaskText(const char *text,
-u32 line,
-const char *file);
+   u32 line,
+   const char *file);
 
 #define CSR_LOG_STATE_TRANSITION_MASK_FSM_NAME  (0x001)
 #define CSR_LOG_STATE_TRANSITION_MASK_NEXT_STATE(0x002)
@@ -153,16 +148,16 @@ void CsrLogTaskText(const char *text,
 
 /* DEPRECATED - replaced by csr_log_text.h */
 void CsrLogStateTransition(bitmask16_t mask,
-u32 identifier,
-const char *fsm_name,
-u32 prev_state,
-const char *prev_state_str,
-u32 in_event,
-const char *in_event_str,
-u32 next_state,
-const char *next_state_str,
-u32 line,
-const char *file);
+   u32 identifier,
+   const char *fsm_name,
+   u32 prev_state,
+   const char *prev_state_str,
+   u32 in_event,
+   const char *in_event_str,
+   u32 next_state,
+   const char *next_state_str,

Re: [PATCH] staging: csr: fix coding style

2012-10-22 Thread SeongJae Park
Thank you for fast reply, Greg.

I was very impressed by your session at Linux Forum,
sent linux kernel patch, made a document about your session(write and
submit your first Linux kernel patch) in Korean, and my patch merged,
have discussion with Linux kernel guys...

These whole thing about my first kernel patch were fantastic and great
experience.

I think I got realized meaning & fun of F/OSS a little bit ;)
So, I would never stop contributing to Linux in any ways.

Thank you very much, Greg, and whole kernel people.

Thanks and Best Regards.
SeongJae Park.

On Tue, Oct 23, 2012 at 11:53 AM, Greg KH  wrote:
> On Tue, Oct 23, 2012 at 11:41:06AM +0900, SeongJae Park wrote:
>> Hello,
>>
>>
>> I think it was my mistake.
>>
>> CsrThread is enclosed by macro #ifdef __KERNEL__
>> and it used by csr_framework_ext.h as CsrThreadHandle type(typedef
>> used at csr_framework_ext_types.h).
>>
>> I think that's why I didn't see build failure.
>
> When building the driver __KERNEL__ is defined :)
>
>> So, I think I should not remove CsrThread.
>> If there is anything I missed or wrong, Please let me know.
>
> No, you are right, this can't be removed just yet, so all is good.
>
> If you want to send more patches cleaning stuff up like this one, that
> would be great.
>
> thanks,
>
> greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] staging: csr: fix coding style

2012-10-22 Thread Greg KH
On Tue, Oct 23, 2012 at 11:41:06AM +0900, SeongJae Park wrote:
> Hello,
> 
> 
> I think it was my mistake.
> 
> CsrThread is enclosed by macro #ifdef __KERNEL__
> and it used by csr_framework_ext.h as CsrThreadHandle type(typedef
> used at csr_framework_ext_types.h).
> 
> I think that's why I didn't see build failure.

When building the driver __KERNEL__ is defined :)

> So, I think I should not remove CsrThread.
> If there is anything I missed or wrong, Please let me know.

No, you are right, this can't be removed just yet, so all is good.

If you want to send more patches cleaning stuff up like this one, that
would be great.

thanks,

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


Re: [PATCH] staging: csr: fix coding style

2012-10-22 Thread SeongJae Park
Hello,


I think it was my mistake.

CsrThread is enclosed by macro #ifdef __KERNEL__
and it used by csr_framework_ext.h as CsrThreadHandle type(typedef
used at csr_framework_ext_types.h).

I think that's why I didn't see build failure.

So, I think I should not remove CsrThread.
If there is anything I missed or wrong, Please let me know.


Thnks and Regards.
SeongJae Park.

On Tue, Oct 23, 2012 at 11:13 AM, SeongJae Park  wrote:
> Hello,
>
>
> Thank you very much for your kindness, Greg.
>
> I tried to reply to email-list when I received Lauri's email, but I
> coudln't because my gmail service has some problems.
>
> I'm still newbie, sorry.
>
> I will send new patch that removes whole struct, as soon as
> possible(maybe 4~5 hours later).
>
>
> Thanks and Regards.
> SeongJae Park.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] staging: csr: fix coding style

2012-10-22 Thread SeongJae Park
Hello,


Thank you very much for your kindness, Greg.

I tried to reply to email-list when I received Lauri's email, but I
coudln't because my gmail service has some problems.

I'm still newbie, sorry.

I will send new patch that removes whole struct, as soon as
possible(maybe 4~5 hours later).


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


Re: [PATCH] staging: csr: fix coding style

2012-10-22 Thread Greg KH
On Tue, Oct 16, 2012 at 10:13:02AM +0300, Lauri Hintsala wrote:
> Hi,
> 
> On 10/15/2012 10:55 AM, SeongJae Park wrote:
> >Fix coding style of csr_framework_ext_types.h
> >
> >Signed-off-by: SeongJae Park 
> >---
> >  drivers/staging/csr/csr_framework_ext_types.h |   33 
> > +++--
> >  1 file changed, 15 insertions(+), 18 deletions(-)
> >
> >diff --git a/drivers/staging/csr/csr_framework_ext_types.h 
> >b/drivers/staging/csr/csr_framework_ext_types.h
> >index 57194ee..7e9cf8e 100644
> >--- a/drivers/staging/csr/csr_framework_ext_types.h
> >+++ b/drivers/staging/csr/csr_framework_ext_types.h
> >@@ -2,11 +2,11 @@
> 
> ...
> 
> >@@ -24,17 +24,15 @@ extern "C" {
> >
> >  #ifdef __KERNEL__
> >
> >-struct CsrThread
> >-{
> >-struct task_struct *thread_task;
> >-charname[16];
> >+struct CsrThreadi {
> 
> 
> I think this extra i letter at the end of CsrThreadi string is typo.
> Did you try to compile the driver with your changes?

Turns out that no one uses 'struct CsrThread' anywhere, so this didn't
break the build.

But, it's incorrect, I'll fix it up by hand.

SeongJae, care to send a follow-on patch that just removes the whole
structure?

thanks,

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


Re: [PATCH] staging: csr: fix coding style

2012-10-22 Thread Greg KH
On Tue, Oct 16, 2012 at 10:13:02AM +0300, Lauri Hintsala wrote:
 Hi,
 
 On 10/15/2012 10:55 AM, SeongJae Park wrote:
 Fix coding style of csr_framework_ext_types.h
 
 Signed-off-by: SeongJae Park sj38.p...@gmail.com
 ---
   drivers/staging/csr/csr_framework_ext_types.h |   33 
  +++--
   1 file changed, 15 insertions(+), 18 deletions(-)
 
 diff --git a/drivers/staging/csr/csr_framework_ext_types.h 
 b/drivers/staging/csr/csr_framework_ext_types.h
 index 57194ee..7e9cf8e 100644
 --- a/drivers/staging/csr/csr_framework_ext_types.h
 +++ b/drivers/staging/csr/csr_framework_ext_types.h
 @@ -2,11 +2,11 @@
 
 ...
 
 @@ -24,17 +24,15 @@ extern C {
 
   #ifdef __KERNEL__
 
 -struct CsrThread
 -{
 -struct task_struct *thread_task;
 -charname[16];
 +struct CsrThreadi {
 
 
 I think this extra i letter at the end of CsrThreadi string is typo.
 Did you try to compile the driver with your changes?

Turns out that no one uses 'struct CsrThread' anywhere, so this didn't
break the build.

But, it's incorrect, I'll fix it up by hand.

SeongJae, care to send a follow-on patch that just removes the whole
structure?

thanks,

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


Re: [PATCH] staging: csr: fix coding style

2012-10-22 Thread SeongJae Park
Hello,


Thank you very much for your kindness, Greg.

I tried to reply to email-list when I received Lauri's email, but I
coudln't because my gmail service has some problems.

I'm still newbie, sorry.

I will send new patch that removes whole struct, as soon as
possible(maybe 4~5 hours later).


Thanks and Regards.
SeongJae Park.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] staging: csr: fix coding style

2012-10-22 Thread SeongJae Park
Hello,


I think it was my mistake.

CsrThread is enclosed by macro #ifdef __KERNEL__
and it used by csr_framework_ext.h as CsrThreadHandle type(typedef
used at csr_framework_ext_types.h).

I think that's why I didn't see build failure.

So, I think I should not remove CsrThread.
If there is anything I missed or wrong, Please let me know.


Thnks and Regards.
SeongJae Park.

On Tue, Oct 23, 2012 at 11:13 AM, SeongJae Park sj38.p...@gmail.com wrote:
 Hello,


 Thank you very much for your kindness, Greg.

 I tried to reply to email-list when I received Lauri's email, but I
 coudln't because my gmail service has some problems.

 I'm still newbie, sorry.

 I will send new patch that removes whole struct, as soon as
 possible(maybe 4~5 hours later).


 Thanks and Regards.
 SeongJae Park.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] staging: csr: fix coding style

2012-10-22 Thread Greg KH
On Tue, Oct 23, 2012 at 11:41:06AM +0900, SeongJae Park wrote:
 Hello,
 
 
 I think it was my mistake.
 
 CsrThread is enclosed by macro #ifdef __KERNEL__
 and it used by csr_framework_ext.h as CsrThreadHandle type(typedef
 used at csr_framework_ext_types.h).
 
 I think that's why I didn't see build failure.

When building the driver __KERNEL__ is defined :)

 So, I think I should not remove CsrThread.
 If there is anything I missed or wrong, Please let me know.

No, you are right, this can't be removed just yet, so all is good.

If you want to send more patches cleaning stuff up like this one, that
would be great.

thanks,

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


Re: [PATCH] staging: csr: fix coding style

2012-10-22 Thread SeongJae Park
Thank you for fast reply, Greg.

I was very impressed by your session at Linux Forum,
sent linux kernel patch, made a document about your session(write and
submit your first Linux kernel patch) in Korean, and my patch merged,
have discussion with Linux kernel guys...

These whole thing about my first kernel patch were fantastic and great
experience.

I think I got realized meaning  fun of F/OSS a little bit ;)
So, I would never stop contributing to Linux in any ways.

Thank you very much, Greg, and whole kernel people.

Thanks and Best Regards.
SeongJae Park.

On Tue, Oct 23, 2012 at 11:53 AM, Greg KH gre...@linuxfoundation.org wrote:
 On Tue, Oct 23, 2012 at 11:41:06AM +0900, SeongJae Park wrote:
 Hello,


 I think it was my mistake.

 CsrThread is enclosed by macro #ifdef __KERNEL__
 and it used by csr_framework_ext.h as CsrThreadHandle type(typedef
 used at csr_framework_ext_types.h).

 I think that's why I didn't see build failure.

 When building the driver __KERNEL__ is defined :)

 So, I think I should not remove CsrThread.
 If there is anything I missed or wrong, Please let me know.

 No, you are right, this can't be removed just yet, so all is good.

 If you want to send more patches cleaning stuff up like this one, that
 would be great.

 thanks,

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


Re: [PATCH] staging: csr: fix coding style

2012-10-16 Thread Lauri Hintsala

Hi,

On 10/15/2012 10:55 AM, SeongJae Park wrote:

Fix coding style of csr_framework_ext_types.h

Signed-off-by: SeongJae Park 
---
  drivers/staging/csr/csr_framework_ext_types.h |   33 +++--
  1 file changed, 15 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/csr/csr_framework_ext_types.h 
b/drivers/staging/csr/csr_framework_ext_types.h
index 57194ee..7e9cf8e 100644
--- a/drivers/staging/csr/csr_framework_ext_types.h
+++ b/drivers/staging/csr/csr_framework_ext_types.h
@@ -2,11 +2,11 @@


...


@@ -24,17 +24,15 @@ extern "C" {

  #ifdef __KERNEL__

-struct CsrThread
-{
-struct task_struct *thread_task;
-charname[16];
+struct CsrThreadi {



I think this extra i letter at the end of CsrThreadi string is typo. Did 
you try to compile the driver with your changes?


Best regards,
Lauri Hintsala



+   struct task_struct *thread_task;
+   charname[16];


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


Re: [PATCH] staging: csr: fix coding style

2012-10-16 Thread Lauri Hintsala

Hi,

On 10/15/2012 10:55 AM, SeongJae Park wrote:

Fix coding style of csr_framework_ext_types.h

Signed-off-by: SeongJae Park sj38.p...@gmail.com
---
  drivers/staging/csr/csr_framework_ext_types.h |   33 +++--
  1 file changed, 15 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/csr/csr_framework_ext_types.h 
b/drivers/staging/csr/csr_framework_ext_types.h
index 57194ee..7e9cf8e 100644
--- a/drivers/staging/csr/csr_framework_ext_types.h
+++ b/drivers/staging/csr/csr_framework_ext_types.h
@@ -2,11 +2,11 @@


...


@@ -24,17 +24,15 @@ extern C {

  #ifdef __KERNEL__

-struct CsrThread
-{
-struct task_struct *thread_task;
-charname[16];
+struct CsrThreadi {



I think this extra i letter at the end of CsrThreadi string is typo. Did 
you try to compile the driver with your changes?


Best regards,
Lauri Hintsala



+   struct task_struct *thread_task;
+   charname[16];


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


[PATCH] staging: csr: fix coding style

2012-10-15 Thread SeongJae Park
Fix coding style of csr_framework_ext_types.h

Signed-off-by: SeongJae Park 
---
 drivers/staging/csr/csr_framework_ext_types.h |   33 +++--
 1 file changed, 15 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/csr/csr_framework_ext_types.h 
b/drivers/staging/csr/csr_framework_ext_types.h
index 57194ee..7e9cf8e 100644
--- a/drivers/staging/csr/csr_framework_ext_types.h
+++ b/drivers/staging/csr/csr_framework_ext_types.h
@@ -2,11 +2,11 @@
 #define CSR_FRAMEWORK_EXT_TYPES_H__
 /*
 
-(c) Cambridge Silicon Radio Limited 2010
-All rights reserved and confidential information of CSR
+   (c) Cambridge Silicon Radio Limited 2010
+   All rights reserved and confidential information of CSR
 
-Refer to LICENSE.txt included with this source for details
-on the license terms.
+   Refer to LICENSE.txt included with this source for details
+   on the license terms.
 
 */
 
@@ -24,17 +24,15 @@ extern "C" {
 
 #ifdef __KERNEL__
 
-struct CsrThread
-{
-struct task_struct *thread_task;
-charname[16];
+struct CsrThreadi {
+   struct task_struct *thread_task;
+   charname[16];
 };
 
-struct CsrEvent
-{
-/* wait_queue for waking the kernel thread */
-wait_queue_head_t wakeup_q;
-unsigned int  wakeup_flag;
+struct CsrEvent {
+   /* wait_queue for waking the kernel thread */
+   wait_queue_head_t wakeup_q;
+   unsigned int  wakeup_flag;
 };
 
 typedef struct CsrEvent CsrEventHandle;
@@ -43,11 +41,10 @@ typedef struct CsrThread CsrThreadHandle;
 
 #else /* __KERNEL __ */
 
-struct CsrEvent
-{
-pthread_cond_t  event;
-pthread_mutex_t mutex;
-u32   eventBits;
+struct CsrEvent {
+   pthread_cond_t  event;
+   pthread_mutex_t mutex;
+   u32   eventBits;
 };
 
 typedef struct CsrEvent CsrEventHandle;
-- 
1.7.9.5

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


[PATCH] staging: csr: fix coding style

2012-10-15 Thread SeongJae Park
Fix coding style of csr_framework_ext_types.h

Signed-off-by: SeongJae Park sj38.p...@gmail.com
---
 drivers/staging/csr/csr_framework_ext_types.h |   33 +++--
 1 file changed, 15 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/csr/csr_framework_ext_types.h 
b/drivers/staging/csr/csr_framework_ext_types.h
index 57194ee..7e9cf8e 100644
--- a/drivers/staging/csr/csr_framework_ext_types.h
+++ b/drivers/staging/csr/csr_framework_ext_types.h
@@ -2,11 +2,11 @@
 #define CSR_FRAMEWORK_EXT_TYPES_H__
 /*
 
-(c) Cambridge Silicon Radio Limited 2010
-All rights reserved and confidential information of CSR
+   (c) Cambridge Silicon Radio Limited 2010
+   All rights reserved and confidential information of CSR
 
-Refer to LICENSE.txt included with this source for details
-on the license terms.
+   Refer to LICENSE.txt included with this source for details
+   on the license terms.
 
 */
 
@@ -24,17 +24,15 @@ extern C {
 
 #ifdef __KERNEL__
 
-struct CsrThread
-{
-struct task_struct *thread_task;
-charname[16];
+struct CsrThreadi {
+   struct task_struct *thread_task;
+   charname[16];
 };
 
-struct CsrEvent
-{
-/* wait_queue for waking the kernel thread */
-wait_queue_head_t wakeup_q;
-unsigned int  wakeup_flag;
+struct CsrEvent {
+   /* wait_queue for waking the kernel thread */
+   wait_queue_head_t wakeup_q;
+   unsigned int  wakeup_flag;
 };
 
 typedef struct CsrEvent CsrEventHandle;
@@ -43,11 +41,10 @@ typedef struct CsrThread CsrThreadHandle;
 
 #else /* __KERNEL __ */
 
-struct CsrEvent
-{
-pthread_cond_t  event;
-pthread_mutex_t mutex;
-u32   eventBits;
+struct CsrEvent {
+   pthread_cond_t  event;
+   pthread_mutex_t mutex;
+   u32   eventBits;
 };
 
 typedef struct CsrEvent CsrEventHandle;
-- 
1.7.9.5

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