lkml.org 
[lkml]   [2014]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] drivers: staging: rtl8821ae: Fix spaces required around that '?' errors
From
Date
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");




\
 
 \ /
  Last update: 2014-08-25 15:21    [W:0.057 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site