[PATCH v2] staging: fbtft: differentiate between buffer and data types to fix sparse warning

2017-10-17 Thread Alfonso Lima Astor
sparse was complaning about an incorrect type cast:
drivers/staging/fbtft/fbtft-bus.c:60:1: warning: incorrect type in assignment 
(different base types)
drivers/staging/fbtft/fbtft-bus.c:60:1:expected unsigned short [unsigned] 
[short] [usertype] 
drivers/staging/fbtft/fbtft-bus.c:60:1:got restricted __be16 [usertype] 

drivers/staging/fbtft/fbtft-bus.c:60:1: warning: incorrect type in assignment 
(different base types)
drivers/staging/fbtft/fbtft-bus.c:60:1:expected unsigned short [unsigned] 
[short] [usertype] 
drivers/staging/fbtft/fbtft-bus.c:60:1:got restricted __be16 [usertype] 


The solution is to add an extra parameter to the macro to
differentiate between buffer type and data type.

Cc: Thomas Petazzoni <thomas.petazz...@free-electrons.com>
Signed-off-by: Alfonso Lima Astor <alfonsolimaas...@gmail.com>

---
changes for v2:
Add maintainer to CC and add result of macro below '---'
to ease review of changes.

For "fbtft_write_reg8_bus8" and "fbtft_write_reg16_bus16 result"
is the same before and after patch. For "fbtft_write_reg16_bus8"
macro result after patch is:

void fbtft_write_reg16_bus8(struct fbtft_par *par, int len, ...)
{
va_list args;
int i, ret;
int offset = 0;
__be16 *buf = (__be16 *)par->buf;

if (unlikely(par->debug & DEBUG_WRITE_REGISTER)) {
va_start(args, len);
for (i = 0; i < len; i++) {
buf[i] = cpu_to_be16((u16)va_arg(args, unsigned int));
}
va_end(args);
fbtft_par_dbg_hex(DEBUG_WRITE_REGISTER, par, par->info->device, 
__be16, buf, len, "%s: ", __func__);
}

va_start(args, len);

if (par->startbyte) {
*(u8 *)par->buf = par->startbyte;
buf = (__be16 *)(par->buf + 1);
offset = 1;
}

*buf = cpu_to_be16((u16)va_arg(args, unsigned int));
ret = fbtft_write_buf_dc(par, par->buf, sizeof(u16) + offset, 0);
if (ret < 0)
goto out;
len--;

if (par->startbyte)
*(u8 *)par->buf = par->startbyte | 0x2;

if (len) {
i = len;
while (i--)
*buf++ = cpu_to_be16((u16)va_arg(args, unsigned int));
fbtft_write_buf_dc(par, par->buf,
   len * (sizeof(u16) + offset), 1);
}
out:
va_end(args);
}

 drivers/staging/fbtft/fbtft-bus.c | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/fbtft/fbtft-bus.c 
b/drivers/staging/fbtft/fbtft-bus.c
index a80b5d1..81e8af7 100644
--- a/drivers/staging/fbtft/fbtft-bus.c
+++ b/drivers/staging/fbtft/fbtft-bus.c
@@ -10,33 +10,33 @@
  *
  */
 
-#define define_fbtft_write_reg(func, type, modifier)  \
+#define define_fbtft_write_reg(func, buffer_type, data_type, modifier)\
 void func(struct fbtft_par *par, int len, ...)\
 { \
va_list args; \
int i, ret;   \
int offset = 0;   \
-   type *buf = (type *)par->buf; \
+   buffer_type *buf = (buffer_type *)par->buf;   \
  \
if (unlikely(par->debug & DEBUG_WRITE_REGISTER)) {\
va_start(args, len);  \
for (i = 0; i < len; i++) {   \
-   buf[i] = (type)va_arg(args, unsigned int);\
+   buf[i] = modifier((data_type)va_arg(args, unsigned 
int)); \
} \
va_end(args); \
-   fbtft_par_dbg_hex(DEBUG_WRITE_REGISTER, par, par->info->device, 
type, buf, len, "%s: ", __func__);   \
+   fbtft_par_dbg_hex(DEBUG_WRITE_REGISTER, par, par->info->device, 
buffer_type, buf, len, "%s: ", __func__); \
} \
  \
va_start(args, len);  \
   

[PATCH v2] staging: fbtft: differentiate between buffer and data types to fix sparse warning

2017-10-04 Thread Alfonso Lima Astor
sparse was complaning about an incorrect type cast:
drivers/staging/fbtft/fbtft-bus.c:60:1: warning: incorrect type in assignment 
(different base types)
drivers/staging/fbtft/fbtft-bus.c:60:1:expected unsigned short [unsigned] 
[short] [usertype] 
drivers/staging/fbtft/fbtft-bus.c:60:1:got restricted __be16 [usertype] 

drivers/staging/fbtft/fbtft-bus.c:60:1: warning: incorrect type in assignment 
(different base types)
drivers/staging/fbtft/fbtft-bus.c:60:1:expected unsigned short [unsigned] 
[short] [usertype] 
drivers/staging/fbtft/fbtft-bus.c:60:1:got restricted __be16 [usertype] 


The solution is to add an extra parameter to the macro to
differentiate between buffer type and data type.

Cc: Thomas Petazzoni <thomas.petazz...@free-electrons.com>
Signed-off-by: Alfonso Lima Astor <alfonsolimaas...@gmail.com>

---
changes for v2:
Add maintainer to CC and add result of macro below '---'
to ease review of changes.

For "fbtft_write_reg8_bus8" and "fbtft_write_reg16_bus16 result"
is the same before and after patch. For "fbtft_write_reg16_bus8"
macro result after patch is:

void fbtft_write_reg16_bus8(struct fbtft_par *par, int len, ...)
{
va_list args;
int i, ret;
int offset = 0;
__be16 *buf = (__be16 *)par->buf;

if (unlikely(par->debug & DEBUG_WRITE_REGISTER)) {
va_start(args, len);
for (i = 0; i < len; i++) {
buf[i] = cpu_to_be16((u16)va_arg(args, unsigned int));
}
va_end(args);
fbtft_par_dbg_hex(DEBUG_WRITE_REGISTER, par, par->info->device, 
__be16, buf, len, "%s: ", __func__);
}

va_start(args, len);

if (par->startbyte) {
*(u8 *)par->buf = par->startbyte;
buf = (__be16 *)(par->buf + 1);
offset = 1;
}

*buf = cpu_to_be16((u16)va_arg(args, unsigned int));
ret = fbtft_write_buf_dc(par, par->buf, sizeof(u16) + offset, 0);
if (ret < 0)
goto out;
len--;

if (par->startbyte)
*(u8 *)par->buf = par->startbyte | 0x2;

if (len) {
i = len;
while (i--)
*buf++ = cpu_to_be16((u16)va_arg(args, unsigned int));
fbtft_write_buf_dc(par, par->buf,
   len * (sizeof(u16) + offset), 1);
}
out:
va_end(args);
}

 drivers/staging/fbtft/fbtft-bus.c | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/fbtft/fbtft-bus.c 
b/drivers/staging/fbtft/fbtft-bus.c
index a80b5d1..81e8af7 100644
--- a/drivers/staging/fbtft/fbtft-bus.c
+++ b/drivers/staging/fbtft/fbtft-bus.c
@@ -10,33 +10,33 @@
  *
  */
 
-#define define_fbtft_write_reg(func, type, modifier)  \
+#define define_fbtft_write_reg(func, buffer_type, data_type, modifier)\
 void func(struct fbtft_par *par, int len, ...)\
 { \
va_list args; \
int i, ret;   \
int offset = 0;   \
-   type *buf = (type *)par->buf; \
+   buffer_type *buf = (buffer_type *)par->buf;   \
  \
if (unlikely(par->debug & DEBUG_WRITE_REGISTER)) {\
va_start(args, len);  \
for (i = 0; i < len; i++) {   \
-   buf[i] = (type)va_arg(args, unsigned int);\
+   buf[i] = modifier((data_type)va_arg(args, unsigned 
int)); \
} \
va_end(args); \
-   fbtft_par_dbg_hex(DEBUG_WRITE_REGISTER, par, par->info->device, 
type, buf, len, "%s: ", __func__);   \
+   fbtft_par_dbg_hex(DEBUG_WRITE_REGISTER, par, par->info->device, 
buffer_type, buf, len, "%s: ", __func__); \
} \
  \
va_start(args, len);  \
   

[PATCH] staging: fbtft: diferenciate between buffer and data types to fix sparse warning

2017-09-27 Thread Alfonso Lima Astor
sparse was complaning about an incorrect type cast:
drivers/staging/fbtft/fbtft-bus.c:60:1: warning: incorrect type in assignment 
(different base types)
drivers/staging/fbtft/fbtft-bus.c:60:1:expected unsigned short [unsigned] 
[short] [usertype] 
drivers/staging/fbtft/fbtft-bus.c:60:1:got restricted __be16 [usertype] 

drivers/staging/fbtft/fbtft-bus.c:60:1: warning: incorrect type in assignment 
(different base types)
drivers/staging/fbtft/fbtft-bus.c:60:1:expected unsigned short [unsigned] 
[short] [usertype] 
drivers/staging/fbtft/fbtft-bus.c:60:1:got restricted __be16 [usertype] 


The solution is to add an extra parameter to the macro to
diferenciate between buffer type and data type.

Signed-off-by: Alfonso Lima Astor <alfonsolimaas...@gmail.com>
---
 drivers/staging/fbtft/fbtft-bus.c | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/fbtft/fbtft-bus.c 
b/drivers/staging/fbtft/fbtft-bus.c
index a80b5d1..81e8af7 100644
--- a/drivers/staging/fbtft/fbtft-bus.c
+++ b/drivers/staging/fbtft/fbtft-bus.c
@@ -10,33 +10,33 @@
  *
  */
 
-#define define_fbtft_write_reg(func, type, modifier)  \
+#define define_fbtft_write_reg(func, buffer_type, data_type, modifier)\
 void func(struct fbtft_par *par, int len, ...)\
 { \
va_list args; \
int i, ret;   \
int offset = 0;   \
-   type *buf = (type *)par->buf; \
+   buffer_type *buf = (buffer_type *)par->buf;   \
  \
if (unlikely(par->debug & DEBUG_WRITE_REGISTER)) {\
va_start(args, len);  \
for (i = 0; i < len; i++) {   \
-   buf[i] = (type)va_arg(args, unsigned int);\
+   buf[i] = modifier((data_type)va_arg(args, unsigned 
int)); \
} \
va_end(args); \
-   fbtft_par_dbg_hex(DEBUG_WRITE_REGISTER, par, par->info->device, 
type, buf, len, "%s: ", __func__);   \
+   fbtft_par_dbg_hex(DEBUG_WRITE_REGISTER, par, par->info->device, 
buffer_type, buf, len, "%s: ", __func__); \
} \
  \
va_start(args, len);  \
  \
if (par->startbyte) { \
*(u8 *)par->buf = par->startbyte; \
-   buf = (type *)(par->buf + 1); \
+   buf = (buffer_type *)(par->buf + 1);  \
offset = 1;   \
} \
  \
-   *buf = modifier((type)va_arg(args, unsigned int));\
-   ret = fbtft_write_buf_dc(par, par->buf, sizeof(type) + offset, 0);\
+   *buf = modifier((data_type)va_arg(args, unsigned int));   \
+   ret = fbtft_write_buf_dc(par, par->buf, sizeof(data_type) + offset, 0); 
\
if (ret < 0)  \
goto out; \
len--;\
@@ -47,18 +47,18 @@ void func(struct fbtft_par *par, int len, ...)  
  \
if (len) {\
i = len;  \
while (i--)   \
-   *buf++ = modifier((type)va_arg(args, unsigned int));  \
+   *buf++ = modifier((data_type)va_arg(args, unsigned 
int)); \
fbtft_write_buf_dc(par, par->buf, \
-  len * (sizeof(type) + offset), 1);  

[PATCH] staging: wlan-ng: convert variable to le16 for assignment

2017-09-26 Thread Alfonso Lima Astor
Sparse was complaining about an incorrect assignment:
drivers/staging/wlan-ng/prism2sta.c:1450:29: warning: incorrect type in 
assignment (different base types)
drivers/staging/wlan-ng/prism2sta.c:1450:29:expected unsigned short 
[unsigned] [usertype] link_status_new
drivers/staging/wlan-ng/prism2sta.c:1450:29:got restricted __le16 
[usertype] linkstatus

Signed-off-by: Alfonso Lima Astor <alfonsolimaas...@gmail.com>
---
 drivers/staging/wlan-ng/prism2sta.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wlan-ng/prism2sta.c 
b/drivers/staging/wlan-ng/prism2sta.c
index c9df450..070a237 100644
--- a/drivers/staging/wlan-ng/prism2sta.c
+++ b/drivers/staging/wlan-ng/prism2sta.c
@@ -1447,7 +1447,7 @@ static void prism2sta_inf_linkstatus(struct wlandevice 
*wlandev,
 {
struct hfa384x *hw = wlandev->priv;
 
-   hw->link_status_new = inf->info.linkstatus.linkstatus;
+   hw->link_status_new = le16_to_cpu(inf->info.linkstatus.linkstatus);
 
schedule_work(>link_bh);
 }
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2] staging: wlan-ng: Fix endianness warnings

2017-07-18 Thread Alfonso Lima Astor
These variables were set to u16 and u32 although they always hold a little
endian value.

This patch fixes multiple sparse warnings like:
drivers/staging/wlan-ng/prism2sta.c:375:46: warning: cast to restricted __le16

Signed-off-by: Alfonso Lima Astor <alfonsolimaas...@gmail.com>

---
v2:
Resubmit patch that wouldn't apply correcty

 drivers/staging/wlan-ng/hfa384x.h   | 48 ++---
 drivers/staging/wlan-ng/prism2sta.c |  8 +++
 2 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/drivers/staging/wlan-ng/hfa384x.h 
b/drivers/staging/wlan-ng/hfa384x.h
index 018db22..aaa8327 100644
--- a/drivers/staging/wlan-ng/hfa384x.h
+++ b/drivers/staging/wlan-ng/hfa384x.h
@@ -445,9 +445,9 @@ struct hfa384x_downloadbuffer {
 
 /*-- Information Record: commsquality --*/
 struct hfa384x_commsquality {
-   u16 cq_curr_bss;
-   u16 asl_curr_bss;
-   u16 anl_curr_fc;
+   __le16 cq_curr_bss;
+   __le16 asl_curr_bss;
+   __le16 anl_curr_fc;
 } __packed;
 
 /*-- Information Record: dmbcommsquality --*/
@@ -598,27 +598,27 @@ struct hfa384x_rx_frame {
 
 /*--  Inquiry Frame, Diagnose: Communication Tallies --*/
 struct hfa384x_comm_tallies_16 {
-   u16 txunicastframes;
-   u16 txmulticastframes;
-   u16 txfragments;
-   u16 txunicastoctets;
-   u16 txmulticastoctets;
-   u16 txdeferredtrans;
-   u16 txsingleretryframes;
-   u16 txmultipleretryframes;
-   u16 txretrylimitexceeded;
-   u16 txdiscards;
-   u16 rxunicastframes;
-   u16 rxmulticastframes;
-   u16 rxfragments;
-   u16 rxunicastoctets;
-   u16 rxmulticastoctets;
-   u16 rxfcserrors;
-   u16 rxdiscardsnobuffer;
-   u16 txdiscardswrongsa;
-   u16 rxdiscardswepundecr;
-   u16 rxmsginmsgfrag;
-   u16 rxmsginbadmsgfrag;
+   __le16 txunicastframes;
+   __le16 txmulticastframes;
+   __le16 txfragments;
+   __le16 txunicastoctets;
+   __le16 txmulticastoctets;
+   __le16 txdeferredtrans;
+   __le16 txsingleretryframes;
+   __le16 txmultipleretryframes;
+   __le16 txretrylimitexceeded;
+   __le16 txdiscards;
+   __le16 rxunicastframes;
+   __le16 rxmulticastframes;
+   __le16 rxfragments;
+   __le16 rxunicastoctets;
+   __le16 rxmulticastoctets;
+   __le16 rxfcserrors;
+   __le16 rxdiscardsnobuffer;
+   __le16 txdiscardswrongsa;
+   __le16 rxdiscardswepundecr;
+   __le16 rxmsginmsgfrag;
+   __le16 rxmsginbadmsgfrag;
 } __packed;
 
 struct hfa384x_comm_tallies_32 {
diff --git a/drivers/staging/wlan-ng/prism2sta.c 
b/drivers/staging/wlan-ng/prism2sta.c
index e16da34..5d0495e 100644
--- a/drivers/staging/wlan-ng/prism2sta.c
+++ b/drivers/staging/wlan-ng/prism2sta.c
@@ -991,9 +991,9 @@ static void prism2sta_inf_tallies(struct wlandevice 
*wlandev,
  struct hfa384x_inf_frame *inf)
 {
struct hfa384x *hw = wlandev->priv;
-   u16 *src16;
+   __le16 *src16;
u32 *dst;
-   u32 *src32;
+   __le32 *src32;
int i;
int cnt;
 
@@ -1005,12 +1005,12 @@ static void prism2sta_inf_tallies(struct wlandevice 
*wlandev,
cnt = sizeof(struct hfa384x_comm_tallies_32) / sizeof(u32);
if (inf->framelen > 22) {
dst = (u32 *)>tallies;
-   src32 = (u32 *)>info.commtallies32;
+   src32 = (__le32 *)>info.commtallies32;
for (i = 0; i < cnt; i++, dst++, src32++)
*dst += le32_to_cpu(*src32);
} else {
dst = (u32 *)>tallies;
-   src16 = (u16 *)>info.commtallies16;
+   src16 = (__le16 *)>info.commtallies16;
for (i = 0; i < cnt; i++, dst++, src16++)
*dst += le16_to_cpu(*src16);
}
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: rtl8188eu: Remove extra spaces

2017-03-30 Thread Alfonso Lima Astor
Coding style problem detected by checkpatch.pl
ERROR: space prohibited before that ','

Signed-off-by: Alfonso Lima Astor <alfonsolimaas...@gmail.com>
---
 drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c | 2 +-
 drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c 
b/drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c
index 201c15b..81bf494 100644
--- a/drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c
+++ b/drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c
@@ -733,7 +733,7 @@ void ODM_RA_TxRPT2Handle_8188E(struct odm_dm_struct 
*dm_odm, u8 *TxRPT_Buf, u16
 pRAInfo->RTY[0], pRAInfo->RTY[1],
 pRAInfo->RTY[2], pRAInfo->RTY[3],
 pRAInfo->RTY[4], pRAInfo->DROP,
-macid_entry0 , macid_entry1));
+macid_entry0, macid_entry1));
if (pRAInfo->PTActive) {
if (pRAInfo->RAstage < 5)
odm_RateDecision_8188E(dm_odm, 
pRAInfo);
diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c 
b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
index 0ce7db7..9d1d22a 100644
--- a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
@@ -459,7 +459,7 @@ void Hal_ReadPowerSavingMode88E(struct adapter *padapter, 
u8 *hwinfo, bool AutoL
padapter->pwrctrlpriv.bSupportRemoteWakeup = 
(hwinfo[EEPROM_USB_OPTIONAL_FUNCTION0] & BIT(1)) ? true : false;
 
DBG_88E("%s...bHWPwrPindetect(%x)-bHWPowerdown(%x) , 
bSupportRemoteWakeup(%x)\n", __func__,
-   padapter->pwrctrlpriv.bHWPwrPindetect, 
padapter->pwrctrlpriv.bHWPowerdown , 
padapter->pwrctrlpriv.bSupportRemoteWakeup);
+   padapter->pwrctrlpriv.bHWPwrPindetect, 
padapter->pwrctrlpriv.bHWPowerdown, padapter->pwrctrlpriv.bSupportRemoteWakeup);
 
DBG_88E("### PS params =>  power_mgnt(%x), usbss_enable(%x) 
###\n", padapter->registrypriv.power_mgnt, padapter->registrypriv.usbss_enable);
}
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2] staging: rtl8188eu: Macros with complex values should be enclosed in parentheses

2017-03-29 Thread Alfonso Lima Astor
This macro is not used and also had a style error. I have run
grep and compiled the module to be sure.

Signed-off-by: Alfonso Lima Astor <alfonsolimaas...@gmail.com>
---
 drivers/staging/rtl8188eu/include/rtw_ioctl.h | 6 --
 1 file changed, 6 deletions(-)

diff --git a/drivers/staging/rtl8188eu/include/rtw_ioctl.h 
b/drivers/staging/rtl8188eu/include/rtw_ioctl.h
index a6b1c85..0fa78ed 100644
--- a/drivers/staging/rtl8188eu/include/rtw_ioctl.h
+++ b/drivers/staging/rtl8188eu/include/rtw_ioctl.h
@@ -58,12 +58,6 @@
 #define OID_MP_SEG30xFF818700
 #define OID_MP_SEG40xFF011100
 
-#define DEBUG_OID(dbg, str)\
-   if ((!dbg)) {   \
-   RT_TRACE(_module_rtl871x_ioctl_c_, _drv_info_,  \
-("%s(%d): %s", __func__, __line__, str));  \
-   }
-
 enum oid_type {
QUERY_OID,
SET_OID
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: rtl8188eu: Macro should be enclosed

2017-03-29 Thread Alfonso Lima Astor
Fix style error pointed out by checkpatch.pl:
ERROR: Macros with complex values should be enclosed in
parentheses

I have compiled the module just to be sure. I haven't run it
because I haven't changed any funcionality.

Signed-off-by: Alfonso Lima Astor <alfonsolimaas...@gmail.com>
---
 drivers/staging/rtl8188eu/include/odm_debug.h | 12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8188eu/include/odm_debug.h 
b/drivers/staging/rtl8188eu/include/odm_debug.h
index 687ff3e..fd92f7e 100644
--- a/drivers/staging/rtl8188eu/include/odm_debug.h
+++ b/drivers/staging/rtl8188eu/include/odm_debug.h
@@ -86,11 +86,13 @@
 #endif
 
 #define ODM_RT_TRACE(pDM_Odm, comp, level, fmt)
\
-   if (((comp) & pDM_Odm->DebugComponents) &&  \
-   (level <= pDM_Odm->DebugLevel)) {   \
-   pr_info("[ODM-8188E] ");\
-   RT_PRINTK fmt;  \
-   }
+   do {\
+   if (((comp) & pDM_Odm->DebugComponents) &&  \
+   (level <= pDM_Odm->DebugLevel)) {   \
+   pr_info("[ODM-8188E] ");\
+   RT_PRINTK fmt;  \
+   }   \
+   } while (0)
 
 #define ODM_RT_ASSERT(pDM_Odm, expr, fmt)  \
if (!(expr)) {  \
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/1] staging: rtl8188eu: Macros with complex values should be enclosed in parentheses

2017-03-28 Thread Alfonso Lima Astor
Fix coding style issue

Signed-off-by: Alfonso Lima Astor <alfonsolimaas...@gmail.com>
---
 drivers/staging/rtl8188eu/include/rtw_ioctl.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8188eu/include/rtw_ioctl.h 
b/drivers/staging/rtl8188eu/include/rtw_ioctl.h
index a6b1c85..0c022a5 100644
--- a/drivers/staging/rtl8188eu/include/rtw_ioctl.h
+++ b/drivers/staging/rtl8188eu/include/rtw_ioctl.h
@@ -59,10 +59,10 @@
 #define OID_MP_SEG40xFF011100
 
 #define DEBUG_OID(dbg, str)\
-   if ((!dbg)) {   \
+   (if ((!dbg)) {  \
RT_TRACE(_module_rtl871x_ioctl_c_, _drv_info_,  \
 ("%s(%d): %s", __func__, __line__, str));  \
-   }
+   })
 
 enum oid_type {
QUERY_OID,
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel