mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: Mohammed Anees <pvmohammedanees2003@gmail.com>
Cc: "kvalo@kernel.org" <kvalo@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: RE: [PATCH] wifi: rtw88: Refactor looping in rtw_phy_store_tx_power_by_rate
Date: Thu, 17 Oct 2024 07:06:23 +0000	[thread overview]
Message-ID: <e25e1e06fbe549dc9e9b48719f66653b@realtek.com> (raw)
In-Reply-To: <20241017065645.5409-1-pvmohammedanees2003@gmail.com>

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


  reply	other threads:[~2024-10-17  7:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-16  6:06 Mohammed Anees
2024-10-17  1:21 ` Ping-Ke Shih
2024-10-17  6:56   ` Mohammed Anees
2024-10-17  7:06     ` Ping-Ke Shih [this message]
2024-10-17  7:12       ` Mohammed Anees
2024-10-17  3:19 ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e25e1e06fbe549dc9e9b48719f66653b@realtek.com \
    --to=pkshih@realtek.com \
    --cc=kvalo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pvmohammedanees2003@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®