lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e25e1e06fbe549dc9e9b48719f66653b@realtek.com>
Date: Thu, 17 Oct 2024 07:06:23 +0000
From: Ping-Ke Shih <pkshih@...ltek.com>
To: Mohammed Anees <pvmohammedanees2003@...il.com>
CC: "kvalo@...nel.org" <kvalo@...nel.org>,
        "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>,
        "linux-wireless@...r.kernel.org"
	<linux-wireless@...r.kernel.org>
Subject: RE: [PATCH] wifi: rtw88: Refactor looping in rtw_phy_store_tx_power_by_rate

Mohammed Anees <pvmohammedanees2003@...il.com> 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.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ