2020-07-18 09:18:35

by B K Karthik

[permalink] [raw]
Subject: [PATCH 3/4] staging: rtl8188eu: include: enclosed macros in do-while loops

enclosed macros starting with if inside do-while loops to
avoid possible if-else logic defects

Signed-off-by: B K Karthik <[email protected]>
---
drivers/staging/rtl8188eu/include/odm_debug.h | 28 +++++++++++--------
1 file changed, 16 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/rtl8188eu/include/odm_debug.h b/drivers/staging/rtl8188eu/include/odm_debug.h
index 857c64b8d2f4..c7a928d396b0 100644
--- a/drivers/staging/rtl8188eu/include/odm_debug.h
+++ b/drivers/staging/rtl8188eu/include/odm_debug.h
@@ -76,20 +76,24 @@
#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)) { \
- pr_info("Assertion failed! %s at ......\n", #expr); \
- pr_info(" ......%s,%s,line=%d\n", __FILE__, \
- __func__, __LINE__); \
- RT_PRINTK fmt; \
- ASSERT(false); \
- }
+ do {
+ if (!(expr)) { \
+ pr_info("Assertion failed! %s at ......\n", #expr); \
+ pr_info(" ......%s,%s,line=%d\n", __FILE__, \
+ __func__, __LINE__); \
+ RT_PRINTK fmt; \
+ ASSERT(false); \
+ }
+ } while (0)

void ODM_InitDebugSetting(struct odm_dm_struct *pDM_Odm);

--
2.20.1


Attachments:
(No filename) (1.55 kB)
signature.asc (673.00 B)
Download all attachments

2020-07-18 12:36:59

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH 3/4] staging: rtl8188eu: include: enclosed macros in do-while loops

Hi K,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on staging/staging-testing]

url: https://github.com/0day-ci/linux/commits/B-K-Karthik/staging-rtl8188eu-include-fixed-multiple-blank-space-coding-style-issues/20200718-172103
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 9d5d041eebe3dcf7591ff7004896c329eb841ca6
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>

All error/warnings (new ones prefixed by >>):

In file included from arch/m68k/include/asm/io_mm.h:25,
from arch/m68k/include/asm/io.h:8,
from include/linux/scatterlist.h:9,
from include/linux/dma-mapping.h:11,
from include/linux/skbuff.h:31,
from include/linux/if_ether.h:19,
from include/uapi/linux/ethtool.h:19,
from include/linux/ethtool.h:18,
from include/linux/netdevice.h:37,
from drivers/staging/rtl8188eu/include/osdep_service.h:23,
from drivers/staging/rtl8188eu/core/rtw_efuse.c:9:
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsb':
arch/m68k/include/asm/raw_io.h:83:7: warning: variable '__w' set but not used [-Wunused-but-set-variable]
83 | ({u8 __w, __v = (b); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:430:3: note: in expansion of macro 'rom_out_8'
430 | rom_out_8(port, *buf++);
| ^~~~~~~~~
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw':
arch/m68k/include/asm/raw_io.h:86:8: warning: variable '__w' set but not used [-Wunused-but-set-variable]
86 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:448:3: note: in expansion of macro 'rom_out_be16'
448 | rom_out_be16(port, *buf++);
| ^~~~~~~~~~~~
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw_swapw':
arch/m68k/include/asm/raw_io.h:90:8: warning: variable '__w' set but not used [-Wunused-but-set-variable]
90 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:466:3: note: in expansion of macro 'rom_out_le16'
466 | rom_out_le16(port, *buf++);
| ^~~~~~~~~~~~
In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/preempt.h:11,
from include/linux/spinlock.h:51,
from drivers/staging/rtl8188eu/include/osdep_service.h:16,
from drivers/staging/rtl8188eu/core/rtw_efuse.c:9:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
In file included from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from include/asm-generic/preempt.h:5,
from ./arch/m68k/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from drivers/staging/rtl8188eu/include/osdep_service.h:16,
from drivers/staging/rtl8188eu/core/rtw_efuse.c:9:
include/linux/dma-mapping.h: In function 'dma_map_resource':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/asm-generic/bug.h:144:27: note: in definition of macro 'WARN_ON_ONCE'
144 | int __ret_warn_once = !!(condition); \
| ^~~~~~~~~
arch/m68k/include/asm/page_mm.h:170:25: note: in expansion of macro 'virt_addr_valid'
170 | #define pfn_valid(pfn) virt_addr_valid(pfn_to_virt(pfn))
| ^~~~~~~~~~~~~~~
include/linux/dma-mapping.h:352:19: note: in expansion of macro 'pfn_valid'
352 | if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
| ^~~~~~~~~
In file included from drivers/staging/rtl8188eu/include/odm_precomp.h:26,
from drivers/staging/rtl8188eu/include/rtl8188e_hal.h:21,
from drivers/staging/rtl8188eu/core/rtw_efuse.c:13:
drivers/staging/rtl8188eu/include/odm_debug.h: At top level:
>> drivers/staging/rtl8188eu/include/odm_debug.h:80:3: error: expected identifier or '(' before 'if'
80 | if (((comp) & pDM_Odm->DebugComponents) && \
| ^~
>> drivers/staging/rtl8188eu/include/odm_debug.h:85:2: error: expected identifier or '(' before '}' token
85 | } while (0)
| ^
>> drivers/staging/rtl8188eu/include/odm_debug.h:85:4: error: expected identifier or '(' before 'while'
85 | } while (0)
| ^~~~~
In file included from include/linux/kernel.h:15,
from include/linux/list.h:9,
from include/linux/preempt.h:11,
from include/linux/spinlock.h:51,
from drivers/staging/rtl8188eu/include/osdep_service.h:16,
from drivers/staging/rtl8188eu/core/rtw_efuse.c:9:
>> drivers/staging/rtl8188eu/include/odm_debug.h:90:48: error: stray '#' in program
90 | pr_info("Assertion failed! %s at ......\n", #expr); \
| ^
include/linux/printk.h:368:34: note: in definition of macro 'pr_info'
368 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~
In file included from drivers/staging/rtl8188eu/include/odm_precomp.h:26,
from drivers/staging/rtl8188eu/include/rtl8188e_hal.h:21,
from drivers/staging/rtl8188eu/core/rtw_efuse.c:13:
drivers/staging/rtl8188eu/include/odm_debug.h:96:2: error: expected identifier or '(' before '}' token
96 | } while (0)
| ^
drivers/staging/rtl8188eu/include/odm_debug.h:96:4: error: expected identifier or '(' before 'while'
96 | } while (0)
| ^~~~~
In file included from drivers/staging/rtl8188eu/include/drv_types.h:41,
from drivers/staging/rtl8188eu/core/rtw_efuse.c:10:
drivers/staging/rtl8188eu/include/rtw_mlme_ext.h:177:3: warning: 'channel_table' defined but not used [-Wunused-const-variable=]
177 | } channel_table[] = { { RT_CHANNEL_DOMAIN_FCC, "US" },
| ^~~~~~~~~~~~~
In file included from drivers/staging/rtl8188eu/include/drv_types.h:26,
from drivers/staging/rtl8188eu/core/rtw_efuse.c:10:
drivers/staging/rtl8188eu/include/rtw_security.h:260:28: warning: 'K' defined but not used [-Wunused-const-variable=]
260 | static const unsigned long K[64] = {
| ^
--
In file included from arch/m68k/include/asm/io_mm.h:25,
from arch/m68k/include/asm/io.h:8,
from include/linux/scatterlist.h:9,
from include/linux/dma-mapping.h:11,
from include/linux/skbuff.h:31,
from include/linux/if_ether.h:19,
from include/uapi/linux/ethtool.h:19,
from include/linux/ethtool.h:18,
from include/linux/netdevice.h:37,
from drivers/staging/rtl8188eu/include/osdep_service.h:23,
from drivers/staging/rtl8188eu/include/odm_precomp.h:17,
from drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c:6:
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsb':
arch/m68k/include/asm/raw_io.h:83:7: warning: variable '__w' set but not used [-Wunused-but-set-variable]
83 | ({u8 __w, __v = (b); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:430:3: note: in expansion of macro 'rom_out_8'
430 | rom_out_8(port, *buf++);
| ^~~~~~~~~
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw':
arch/m68k/include/asm/raw_io.h:86:8: warning: variable '__w' set but not used [-Wunused-but-set-variable]
86 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:448:3: note: in expansion of macro 'rom_out_be16'
448 | rom_out_be16(port, *buf++);
| ^~~~~~~~~~~~
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw_swapw':
arch/m68k/include/asm/raw_io.h:90:8: warning: variable '__w' set but not used [-Wunused-but-set-variable]
90 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:466:3: note: in expansion of macro 'rom_out_le16'
466 | rom_out_le16(port, *buf++);
| ^~~~~~~~~~~~
In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/preempt.h:11,
from include/linux/spinlock.h:51,
from drivers/staging/rtl8188eu/include/osdep_service.h:16,
from drivers/staging/rtl8188eu/include/odm_precomp.h:17,
from drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c:6:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
In file included from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from include/asm-generic/preempt.h:5,
from ./arch/m68k/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from drivers/staging/rtl8188eu/include/osdep_service.h:16,
from drivers/staging/rtl8188eu/include/odm_precomp.h:17,
from drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c:6:
include/linux/dma-mapping.h: In function 'dma_map_resource':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/asm-generic/bug.h:144:27: note: in definition of macro 'WARN_ON_ONCE'
144 | int __ret_warn_once = !!(condition); \
| ^~~~~~~~~
arch/m68k/include/asm/page_mm.h:170:25: note: in expansion of macro 'virt_addr_valid'
170 | #define pfn_valid(pfn) virt_addr_valid(pfn_to_virt(pfn))
| ^~~~~~~~~~~~~~~
include/linux/dma-mapping.h:352:19: note: in expansion of macro 'pfn_valid'
352 | if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
| ^~~~~~~~~
In file included from drivers/staging/rtl8188eu/include/odm_precomp.h:26,
from drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c:6:
drivers/staging/rtl8188eu/include/odm_debug.h: At top level:
>> drivers/staging/rtl8188eu/include/odm_debug.h:80:3: error: expected identifier or '(' before 'if'
80 | if (((comp) & pDM_Odm->DebugComponents) && \
| ^~
>> drivers/staging/rtl8188eu/include/odm_debug.h:85:2: error: expected identifier or '(' before '}' token
85 | } while (0)
| ^
>> drivers/staging/rtl8188eu/include/odm_debug.h:85:4: error: expected identifier or '(' before 'while'
85 | } while (0)
| ^~~~~
In file included from include/linux/kernel.h:15,
from include/linux/list.h:9,
from include/linux/preempt.h:11,
from include/linux/spinlock.h:51,
from drivers/staging/rtl8188eu/include/osdep_service.h:16,
from drivers/staging/rtl8188eu/include/odm_precomp.h:17,
from drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c:6:
>> drivers/staging/rtl8188eu/include/odm_debug.h:90:48: error: stray '#' in program
90 | pr_info("Assertion failed! %s at ......\n", #expr); \
| ^
include/linux/printk.h:368:34: note: in definition of macro 'pr_info'
368 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~
In file included from drivers/staging/rtl8188eu/include/odm_precomp.h:26,
from drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c:6:
drivers/staging/rtl8188eu/include/odm_debug.h:96:2: error: expected identifier or '(' before '}' token
96 | } while (0)
| ^
drivers/staging/rtl8188eu/include/odm_debug.h:96:4: error: expected identifier or '(' before 'while'
96 | } while (0)
| ^~~~~
drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c: In function 'odm_SetTxRPTTiming_8188E':
>> drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c:109:1: error: expected 'while' before 'static'
109 | static int odm_RateDown_8188E(struct odm_dm_struct *dm_odm,
| ^~~~~~
>> drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c:761:1: error: expected declaration or statement at end of input
761 | }
| ^
At top level:
drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c:84:13: warning: 'odm_SetTxRPTTiming_8188E' defined but not used [-Wunused-function]
84 | static void odm_SetTxRPTTiming_8188E(struct odm_dm_struct *dm_odm,
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c:78:11: warning: 'PendingForRateUpFail' defined but not used [-Wunused-variable]
78 | static u8 PendingForRateUpFail[5] = {2, 10, 24, 40, 60};
| ^~~~~~~~~~~~~~~~~~~~
drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c:72:11: warning: 'DROPING_NECESSARY' defined but not used [-Wunused-variable]
72 | static u8 DROPING_NECESSARY[RATESIZE] = {
| ^~~~~~~~~~~~~~~~~
drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c:66:12: warning: 'N_THRESHOLD_LOW' defined but not used [-Wunused-variable]
66 | static u16 N_THRESHOLD_LOW[RATESIZE] = {
| ^~~~~~~~~~~~~~~
drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c:61:12: warning: 'N_THRESHOLD_HIGH' defined but not used [-Wunused-variable]
61 | static u16 N_THRESHOLD_HIGH[RATESIZE] = {
| ^~~~~~~~~~~~~~~~
drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c:55:11: warning: 'RSSI_THRESHOLD' defined but not used [-Wunused-variable]
55 | static u8 RSSI_THRESHOLD[RATESIZE] = {
| ^~~~~~~~~~~~~~
drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c:49:11: warning: 'RETRY_PENALTY_UP_IDX' defined but not used [-Wunused-variable]
49 | static u8 RETRY_PENALTY_UP_IDX[RATESIZE] = {
| ^~~~~~~~~~~~~~~~~~~~
drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c:39:11: warning: 'RETRY_PENALTY_IDX' defined but not used [-Wunused-variable]
39 | static u8 RETRY_PENALTY_IDX[2][RATESIZE] = {
| ^~~~~~~~~~~~~~~~~
drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c:36:11: warning: 'PT_PENALTY' defined but not used [-Wunused-variable]
36 | static u8 PT_PENALTY[RETRYSIZE + 1] = {34, 31, 30, 24, 0, 32};
| ^~~~~~~~~~
drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c:10:11: warning: 'RETRY_PENALTY' defined but not used [-Wunused-variable]
10 | static u8 RETRY_PENALTY[PERENTRY][RETRYSIZE + 1] = {
| ^~~~~~~~~~~~~
In file included from drivers/staging/rtl8188eu/include/drv_types.h:41,
from drivers/staging/rtl8188eu/include/odm_precomp.h:18,
from drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c:6:
drivers/staging/rtl8188eu/include/rtw_mlme_ext.h:177:3: warning: 'channel_table' defined but not used [-Wunused-const-variable=]
177 | } channel_table[] = { { RT_CHANNEL_DOMAIN_FCC, "US" },
| ^~~~~~~~~~~~~
In file included from drivers/staging/rtl8188eu/include/drv_types.h:26,
from drivers/staging/rtl8188eu/include/odm_precomp.h:18,
from drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c:6:
drivers/staging/rtl8188eu/include/rtw_security.h:260:28: warning: 'K' defined but not used [-Wunused-const-variable=]
260 | static const unsigned long K[64] = {
| ^
--
In file included from arch/m68k/include/asm/io_mm.h:25,
from arch/m68k/include/asm/io.h:8,
from include/linux/scatterlist.h:9,
from include/linux/dma-mapping.h:11,
from include/linux/skbuff.h:31,
from include/linux/if_ether.h:19,
from include/uapi/linux/ethtool.h:19,
from include/linux/ethtool.h:18,
from include/linux/netdevice.h:37,
from drivers/staging/rtl8188eu/include/osdep_service.h:23,
from drivers/staging/rtl8188eu/include/odm_precomp.h:17,
from drivers/staging/rtl8188eu/hal/odm.c:8:
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsb':
arch/m68k/include/asm/raw_io.h:83:7: warning: variable '__w' set but not used [-Wunused-but-set-variable]
83 | ({u8 __w, __v = (b); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:430:3: note: in expansion of macro 'rom_out_8'
430 | rom_out_8(port, *buf++);
| ^~~~~~~~~
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw':
arch/m68k/include/asm/raw_io.h:86:8: warning: variable '__w' set but not used [-Wunused-but-set-variable]
86 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:448:3: note: in expansion of macro 'rom_out_be16'
448 | rom_out_be16(port, *buf++);
| ^~~~~~~~~~~~
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw_swapw':
arch/m68k/include/asm/raw_io.h:90:8: warning: variable '__w' set but not used [-Wunused-but-set-variable]
90 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:466:3: note: in expansion of macro 'rom_out_le16'
466 | rom_out_le16(port, *buf++);
| ^~~~~~~~~~~~
In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/preempt.h:11,
from include/linux/spinlock.h:51,
from drivers/staging/rtl8188eu/include/osdep_service.h:16,
from drivers/staging/rtl8188eu/include/odm_precomp.h:17,
from drivers/staging/rtl8188eu/hal/odm.c:8:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
In file included from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from include/asm-generic/preempt.h:5,
from ./arch/m68k/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from drivers/staging/rtl8188eu/include/osdep_service.h:16,
from drivers/staging/rtl8188eu/include/odm_precomp.h:17,
from drivers/staging/rtl8188eu/hal/odm.c:8:
include/linux/dma-mapping.h: In function 'dma_map_resource':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/asm-generic/bug.h:144:27: note: in definition of macro 'WARN_ON_ONCE'
144 | int __ret_warn_once = !!(condition); \
| ^~~~~~~~~
arch/m68k/include/asm/page_mm.h:170:25: note: in expansion of macro 'virt_addr_valid'
170 | #define pfn_valid(pfn) virt_addr_valid(pfn_to_virt(pfn))
| ^~~~~~~~~~~~~~~
include/linux/dma-mapping.h:352:19: note: in expansion of macro 'pfn_valid'
352 | if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
| ^~~~~~~~~
In file included from drivers/staging/rtl8188eu/include/odm_precomp.h:26,
from drivers/staging/rtl8188eu/hal/odm.c:8:
drivers/staging/rtl8188eu/include/odm_debug.h: At top level:
>> drivers/staging/rtl8188eu/include/odm_debug.h:80:3: error: expected identifier or '(' before 'if'
80 | if (((comp) & pDM_Odm->DebugComponents) && \
| ^~
>> drivers/staging/rtl8188eu/include/odm_debug.h:85:2: error: expected identifier or '(' before '}' token
85 | } while (0)
| ^
>> drivers/staging/rtl8188eu/include/odm_debug.h:85:4: error: expected identifier or '(' before 'while'
85 | } while (0)
| ^~~~~
In file included from include/linux/kernel.h:15,
from include/linux/list.h:9,
from include/linux/preempt.h:11,
from include/linux/spinlock.h:51,
from drivers/staging/rtl8188eu/include/osdep_service.h:16,
from drivers/staging/rtl8188eu/include/odm_precomp.h:17,
from drivers/staging/rtl8188eu/hal/odm.c:8:
>> drivers/staging/rtl8188eu/include/odm_debug.h:90:48: error: stray '#' in program
90 | pr_info("Assertion failed! %s at ......\n", #expr); \
| ^
include/linux/printk.h:368:34: note: in definition of macro 'pr_info'
368 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~
In file included from drivers/staging/rtl8188eu/include/odm_precomp.h:26,
from drivers/staging/rtl8188eu/hal/odm.c:8:
drivers/staging/rtl8188eu/include/odm_debug.h:96:2: error: expected identifier or '(' before '}' token
96 | } while (0)
| ^
drivers/staging/rtl8188eu/include/odm_debug.h:96:4: error: expected identifier or '(' before 'while'
96 | } while (0)
| ^~~~~
>> drivers/staging/rtl8188eu/hal/odm.c:150:6: warning: no previous prototype for 'ODM_InitDebugSetting' [-Wmissing-prototypes]
150 | void ODM_InitDebugSetting(struct odm_dm_struct *pDM_Odm)
| ^~~~~~~~~~~~~~~~~~~~
drivers/staging/rtl8188eu/hal/odm.c: In function 'odm_CmnInfoInit_Debug':
>> drivers/staging/rtl8188eu/hal/odm.c:268:1: error: expected 'while' before 'void'
268 | void odm_CmnInfoHook_Debug(struct odm_dm_struct *pDM_Odm)
| ^~~~
>> drivers/staging/rtl8188eu/hal/odm.c:1100:1: error: expected declaration or statement at end of input
1100 | }
| ^
>> drivers/staging/rtl8188eu/hal/odm.c:1100:1: error: expected declaration or statement at end of input
>> drivers/staging/rtl8188eu/hal/odm.c:1100:1: error: expected declaration or statement at end of input
>> drivers/staging/rtl8188eu/hal/odm.c:1100:1: error: expected declaration or statement at end of input
>> drivers/staging/rtl8188eu/hal/odm.c:1100:1: error: expected declaration or statement at end of input
>> drivers/staging/rtl8188eu/hal/odm.c:1100:1: error: expected declaration or statement at end of input
>> drivers/staging/rtl8188eu/hal/odm.c:1100:1: error: expected declaration or statement at end of input
>> drivers/staging/rtl8188eu/hal/odm.c:1100:1: error: expected declaration or statement at end of input
>> drivers/staging/rtl8188eu/hal/odm.c:1100:1: error: expected declaration or statement at end of input
>> drivers/staging/rtl8188eu/hal/odm.c:1100:1: error: expected declaration or statement at end of input
>> drivers/staging/rtl8188eu/hal/odm.c:1100:1: error: expected declaration or statement at end of input
>> drivers/staging/rtl8188eu/hal/odm.c:1100:1: error: expected declaration or statement at end of input
>> drivers/staging/rtl8188eu/hal/odm.c:1100:1: error: expected declaration or statement at end of input
>> drivers/staging/rtl8188eu/hal/odm.c:1100:1: error: expected declaration or statement at end of input
At top level:
drivers/staging/rtl8188eu/hal/odm.c:14:12: warning: 'EDCAParam' defined but not used [-Wunused-variable]
14 | static u32 EDCAParam[HT_IOT_PEER_MAX][3] = {
| ^~~~~~~~~
In file included from drivers/staging/rtl8188eu/include/drv_types.h:41,
from drivers/staging/rtl8188eu/include/odm_precomp.h:18,
from drivers/staging/rtl8188eu/hal/odm.c:8:
drivers/staging/rtl8188eu/include/rtw_mlme_ext.h:177:3: warning: 'channel_table' defined but not used [-Wunused-const-variable=]
177 | } channel_table[] = { { RT_CHANNEL_DOMAIN_FCC, "US" },
| ^~~~~~~~~~~~~
In file included from drivers/staging/rtl8188eu/include/drv_types.h:26,
from drivers/staging/rtl8188eu/include/odm_precomp.h:18,
from drivers/staging/rtl8188eu/hal/odm.c:8:
drivers/staging/rtl8188eu/include/rtw_security.h:260:28: warning: 'K' defined but not used [-Wunused-const-variable=]
260 | static const unsigned long K[64] = {
| ^
..

vim +80 drivers/staging/rtl8188eu/include/odm_debug.h

f9f08d70b0081c Larry Finger 2013-08-21 77
f9f08d70b0081c Larry Finger 2013-08-21 78 #define ODM_RT_TRACE(pDM_Odm, comp, level, fmt) \
14200067aff819 B K Karthik 2020-07-18 79 do {
f9f08d70b0081c Larry Finger 2013-08-21 @80 if (((comp) & pDM_Odm->DebugComponents) && \
f9f08d70b0081c Larry Finger 2013-08-21 81 (level <= pDM_Odm->DebugLevel)) { \
c9e27530b25fd8 Mahati Chamarthy 2014-10-04 82 pr_info("[ODM-8188E] "); \
f9f08d70b0081c Larry Finger 2013-08-21 83 RT_PRINTK fmt; \
f9f08d70b0081c Larry Finger 2013-08-21 84 }
14200067aff819 B K Karthik 2020-07-18 @85 } while (0)
f9f08d70b0081c Larry Finger 2013-08-21 86
f9f08d70b0081c Larry Finger 2013-08-21 87 #define ODM_RT_ASSERT(pDM_Odm, expr, fmt) \
14200067aff819 B K Karthik 2020-07-18 88 do {
f9f08d70b0081c Larry Finger 2013-08-21 89 if (!(expr)) { \
c9e27530b25fd8 Mahati Chamarthy 2014-10-04 @90 pr_info("Assertion failed! %s at ......\n", #expr); \
c9e27530b25fd8 Mahati Chamarthy 2014-10-04 91 pr_info(" ......%s,%s,line=%d\n", __FILE__, \
f9f08d70b0081c Larry Finger 2013-08-21 92 __func__, __LINE__); \
f9f08d70b0081c Larry Finger 2013-08-21 93 RT_PRINTK fmt; \
f9f08d70b0081c Larry Finger 2013-08-21 94 ASSERT(false); \
f9f08d70b0081c Larry Finger 2013-08-21 95 }
14200067aff819 B K Karthik 2020-07-18 96 } while (0)
f9f08d70b0081c Larry Finger 2013-08-21 97

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]


Attachments:
(No filename) (29.91 kB)
.config.gz (55.96 kB)
Download all attachments

2020-07-18 18:06:28

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH 3/4] staging: rtl8188eu: include: enclosed macros in do-while loops

Hi K,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on staging/staging-testing]

url: https://github.com/0day-ci/linux/commits/B-K-Karthik/staging-rtl8188eu-include-fixed-multiple-blank-space-coding-style-issues/20200718-172103
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 9d5d041eebe3dcf7591ff7004896c329eb841ca6
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ed6b578040a85977026c93bf4188f996148f3218)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>

All error/warnings (new ones prefixed by >>):

In file included from drivers/staging/rtl8188eu/core/rtw_sreset.c:8:
In file included from drivers/staging/rtl8188eu/include/rtw_sreset.h:17:
In file included from drivers/staging/rtl8188eu/include/rtl8188e_hal.h:21:
In file included from drivers/staging/rtl8188eu/include/odm_precomp.h:26:
>> drivers/staging/rtl8188eu/include/odm_debug.h:80:3: error: expected identifier or '('
if (((comp) & pDM_Odm->DebugComponents) && \
^
>> drivers/staging/rtl8188eu/include/odm_debug.h:85:2: error: extraneous closing brace ('}')
} while (0)
^
drivers/staging/rtl8188eu/include/odm_debug.h:85:4: error: expected identifier or '('
} while (0)
^
drivers/staging/rtl8188eu/include/odm_debug.h:96:2: error: extraneous closing brace ('}')
} while (0)
^
drivers/staging/rtl8188eu/include/odm_debug.h:96:4: error: expected identifier or '('
} while (0)
^
5 errors generated.
--
In file included from drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c:6:
In file included from drivers/staging/rtl8188eu/include/odm_precomp.h:26:
>> drivers/staging/rtl8188eu/include/odm_debug.h:80:3: error: expected identifier or '('
if (((comp) & pDM_Odm->DebugComponents) && \
^
>> drivers/staging/rtl8188eu/include/odm_debug.h:85:2: error: extraneous closing brace ('}')
} while (0)
^
drivers/staging/rtl8188eu/include/odm_debug.h:85:4: error: expected identifier or '('
} while (0)
^
drivers/staging/rtl8188eu/include/odm_debug.h:96:2: error: extraneous closing brace ('}')
} while (0)
^
drivers/staging/rtl8188eu/include/odm_debug.h:96:4: error: expected identifier or '('
} while (0)
^
>> drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c:109:1: error: expected 'while' in do/while loop
static int odm_RateDown_8188E(struct odm_dm_struct *dm_odm,
^
drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c:105:2: note: to match this 'do'
ODM_RT_TRACE(dm_odm, ODM_COMP_RATE_ADAPTIVE, ODM_DBG_LOUD,
^
drivers/staging/rtl8188eu/include/odm_debug.h:79:2: note: expanded from macro 'ODM_RT_TRACE'
do {
^
>> drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c:761:2: error: expected '}'
}
^
drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c:86:1: note: to match this '{'
{
^
7 errors generated.
--
In file included from drivers/staging/rtl8188eu/hal/odm.c:8:
In file included from drivers/staging/rtl8188eu/include/odm_precomp.h:26:
>> drivers/staging/rtl8188eu/include/odm_debug.h:80:3: error: expected identifier or '('
if (((comp) & pDM_Odm->DebugComponents) && \
^
>> drivers/staging/rtl8188eu/include/odm_debug.h:85:2: error: extraneous closing brace ('}')
} while (0)
^
drivers/staging/rtl8188eu/include/odm_debug.h:85:4: error: expected identifier or '('
} while (0)
^
drivers/staging/rtl8188eu/include/odm_debug.h:96:2: error: extraneous closing brace ('}')
} while (0)
^
drivers/staging/rtl8188eu/include/odm_debug.h:96:4: error: expected identifier or '('
} while (0)
^
>> drivers/staging/rtl8188eu/hal/odm.c:150:6: warning: no previous prototype for function 'ODM_InitDebugSetting' [-Wmissing-prototypes]
void ODM_InitDebugSetting(struct odm_dm_struct *pDM_Odm)
^
drivers/staging/rtl8188eu/hal/odm.c:150:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void ODM_InitDebugSetting(struct odm_dm_struct *pDM_Odm)
^
static
>> drivers/staging/rtl8188eu/hal/odm.c:268:1: error: expected 'while' in do/while loop
void odm_CmnInfoHook_Debug(struct odm_dm_struct *pDM_Odm)
^
drivers/staging/rtl8188eu/hal/odm.c:265:2: note: to match this 'do'
ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("bDualMacSmartConcurrent=%d\n", pDM_Odm->bDualMacSmartConcurrent));
^
drivers/staging/rtl8188eu/include/odm_debug.h:79:2: note: expanded from macro 'ODM_RT_TRACE'
do {
^
>> drivers/staging/rtl8188eu/hal/odm.c:1100:2: error: expected '}'
}
^
drivers/staging/rtl8188eu/hal/odm.c:264:2: note: to match this '{'
ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("bWIFITest=%d\n", pDM_Odm->bWIFITest));
^
drivers/staging/rtl8188eu/include/odm_debug.h:79:5: note: expanded from macro 'ODM_RT_TRACE'
do {
^
drivers/staging/rtl8188eu/hal/odm.c:1100:2: error: expected 'while' in do/while loop
}
^
drivers/staging/rtl8188eu/hal/odm.c:264:2: note: to match this 'do'
ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("bWIFITest=%d\n", pDM_Odm->bWIFITest));
^
drivers/staging/rtl8188eu/include/odm_debug.h:79:2: note: expanded from macro 'ODM_RT_TRACE'
do {
^
>> drivers/staging/rtl8188eu/hal/odm.c:1100:2: error: expected '}'
}
^
drivers/staging/rtl8188eu/hal/odm.c:263:2: note: to match this '{'
ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("bInHctTest=%d\n", pDM_Odm->bInHctTest));
^
drivers/staging/rtl8188eu/include/odm_debug.h:79:5: note: expanded from macro 'ODM_RT_TRACE'
do {
^
drivers/staging/rtl8188eu/hal/odm.c:1100:2: error: expected 'while' in do/while loop
}
^
drivers/staging/rtl8188eu/hal/odm.c:263:2: note: to match this 'do'
ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("bInHctTest=%d\n", pDM_Odm->bInHctTest));
^
drivers/staging/rtl8188eu/include/odm_debug.h:79:2: note: expanded from macro 'ODM_RT_TRACE'
do {
^
>> drivers/staging/rtl8188eu/hal/odm.c:1100:2: error: expected '}'
}
^
drivers/staging/rtl8188eu/hal/odm.c:262:2: note: to match this '{'
ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("PatchID=%d\n", pDM_Odm->PatchID));
^
drivers/staging/rtl8188eu/include/odm_debug.h:79:5: note: expanded from macro 'ODM_RT_TRACE'
do {
^
drivers/staging/rtl8188eu/hal/odm.c:1100:2: error: expected 'while' in do/while loop
}
^
drivers/staging/rtl8188eu/hal/odm.c:262:2: note: to match this 'do'
ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("PatchID=%d\n", pDM_Odm->PatchID));
^
drivers/staging/rtl8188eu/include/odm_debug.h:79:2: note: expanded from macro 'ODM_RT_TRACE'
do {
^
>> drivers/staging/rtl8188eu/hal/odm.c:1100:2: error: expected '}'
}
^
drivers/staging/rtl8188eu/hal/odm.c:261:2: note: to match this '{'
ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("ExtTRSW=%d\n", pDM_Odm->ExtTRSW));
^
drivers/staging/rtl8188eu/include/odm_debug.h:79:5: note: expanded from macro 'ODM_RT_TRACE'
do {
^
drivers/staging/rtl8188eu/hal/odm.c:1100:2: error: expected 'while' in do/while loop
}
^
drivers/staging/rtl8188eu/hal/odm.c:261:2: note: to match this 'do'
ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("ExtTRSW=%d\n", pDM_Odm->ExtTRSW));
^
drivers/staging/rtl8188eu/include/odm_debug.h:79:2: note: expanded from macro 'ODM_RT_TRACE'
do {
^
>> drivers/staging/rtl8188eu/hal/odm.c:1100:2: error: expected '}'
}
^
drivers/staging/rtl8188eu/hal/odm.c:260:2: note: to match this '{'
ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("ExtPA=%d\n", pDM_Odm->ExtPA));
^
drivers/staging/rtl8188eu/include/odm_debug.h:79:5: note: expanded from macro 'ODM_RT_TRACE'
do {
^
drivers/staging/rtl8188eu/hal/odm.c:1100:2: error: expected 'while' in do/while loop
}
^
drivers/staging/rtl8188eu/hal/odm.c:260:2: note: to match this 'do'
ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("ExtPA=%d\n", pDM_Odm->ExtPA));
^
drivers/staging/rtl8188eu/include/odm_debug.h:79:2: note: expanded from macro 'ODM_RT_TRACE'
do {
^
>> drivers/staging/rtl8188eu/hal/odm.c:1100:2: error: expected '}'
}
^
drivers/staging/rtl8188eu/hal/odm.c:259:2: note: to match this '{'
ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("ExtLNA=%d\n", pDM_Odm->ExtLNA));
^
drivers/staging/rtl8188eu/include/odm_debug.h:79:5: note: expanded from macro 'ODM_RT_TRACE'
do {
^
drivers/staging/rtl8188eu/hal/odm.c:1100:2: error: expected 'while' in do/while loop
}
^
drivers/staging/rtl8188eu/hal/odm.c:259:2: note: to match this 'do'
ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("ExtLNA=%d\n", pDM_Odm->ExtLNA));
^
drivers/staging/rtl8188eu/include/odm_debug.h:79:2: note: expanded from macro 'ODM_RT_TRACE'
do {
^
>> drivers/staging/rtl8188eu/hal/odm.c:1100:2: error: expected '}'
}
^
drivers/staging/rtl8188eu/hal/odm.c:258:2: note: to match this '{'
ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("BoardType=%d\n", pDM_Odm->BoardType));
^
drivers/staging/rtl8188eu/include/odm_debug.h:79:5: note: expanded from macro 'ODM_RT_TRACE'
do {
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
--
In file included from drivers/staging/rtl8188eu/hal/odm_rtl8188e.c:8:
In file included from drivers/staging/rtl8188eu/include/odm_precomp.h:26:
>> drivers/staging/rtl8188eu/include/odm_debug.h:80:3: error: expected identifier or '('
if (((comp) & pDM_Odm->DebugComponents) && \
^
>> drivers/staging/rtl8188eu/include/odm_debug.h:85:2: error: extraneous closing brace ('}')
} while (0)
^
drivers/staging/rtl8188eu/include/odm_debug.h:85:4: error: expected identifier or '('
} while (0)
^
drivers/staging/rtl8188eu/include/odm_debug.h:96:2: error: extraneous closing brace ('}')
} while (0)
^
drivers/staging/rtl8188eu/include/odm_debug.h:96:4: error: expected identifier or '('
} while (0)
^
>> drivers/staging/rtl8188eu/hal/odm_rtl8188e.c:323:3: error: expected 'while' in do/while loop
return;
^
drivers/staging/rtl8188eu/hal/odm_rtl8188e.c:313:4: note: to match this 'do'
ODM_RT_TRACE(dm_odm, ODM_COMP_ANT_DIV, ODM_DBG_LOUD,
^
drivers/staging/rtl8188eu/include/odm_debug.h:79:2: note: expanded from macro 'ODM_RT_TRACE'
do {
^
drivers/staging/rtl8188eu/hal/odm_rtl8188e.c:338:2: error: expected 'while' in do/while loop
if ((dm_odm->AntDivType == CG_TRX_HW_ANTDIV) ||
^
drivers/staging/rtl8188eu/hal/odm_rtl8188e.c:327:3: note: to match this 'do'
ODM_RT_TRACE(dm_odm, ODM_COMP_ANT_DIV, ODM_DBG_LOUD,
^
drivers/staging/rtl8188eu/include/odm_debug.h:79:2: note: expanded from macro 'ODM_RT_TRACE'
do {
^
>> drivers/staging/rtl8188eu/hal/odm_rtl8188e.c:341:2: error: expected '}'
}
^
drivers/staging/rtl8188eu/hal/odm_rtl8188e.c:310:3: note: to match this '{'
ODM_RT_TRACE(dm_odm, ODM_COMP_ANT_DIV, ODM_DBG_LOUD,
^
drivers/staging/rtl8188eu/include/odm_debug.h:79:5: note: expanded from macro 'ODM_RT_TRACE'
do {
^
drivers/staging/rtl8188eu/hal/odm_rtl8188e.c:341:2: error: expected 'while' in do/while loop
}
^
drivers/staging/rtl8188eu/hal/odm_rtl8188e.c:310:3: note: to match this 'do'
ODM_RT_TRACE(dm_odm, ODM_COMP_ANT_DIV, ODM_DBG_LOUD,
^
drivers/staging/rtl8188eu/include/odm_debug.h:79:2: note: expanded from macro 'ODM_RT_TRACE'
do {
^
>> drivers/staging/rtl8188eu/hal/odm_rtl8188e.c:341:2: error: expected '}'
}
^
drivers/staging/rtl8188eu/hal/odm_rtl8188e.c:309:24: note: to match this '{'
if (!dm_odm->bLinked) {
^
>> drivers/staging/rtl8188eu/hal/odm_rtl8188e.c:341:2: error: expected '}'
}
^
drivers/staging/rtl8188eu/hal/odm_rtl8188e.c:302:1: note: to match this '{'
{
^
11 errors generated.
--
In file included from drivers/staging/rtl8188eu/hal/rtl8188e_dm.c:19:
In file included from drivers/staging/rtl8188eu/include/rtl8188e_hal.h:21:
In file included from drivers/staging/rtl8188eu/include/odm_precomp.h:26:
>> drivers/staging/rtl8188eu/include/odm_debug.h:80:3: error: expected identifier or '('
if (((comp) & pDM_Odm->DebugComponents) && \
^
>> drivers/staging/rtl8188eu/include/odm_debug.h:85:2: error: extraneous closing brace ('}')
} while (0)
^
drivers/staging/rtl8188eu/include/odm_debug.h:85:4: error: expected identifier or '('
} while (0)
^
drivers/staging/rtl8188eu/include/odm_debug.h:96:2: error: extraneous closing brace ('}')
} while (0)
^
drivers/staging/rtl8188eu/include/odm_debug.h:96:4: error: expected identifier or '('
} while (0)
^
>> drivers/staging/rtl8188eu/hal/rtl8188e_dm.c:172:2: error: implicit declaration of function 'ODM_InitDebugSetting' [-Werror,-Wimplicit-function-declaration]
ODM_InitDebugSetting(podmpriv);
^
6 errors generated.
--
In file included from drivers/staging/rtl8188eu/hal/phy.c:11:
In file included from drivers/staging/rtl8188eu/include/rtl8188e_hal.h:21:
In file included from drivers/staging/rtl8188eu/include/odm_precomp.h:26:
>> drivers/staging/rtl8188eu/include/odm_debug.h:80:3: error: expected identifier or '('
if (((comp) & pDM_Odm->DebugComponents) && \
^
>> drivers/staging/rtl8188eu/include/odm_debug.h:85:2: error: extraneous closing brace ('}')
} while (0)
^
drivers/staging/rtl8188eu/include/odm_debug.h:85:4: error: expected identifier or '('
} while (0)
^
drivers/staging/rtl8188eu/include/odm_debug.h:96:2: error: extraneous closing brace ('}')
} while (0)
^
drivers/staging/rtl8188eu/include/odm_debug.h:96:4: error: expected identifier or '('
} while (0)
^
>> drivers/staging/rtl8188eu/hal/phy.c:321:4: error: expected 'while' in do/while loop
} else if (type == 1) { /* For CCK adjust. */
^
drivers/staging/rtl8188eu/hal/phy.c:307:3: note: to match this 'do'
ODM_RT_TRACE(dm_odm, ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,
^
drivers/staging/rtl8188eu/include/odm_debug.h:79:2: note: expanded from macro 'ODM_RT_TRACE'
do {
^
>> drivers/staging/rtl8188eu/hal/phy.c:1335:2: error: expected '}'
}
^
drivers/staging/rtl8188eu/hal/phy.c:306:17: note: to match this '{'
if (type == 0) { /* For OFDM adjust */
^
>> drivers/staging/rtl8188eu/hal/phy.c:1335:2: error: expected '}'
}
^
drivers/staging/rtl8188eu/hal/phy.c:303:1: note: to match this '{'
{
^
8 errors generated.

vim +80 drivers/staging/rtl8188eu/include/odm_debug.h

f9f08d70b0081c Larry Finger 2013-08-21 77
f9f08d70b0081c Larry Finger 2013-08-21 78 #define ODM_RT_TRACE(pDM_Odm, comp, level, fmt) \
14200067aff819 B K Karthik 2020-07-18 79 do {
f9f08d70b0081c Larry Finger 2013-08-21 @80 if (((comp) & pDM_Odm->DebugComponents) && \
f9f08d70b0081c Larry Finger 2013-08-21 81 (level <= pDM_Odm->DebugLevel)) { \
c9e27530b25fd8 Mahati Chamarthy 2014-10-04 82 pr_info("[ODM-8188E] "); \
f9f08d70b0081c Larry Finger 2013-08-21 83 RT_PRINTK fmt; \
f9f08d70b0081c Larry Finger 2013-08-21 84 }
14200067aff819 B K Karthik 2020-07-18 @85 } while (0)
f9f08d70b0081c Larry Finger 2013-08-21 86

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]


Attachments:
(No filename) (17.60 kB)
.config.gz (73.61 kB)
Download all attachments