Search Linux Wireless

RE: [PATCH] wifi: rtw88: Refactor looping in rtw_phy_store_tx_power_by_rate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mohammed Anees <pvmohammedanees2003@xxxxxxxxx> wrote:
> Oops, I sent over the wrong patch with typo,
> I'll make sure to fix that in the next version.
> 
> > I feel compilers can optimize the check for the band, and we can just remove
> > the else condition. Or
> >   if (2ghz)
> >      foo_2g();
> >   else
> >      foo_5g();
> 
> I do agree with that but I feel, it would be
> better to make it independent of compiler
> optimization, thoughts?
> 
> Let me know what you think is better, that is
> whether letting it be if - else, or using a
> pointer.

Using a pointer looks delicate and optimized. The if-else code is simple to
read. Since this chunk is small, I don't bias one of them. If I must choose
one, I vote if-else.






[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux