netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Loic Poulain <loic.poulain@linaro.org>
To: "Bryan O'Donoghue" <bryan.odonoghue@linaro.org>
Cc: kvalo@kernel.org, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, wcn36xx@lists.infradead.org,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH v2 1/4] wcn36xx: Rename clunky firmware feature bit enum
Date: Wed, 20 Jul 2022 09:14:22 +0200	[thread overview]
Message-ID: <CAMZdPi8RpNvycWx7rMMSY31FDkW2Dcyw0jC-eQKKL+rzzit2Gw@mail.gmail.com> (raw)
In-Reply-To: <20220719143302.2071223-2-bryan.odonoghue@linaro.org>

On Tue, 19 Jul 2022 at 16:33, Bryan O'Donoghue
<bryan.odonoghue@linaro.org> wrote:
>
> The enum name "place_holder_in_cap_bitmap" is self descriptively asking to
> be changed to something else.
>
> Rename place_holder_in_cap_bitmap to wcn36xx_firmware_feat_caps so that the
> contents and intent of the enum is obvious.
>
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

Reviewed-by: Loic Poulain <loic.poulain@linaro.org>

> ---
>  drivers/net/wireless/ath/wcn36xx/hal.h  | 2 +-
>  drivers/net/wireless/ath/wcn36xx/main.c | 2 +-
>  drivers/net/wireless/ath/wcn36xx/smd.c  | 6 +++---
>  drivers/net/wireless/ath/wcn36xx/smd.h  | 6 +++---
>  4 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/wcn36xx/hal.h b/drivers/net/wireless/ath/wcn36xx/hal.h
> index 46a49f0a51b3..5e48c97682c2 100644
> --- a/drivers/net/wireless/ath/wcn36xx/hal.h
> +++ b/drivers/net/wireless/ath/wcn36xx/hal.h
> @@ -4760,7 +4760,7 @@ struct wcn36xx_hal_set_power_params_resp {
>
>  /* Capability bitmap exchange definitions and macros starts */
>
> -enum place_holder_in_cap_bitmap {
> +enum wcn36xx_firmware_feat_caps {
>         MCC = 0,
>         P2P = 1,
>         DOT11AC = 2,
> diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
> index e34d3d0b7082..efd776b20e60 100644
> --- a/drivers/net/wireless/ath/wcn36xx/main.c
> +++ b/drivers/net/wireless/ath/wcn36xx/main.c
> @@ -260,7 +260,7 @@ static const char * const wcn36xx_caps_names[] = {
>
>  #undef DEFINE
>
> -static const char *wcn36xx_get_cap_name(enum place_holder_in_cap_bitmap x)
> +static const char *wcn36xx_get_cap_name(enum wcn36xx_firmware_feat_caps x)
>  {
>         if (x >= ARRAY_SIZE(wcn36xx_caps_names))
>                 return "UNKNOWN";
> diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
> index 7ac9a1e6f768..88ee92be8562 100644
> --- a/drivers/net/wireless/ath/wcn36xx/smd.c
> +++ b/drivers/net/wireless/ath/wcn36xx/smd.c
> @@ -2431,7 +2431,7 @@ int wcn36xx_smd_dump_cmd_req(struct wcn36xx *wcn, u32 arg1, u32 arg2,
>         return ret;
>  }
>
> -void set_feat_caps(u32 *bitmap, enum place_holder_in_cap_bitmap cap)
> +void set_feat_caps(u32 *bitmap, enum wcn36xx_firmware_feat_caps cap)
>  {
>         int arr_idx, bit_idx;
>
> @@ -2445,7 +2445,7 @@ void set_feat_caps(u32 *bitmap, enum place_holder_in_cap_bitmap cap)
>         bitmap[arr_idx] |= (1 << bit_idx);
>  }
>
> -int get_feat_caps(u32 *bitmap, enum place_holder_in_cap_bitmap cap)
> +int get_feat_caps(u32 *bitmap, enum wcn36xx_firmware_feat_caps cap)
>  {
>         int arr_idx, bit_idx;
>
> @@ -2460,7 +2460,7 @@ int get_feat_caps(u32 *bitmap, enum place_holder_in_cap_bitmap cap)
>         return (bitmap[arr_idx] & (1 << bit_idx)) ? 1 : 0;
>  }
>
> -void clear_feat_caps(u32 *bitmap, enum place_holder_in_cap_bitmap cap)
> +void clear_feat_caps(u32 *bitmap, enum wcn36xx_firmware_feat_caps cap)
>  {
>         int arr_idx, bit_idx;
>
> diff --git a/drivers/net/wireless/ath/wcn36xx/smd.h b/drivers/net/wireless/ath/wcn36xx/smd.h
> index 3fd598ac2a27..186dad4fe80e 100644
> --- a/drivers/net/wireless/ath/wcn36xx/smd.h
> +++ b/drivers/net/wireless/ath/wcn36xx/smd.h
> @@ -125,9 +125,9 @@ int wcn36xx_smd_keep_alive_req(struct wcn36xx *wcn,
>  int wcn36xx_smd_dump_cmd_req(struct wcn36xx *wcn, u32 arg1, u32 arg2,
>                              u32 arg3, u32 arg4, u32 arg5);
>  int wcn36xx_smd_feature_caps_exchange(struct wcn36xx *wcn);
> -void set_feat_caps(u32 *bitmap, enum place_holder_in_cap_bitmap cap);
> -int get_feat_caps(u32 *bitmap, enum place_holder_in_cap_bitmap cap);
> -void clear_feat_caps(u32 *bitmap, enum place_holder_in_cap_bitmap cap);
> +void set_feat_caps(u32 *bitmap, enum wcn36xx_firmware_feat_caps cap);
> +int get_feat_caps(u32 *bitmap, enum wcn36xx_firmware_feat_caps cap);
> +void clear_feat_caps(u32 *bitmap, enum wcn36xx_firmware_feat_caps cap);
>
>  int wcn36xx_smd_add_ba_session(struct wcn36xx *wcn,
>                 struct ieee80211_sta *sta,
> --
> 2.36.1
>

  reply	other threads:[~2022-07-20  7:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-19 14:32 [PATCH v2 0/4] wcn36xx: Add in debugfs export of firmware feature bits Bryan O'Donoghue
2022-07-19 14:32 ` [PATCH v2 1/4] wcn36xx: Rename clunky firmware feature bit enum Bryan O'Donoghue
2022-07-20  7:14   ` Loic Poulain [this message]
2022-07-19 14:33 ` [PATCH v2 2/4] wcn36xx: Move firmware feature bit storage to dedicated firmware.c file Bryan O'Donoghue
2022-07-20  7:16   ` Loic Poulain
2022-07-19 14:33 ` [PATCH v2 3/4] wcn36xx: Move capability bitmap to string translation function to firmware.c Bryan O'Donoghue
2022-07-20  7:21   ` Loic Poulain
2022-07-19 14:33 ` [PATCH v2 4/4] wcn36xx: Add debugfs entry to read firmware feature strings Bryan O'Donoghue
2022-07-20  7:24   ` Loic Poulain
2022-07-27 10:31   ` Kalle Valo
2022-07-27 10:41     ` Bryan O'Donoghue
2022-07-27 11:08       ` Kalle Valo

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=CAMZdPi8RpNvycWx7rMMSY31FDkW2Dcyw0jC-eQKKL+rzzit2Gw@mail.gmail.com \
    --to=loic.poulain@linaro.org \
    --cc=bryan.odonoghue@linaro.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=kvalo@kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=wcn36xx@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).