All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Norris <briannorris@chromium.org>
To: Ping-Ke Shih <pkshih@realtek.com>
Cc: kvalo@codeaurora.org, linux-wireless@vger.kernel.org,
	kevin_yang@realtek.com
Subject: Re: [PATCH v2 1/4] rtw89: fill regd field of limit/limit_ru tables by enum
Date: Mon, 1 Nov 2021 19:06:59 -0700	[thread overview]
Message-ID: <YYCdQwCo3E8hH4c3@google.com> (raw)
In-Reply-To: <20211101093106.28848-2-pkshih@realtek.com>

On Mon, Nov 01, 2021 at 05:31:03PM +0800, Ping-Ke Shih wrote:
> From: Zong-Zhe Yang <kevin_yang@realtek.com>
> 
> This modification just replaces the number filled in the regd field
> with the corresponding enum. No assignment of a value in a table is
> changed. Doing this first is because the follow-up patches may adjust
> the order of enum declarations.
> 
> Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
> ---
>  .../wireless/realtek/rtw89/rtw8852a_table.c   | 10458 ++++++++--------
>  1 file changed, 5229 insertions(+), 5229 deletions(-)
> 
> diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852a_table.c b/drivers/net/wireless/realtek/rtw89/rtw8852a_table.c
> index 3a4fe7207420..c7ebeed043c5 100644
> --- a/drivers/net/wireless/realtek/rtw89/rtw8852a_table.c
> +++ b/drivers/net/wireless/realtek/rtw89/rtw8852a_table.c
> @@ -43384,5248 +43384,5248 @@ static const u8 _txpwr_track_delta_swingidx_2g_cck_a_p[] = {
>  const s8 rtw89_8852a_txpwr_lmt_2g[RTW89_2G_BW_NUM][RTW89_NTX_NUM]
>  				 [RTW89_RS_LMT_NUM][RTW89_BF_NUM]
>  				 [RTW89_REGD_NUM][RTW89_2G_CH_NUM] = {
> -	[0][0][0][0][0][0] = 56,

FWIW, these transformations worked out for me:

Reviewed-by: Brian Norris <briannorris@chromium.org>

These files are still enormous though, which an enormous amount of
repetition. I can't help but think there's a better way to do these
things. For instance, if there's a repeated/shared pattern, one could
just save that array once, and generate the repeated copies at runtime.
Or instead of exposing an enormous const array directly to the "core",
add some kind of abstraction function, where the function can perform
more custom (and presumably more targeted, with less duplication?) logic
to determine the answer.

But that's food for thought for the future.

Brian

  reply	other threads:[~2021-11-02  2:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-01  9:31 [PATCH v2 0/4] rtw89: update power limit and regulatory map tables Ping-Ke Shih
2021-11-01  9:31 ` [PATCH v2 1/4] rtw89: fill regd field of limit/limit_ru tables by enum Ping-Ke Shih
2021-11-02  2:06   ` Brian Norris [this message]
2021-11-03  1:24     ` Pkshih
2021-11-26 16:10   ` Kalle Valo
2021-11-01  9:31 ` [PATCH v2 2/4] rtw89: update rtw89 regulation definition to R58-R31 Ping-Ke Shih
2021-11-01  9:31 ` [PATCH v2 3/4] rtw89: update tx power limit/limit_ru tables to R54 Ping-Ke Shih
2021-11-01  9:31 ` [PATCH v2 4/4] rtw89: update rtw89_regulatory map to R58-R31 Ping-Ke Shih

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=YYCdQwCo3E8hH4c3@google.com \
    --to=briannorris@chromium.org \
    --cc=kevin_yang@realtek.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pkshih@realtek.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.