[OPW,kernel] Staging: rtl8192e: Inserting complex variables in paranthesis
diff mbox

Message ID 20131015130320.GA3445@Ashvini
State Changes Requested
Headers show

Commit Message

Ashvini Varatharaj Oct. 15, 2013, 1:03 p.m. UTC
Fix checkpatch error: ERROR:Definitions with complex variables should
be enclosed in paranthesis

Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
---
 drivers/staging/rtl8192e/dot11d.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Greg KH Oct. 15, 2013, 3:43 p.m. UTC | #1
On Tue, Oct 15, 2013 at 06:33:20PM +0530, Ashvini Varatharaj wrote:
> Fix checkpatch error: ERROR:Definitions with complex variables should
> be enclosed in paranthesis
> 
> Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
> ---
>  drivers/staging/rtl8192e/dot11d.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/rtl8192e/dot11d.h b/drivers/staging/rtl8192e/dot11d.h
> index fb7683f..3fec869 100644
> --- a/drivers/staging/rtl8192e/dot11d.h
> +++ b/drivers/staging/rtl8192e/dot11d.h
> @@ -87,7 +87,7 @@ static inline void cpMacAddr(unsigned char *des, unsigned char *src)
>  #define CIE_WATCHDOG_TH 1
>  #define GET_CIE_WATCHDOG(__pIeeeDev)				\
>  	 (GET_DOT11D_INFO(__pIeeeDev)->CountryIeWatchdog)
> -#define RESET_CIE_WATCHDOG(__pIeeeDev) GET_CIE_WATCHDOG(__pIeeeDev) = 0
> +#define RESET_CIE_WATCHDOG(__pIeeeDev)(GET_CIE_WATCHDOG(__pIeeeDev) = 0)

That builds?  Traditionally you need some kind of whitespace after the
define before what it is being defined as, so could you add it back here
as well?

thanks,

greg k-h
Ashvini Varatharaj Oct. 15, 2013, 4:16 p.m. UTC | #2
On Tue, Oct 15, 2013 at 06:33:20PM +0530, Ashvini Varatharaj wrote:
> Fix checkpatch error: ERROR:Definitions with complex variables should
> be enclosed in paranthesis
>
> Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
> ---
>  drivers/staging/rtl8192e/dot11d.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8192e/dot11d.h
b/drivers/staging/rtl8192e/dot11d.h
> index fb7683f..3fec869 100644
> --- a/drivers/staging/rtl8192e/dot11d.h
> +++ b/drivers/staging/rtl8192e/dot11d.h
> @@ -87,7 +87,7 @@ static inline void cpMacAddr(unsigned char *des,
unsigned char *src)
>  #define CIE_WATCHDOG_TH 1
>  #define GET_CIE_WATCHDOG(__pIeeeDev)                         \
>        (GET_DOT11D_INFO(__pIeeeDev)->CountryIeWatchdog)
> -#define RESET_CIE_WATCHDOG(__pIeeeDev) GET_CIE_WATCHDOG(__pIeeeDev) = 0
> +#define RESET_CIE_WATCHDOG(__pIeeeDev)(GET_CIE_WATCHDOG(__pIeeeDev) = 0)

That builds?  Traditionally you need some kind of whitespace after the
define before what it is being defined as, so could you add it back here
as well?

thanks,

greg k-h





I dint understand where to insert the white space. Can you please tell me
where to insert the space ?
Thankyou
Josh Triplett Oct. 20, 2013, 1:25 p.m. UTC | #3
On Tue, Oct 15, 2013 at 09:46:21PM +0530, Ashvini Varatharaj wrote:
> On Tue, Oct 15, 2013 at 06:33:20PM +0530, Ashvini Varatharaj wrote:
> > Fix checkpatch error: ERROR:Definitions with complex variables should
> > be enclosed in paranthesis
> >
> > Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
> > ---
> >  drivers/staging/rtl8192e/dot11d.h |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/rtl8192e/dot11d.h
> b/drivers/staging/rtl8192e/dot11d.h
> > index fb7683f..3fec869 100644
> > --- a/drivers/staging/rtl8192e/dot11d.h
> > +++ b/drivers/staging/rtl8192e/dot11d.h
> > @@ -87,7 +87,7 @@ static inline void cpMacAddr(unsigned char *des,
> unsigned char *src)
> >  #define CIE_WATCHDOG_TH 1
> >  #define GET_CIE_WATCHDOG(__pIeeeDev)                         \
> >        (GET_DOT11D_INFO(__pIeeeDev)->CountryIeWatchdog)
> > -#define RESET_CIE_WATCHDOG(__pIeeeDev) GET_CIE_WATCHDOG(__pIeeeDev) = 0
> > +#define RESET_CIE_WATCHDOG(__pIeeeDev)(GET_CIE_WATCHDOG(__pIeeeDev) = 0)
> 
> That builds?  Traditionally you need some kind of whitespace after the
> define before what it is being defined as, so could you add it back here
> as well?
> 
> thanks,
> 
> greg k-h
> 
> 
> 
> 
> 
> I dint understand where to insert the white space. Can you please tell me
> where to insert the space ?

Between the macro and its definition: between the first close parenthesis
and the second open parenthesis.  You dropped that space when you added
the parentheses.

- Josh Triplett

Patch
diff mbox

diff --git a/drivers/staging/rtl8192e/dot11d.h b/drivers/staging/rtl8192e/dot11d.h
index fb7683f..3fec869 100644
--- a/drivers/staging/rtl8192e/dot11d.h
+++ b/drivers/staging/rtl8192e/dot11d.h
@@ -87,7 +87,7 @@  static inline void cpMacAddr(unsigned char *des, unsigned char *src)
 #define CIE_WATCHDOG_TH 1
 #define GET_CIE_WATCHDOG(__pIeeeDev)				\
 	 (GET_DOT11D_INFO(__pIeeeDev)->CountryIeWatchdog)
-#define RESET_CIE_WATCHDOG(__pIeeeDev) GET_CIE_WATCHDOG(__pIeeeDev) = 0
+#define RESET_CIE_WATCHDOG(__pIeeeDev)(GET_CIE_WATCHDOG(__pIeeeDev) = 0)
 #define UPDATE_CIE_WATCHDOG(__pIeeeDev) (++GET_CIE_WATCHDOG(__pIeeeDev))
 
 #define IS_DOT11D_STATE_DONE(__pIeeeDev)			\