Re: [PATCH 1/4] rtw88: pci: Change type of rtw_hw_queue_mapping() and ac_to_hwq to enum

From: Kalle Valo
Date: Mon Jan 17 2022 - 07:12:01 EST


Martin Blumenstingl <martin.blumenstingl@xxxxxxxxxxxxxx> writes:

> rtw_hw_queue_mapping() and ac_to_hwq[] hold values of type enum
> rtw_tx_queue_type. Change their types to reflect this to make it easier
> to understand this part of the code.
>
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@xxxxxxxxxxxxxx>
> ---
> drivers/net/wireless/realtek/rtw88/pci.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/realtek/rtw88/pci.c b/drivers/net/wireless/realtek/rtw88/pci.c
> index a0991d3f15c0..13f1f50b2867 100644
> --- a/drivers/net/wireless/realtek/rtw88/pci.c
> +++ b/drivers/net/wireless/realtek/rtw88/pci.c
> @@ -669,7 +669,7 @@ static void rtw_pci_deep_ps(struct rtw_dev *rtwdev, bool enter)
> spin_unlock_bh(&rtwpci->irq_lock);
> }
>
> -static u8 ac_to_hwq[] = {
> +static enum rtw_tx_queue_type ac_to_hwq[] = {
> [IEEE80211_AC_VO] = RTW_TX_QUEUE_VO,
> [IEEE80211_AC_VI] = RTW_TX_QUEUE_VI,
> [IEEE80211_AC_BE] = RTW_TX_QUEUE_BE,

Shouldn't ac_to_hwq be static const?

--
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches