Re: [PATCH] staging: r8188eu: Replace BITn with BIT(n)
From: Greg KH
Date: Tue Aug 10 2021 - 06:21:11 EST
On Mon, Aug 09, 2021 at 01:20:06PM -0500, Larry Finger wrote:
> The driver uses BITn instead of BIT(n). All such usage is converted.
>
> Note that this patch does not address any warnings that checkpatch
> will note. These include missing space around operators and lines
> that are too long. These problems will be addressed in a separate
> patch.
>
> Signed-off-by: Larry Finger <Larry.Finger@xxxxxxxxxxxx>
> ---
Breaks the build:
n file included from drivers/staging/r8188eu/hal/Hal8188EPwrSeq.c:4:
drivers/staging/r8188eu/hal/../include/Hal8188EPwrSeq.h:45:105: error: ‘BIT1’ undeclared here (not in a function); did you mean ‘BIT’?
45 | {0x0006, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_POLLING, BIT1, BIT1},/* wait till 0x04[17] = 1 power ready*/ \
| ^~~~
drivers/staging/r8188eu/hal/Hal8188EPwrSeq.c:12:9: note: in expansion of macro ‘RTL8188E_TRANS_CARDEMU_TO_ACT’
12 | RTL8188E_TRANS_CARDEMU_TO_ACT
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/staging/r8188eu/hal/Hal8188EPwrSeq.c:4:
drivers/staging/r8188eu/hal/../include/Hal8188EPwrSeq.h:46:103: error: ‘BIT0’ undeclared here (not in a function); did you mean ‘BIT’?
46 | {0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT0|BIT1, 0}, /* 0x02[1:0] = 0 reset BB*/ \
| ^~~~
drivers/staging/r8188eu/hal/Hal8188EPwrSeq.c:12:9: note: in expansion of macro ‘RTL8188E_TRANS_CARDEMU_TO_ACT’
12 | RTL8188E_TRANS_CARDEMU_TO_ACT
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/staging/r8188eu/hal/../include/Hal8188EPwrSeq.h:47:103: error: ‘BIT7’ undeclared here (not in a function); did you mean ‘BIT’?
47 | {0x0026, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT7, BIT7}, /*0x24[23] = 2b'01 schmit trigger */ \
| ^~~~
drivers/staging/r8188eu/hal/Hal8188EPwrSeq.c:12:9: note: in expansion of macro ‘RTL8188E_TRANS_CARDEMU_TO_ACT’
12 | RTL8188E_TRANS_CARDEMU_TO_ACT
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/staging/r8188eu/hal/../include/Hal8188EPwrSeq.h:49:103: error: ‘BIT4’ undeclared here (not in a function); did you mean ‘BIT’?
49 | {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT4|BIT3, 0}, /*0x04[12:11] = 2b'00 disable WL suspend*/ \
| ^~~~
drivers/staging/r8188eu/hal/Hal8188EPwrSeq.c:12:9: note: in expansion of macro ‘RTL8188E_TRANS_CARDEMU_TO_ACT’
12 | RTL8188E_TRANS_CARDEMU_TO_ACT
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/staging/r8188eu/hal/../include/Hal8188EPwrSeq.h:49:108: error: ‘BIT3’ undeclared here (not in a function); did you mean ‘BIT’?
49 | {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT4|BIT3, 0}, /*0x04[12:11] = 2b'00 disable WL suspend*/ \
| ^~~~
drivers/staging/r8188eu/hal/Hal8188EPwrSeq.c:12:9: note: in expansion of macro ‘RTL8188E_TRANS_CARDEMU_TO_ACT’
12 | RTL8188E_TRANS_CARDEMU_TO_ACT
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/staging/r8188eu/hal/../include/Hal8188EPwrSeq.h:123:103: error: ‘BIT5’ undeclared here (not in a function); did you mean ‘BIT’?
123 | {0x0553, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT5, BIT5},/*Respond TxOK to scheduler*/ \
| ^~~~
drivers/staging/r8188eu/hal/Hal8188EPwrSeq.c:60:9: note: in expansion of macro ‘RTL8188E_TRANS_ACT_TO_LPS’
60 | RTL8188E_TRANS_ACT_TO_LPS
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/staging/r8188eu/hal/../include/Hal8188EPwrSeq.h:134:103: error: ‘BIT6’ undeclared here (not in a function); did you mean ‘BIT’?
134 | {0x0029, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT6|BIT7, 0}, /*. 0x29[7:6] = 2b'00 enable BB clock*/\
| ^~~~
drivers/staging/r8188eu/hal/Hal8188EPwrSeq.c:67:9: note: in expansion of macro ‘RTL8188E_TRANS_LPS_TO_ACT’
67 | RTL8188E_TRANS_LPS_TO_ACT
| ^~~~~~~~~~~~~~~~~~~~~~~~~
:(