lkml.org 
[lkml]   [2020]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH 2/6] rtlwifi: Remove unnecessary parenthese in rtl_dbg uses
From
Date
On Mon, 2020-07-27 at 06:07 +0000, Pkshih wrote:
> On Sat, 2020-07-25 at 12:55 -0700, Joe Perches wrote:
> > Make these statements a little simpler.
[]
> > diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
[]
> > @@ -874,11 +874,10 @@ static void halbtc_display_wifi_status(struct
> > btc_coexist *btcoexist,
> > seq_printf(m, "\n %-35s = %s / %s/ %s/ AP=%d ",
> > "Wifi freq/ bw/ traffic",
> > gl_btc_wifi_freq_string[wifi_freq],
> > - ((wifi_under_b_mode) ? "11b" :
> > - gl_btc_wifi_bw_string[wifi_bw]),
> > - ((!wifi_busy) ? "idle" : ((BTC_WIFI_TRAFFIC_TX ==
> > - wifi_traffic_dir) ? "uplink" :
> > - "downlink")),
> > + wifi_under_b_mode ? "11b" : gl_btc_wifi_bw_string[wifi_bw],
> > + (!wifi_busy ? "idle" :
> > + wifi_traffic_dir == BTC_WIFI_TRAFFIC_TX ? "uplink" :
> > + "downlink"),
>
> I think this would be better
>
> + !wifi_busy ? "idle" :
> + (wifi_traffic_dir == BTC_WIFI_TRAFFIC_TX ? "uplink" :
> + "downlink"),

It seems most repeated test1 ? : test2 ? : test3 ?:
uses do not have the style you suggest in the kernel.


\
 
 \ /
  Last update: 2020-07-27 10:29    [W:0.071 / U:2.676 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site