Re: [PATCH] drivers: staging: rtl8821ae: Fix spaces required around that '?' errors
From: Joe Perches
Date: Mon Aug 25 2014 - 09:15:26 EST
On Mon, 2014-08-25 at 06:35 -0500, Greg Donald wrote:
> Fix checkpatch.pl spaces required around that '?' errors
It'd be better to convert all parts of the
ternary at the same time.
> diff --git a/drivers/staging/rtl8821ae/btcoexist/HalBtc8812a1Ant.c b/drivers/staging/rtl8821ae/btcoexist/HalBtc8812a1Ant.c
[]
> @@ -652,7 +652,7 @@ halbtc8812a1ant_SetFwDecBtPwr(
> u1Byte buf[5] = {0};
>
> BTC_PRINT(BTC_MSG_ALGORITHM, ALGO_TRACE_FW_EXEC, ("[BTCoex], decrease Bt Power : %s\n",
> - (dec_bt_pwr? "Yes!!":"No!!")));
> + (dec_bt_pwr ? "Yes!!":"No!!")));
(dec_bt_pwr ? "Yes!!" : "No!!")
>
> buf[0] = dataLen;
> buf[1] = 0x3; // OP_Code
> @@ -674,7 +674,7 @@ halbtc8812a1ant_DecBtPwr(
> {
> return;
> BTC_PRINT(BTC_MSG_ALGORITHM, ALGO_TRACE_FW, ("[BTCoex], %s Dec BT power = %s\n",
> - (force_exec? "force to":""), ((dec_bt_pwr)? "ON":"OFF")));
> + (force_exec ? "force to":""), ((dec_bt_pwr) ? "ON":"OFF")));
(force_exec ? "force to" : ""), ((dec_bt_pwr) ? "ON" : "OFF")));
etc...
A subsequent change might be to remove the unnecessary
parentheses like:
force_exec ? "force to" : "", dec_bt_pwr ? "ON" : "OFF");
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/