* [PATCH] wifi: ath12k: sanitize ath12k_mac_allocate() return code
@ 2024-02-13 10:09 Arnd Bergmann
2024-02-14 8:44 ` Kalle Valo
0 siblings, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2024-02-13 10:09 UTC (permalink / raw
To: Kalle Valo, Jeff Johnson, Karthikeyan Periyasamy
Cc: Arnd Bergmann, Aloka Dixit, Wen Gong, Muna Sinada,
Aditya Kumar Singh, ath12k, linux-wireless, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
The return code has no initializer:
drivers/net/wireless/ath/ath12k/mac.c:8006:9: error: variable 'ret' is uninitialized when used here [-Werror,-Wuninitialized]
Make it return -ENOMEM for allocation failures and remove the unused
variable instead.
Fixes: 6db6e70a17f6 ("wifi: ath12k: Introduce the container for mac80211 hw")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/net/wireless/ath/ath12k/mac.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index f2f7b2a60261..e93475ae8d07 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -7965,7 +7965,7 @@ int ath12k_mac_allocate(struct ath12k_base *ab)
{
struct ath12k_hw *ah;
struct ath12k_pdev_map pdev_map[MAX_RADIOS];
- int ret, i, j;
+ int i, j;
u8 radio_per_hw;
if (test_bit(ATH12K_FLAG_REGISTERED, &ab->dev_flags))
@@ -8003,5 +8003,5 @@ int ath12k_mac_allocate(struct ath12k_base *ab)
ab->ah[i] = NULL;
}
- return ret;
+ return -ENOMEM;
}
--
2.39.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] wifi: ath12k: sanitize ath12k_mac_allocate() return code
2024-02-13 10:09 [PATCH] wifi: ath12k: sanitize ath12k_mac_allocate() return code Arnd Bergmann
@ 2024-02-14 8:44 ` Kalle Valo
2024-02-14 10:37 ` Arnd Bergmann
0 siblings, 1 reply; 6+ messages in thread
From: Kalle Valo @ 2024-02-14 8:44 UTC (permalink / raw
To: Arnd Bergmann
Cc: Jeff Johnson, Karthikeyan Periyasamy, Arnd Bergmann, Aloka Dixit,
Wen Gong, Muna Sinada, Aditya Kumar Singh, ath12k, linux-wireless,
linux-kernel
Arnd Bergmann <arnd@kernel.org> wrote:
> The return code has no initializer:
>
> drivers/net/wireless/ath/ath12k/mac.c:8006:9: error: variable 'ret' is uninitialized when used here [-Werror,-Wuninitialized]
>
> Make it return -ENOMEM for allocation failures and remove the unused
> variable instead.
>
> Fixes: 6db6e70a17f6 ("wifi: ath12k: Introduce the container for mac80211 hw")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Nathan already fixed this:
https://git.kernel.org/kvalo/ath/c/04edb5dc68f4
Patch set to Rejected.
--
https://patchwork.kernel.org/project/linux-wireless/patch/20240213100912.459018-1-arnd@kernel.org/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] wifi: ath12k: sanitize ath12k_mac_allocate() return code
2024-02-14 8:44 ` Kalle Valo
@ 2024-02-14 10:37 ` Arnd Bergmann
2024-02-14 10:44 ` Kalle Valo
0 siblings, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2024-02-14 10:37 UTC (permalink / raw
To: Kalle Valo, Arnd Bergmann
Cc: Jeff Johnson, Karthikeyan Periyasamy, Aloka Dixit, Wen Gong,
Muna Sinada, Aditya Kumar Singh, ath12k, linux-wireless,
linux-kernel
On Wed, Feb 14, 2024, at 09:44, Kalle Valo wrote:
> Arnd Bergmann <arnd@kernel.org> wrote:
>
>> The return code has no initializer:
>>
>> drivers/net/wireless/ath/ath12k/mac.c:8006:9: error: variable 'ret' is uninitialized when used here [-Werror,-Wuninitialized]
>>
>> Make it return -ENOMEM for allocation failures and remove the unused
>> variable instead.
>>
>> Fixes: 6db6e70a17f6 ("wifi: ath12k: Introduce the container for mac80211 hw")
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
>
> Nathan already fixed this:
>
> https://git.kernel.org/kvalo/ath/c/04edb5dc68f4
>
> Patch set to Rejected.
Ok, sounds good. Nathan's patch looks fine to me, but
I see it's not in linux-next yet as of today.
Arnd
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] wifi: ath12k: sanitize ath12k_mac_allocate() return code
2024-02-14 10:37 ` Arnd Bergmann
@ 2024-02-14 10:44 ` Kalle Valo
2024-02-14 10:51 ` Arnd Bergmann
0 siblings, 1 reply; 6+ messages in thread
From: Kalle Valo @ 2024-02-14 10:44 UTC (permalink / raw
To: Arnd Bergmann
Cc: Arnd Bergmann, Jeff Johnson, Karthikeyan Periyasamy, Aloka Dixit,
Wen Gong, Muna Sinada, Aditya Kumar Singh, ath12k, linux-wireless,
linux-kernel
"Arnd Bergmann" <arnd@arndb.de> writes:
> On Wed, Feb 14, 2024, at 09:44, Kalle Valo wrote:
>> Arnd Bergmann <arnd@kernel.org> wrote:
>>
>>> The return code has no initializer:
>>>
>>> drivers/net/wireless/ath/ath12k/mac.c:8006:9: error: variable 'ret' is uninitialized when used here [-Werror,-Wuninitialized]
>>>
>>> Make it return -ENOMEM for allocation failures and remove the unused
>>> variable instead.
>>>
>>> Fixes: 6db6e70a17f6 ("wifi: ath12k: Introduce the container for mac80211 hw")
>>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>>> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
>>
>> Nathan already fixed this:
>>
>> https://git.kernel.org/kvalo/ath/c/04edb5dc68f4
>>
>> Patch set to Rejected.
>
> Ok, sounds good. Nathan's patch looks fine to me
Great, thanks for checking.
> but I see it's not in linux-next yet as of today.
Yeah, it's a problem that ath.git is not included linux-next builds. The
commits will be in linux-next only after ath-next is pulled to
wireless-next :/
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] wifi: ath12k: sanitize ath12k_mac_allocate() return code
2024-02-14 10:44 ` Kalle Valo
@ 2024-02-14 10:51 ` Arnd Bergmann
2024-02-14 12:21 ` Kalle Valo
0 siblings, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2024-02-14 10:51 UTC (permalink / raw
To: Kalle Valo
Cc: Arnd Bergmann, Jeff Johnson, Karthikeyan Periyasamy, Aloka Dixit,
Wen Gong, Muna Sinada, Aditya Kumar Singh, ath12k, linux-wireless,
linux-kernel
On Wed, Feb 14, 2024, at 11:44, Kalle Valo wrote:
> "Arnd Bergmann" <arnd@arndb.de> writes:
>> On Wed, Feb 14, 2024, at 09:44, Kalle Valo wrote:
>>> Arnd Bergmann <arnd@kernel.org> wrote:
>
>> but I see it's not in linux-next yet as of today.
>
> Yeah, it's a problem that ath.git is not included linux-next builds. The
> commits will be in linux-next only after ath-next is pulled to
> wireless-next :/
Not sure if that is intentional, but if you'd like to change
that, you can just email Stephen Rothwell asking him to include
ath-next into linux-next as well.
Arnd
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] wifi: ath12k: sanitize ath12k_mac_allocate() return code
2024-02-14 10:51 ` Arnd Bergmann
@ 2024-02-14 12:21 ` Kalle Valo
0 siblings, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2024-02-14 12:21 UTC (permalink / raw
To: Arnd Bergmann
Cc: Arnd Bergmann, Jeff Johnson, Karthikeyan Periyasamy, Aloka Dixit,
Wen Gong, Muna Sinada, Aditya Kumar Singh, ath12k, linux-wireless,
linux-kernel
"Arnd Bergmann" <arnd@arndb.de> writes:
> On Wed, Feb 14, 2024, at 11:44, Kalle Valo wrote:
>> "Arnd Bergmann" <arnd@arndb.de> writes:
>>> On Wed, Feb 14, 2024, at 09:44, Kalle Valo wrote:
>>>> Arnd Bergmann <arnd@kernel.org> wrote:
>>
>>> but I see it's not in linux-next yet as of today.
>>
>> Yeah, it's a problem that ath.git is not included linux-next builds. The
>> commits will be in linux-next only after ath-next is pulled to
>> wireless-next :/
>
> Not sure if that is intentional, but if you'd like to change
> that, you can just email Stephen Rothwell asking him to include
> ath-next into linux-next as well.
We haven't done that as Stephen prefers that there are no "next-next"
patches in linux-next during the merge window and we don't want to stop
the development for two weeks.
But this is not the first time we get duplicate fixes due to the first
fix not being in linux-next, so we should fix this. I guess we could do
a similar for-next branch trick like we have in wireless-next? I'll talk
with Jeff and we'll see what we can do.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-02-14 12:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-13 10:09 [PATCH] wifi: ath12k: sanitize ath12k_mac_allocate() return code Arnd Bergmann
2024-02-14 8:44 ` Kalle Valo
2024-02-14 10:37 ` Arnd Bergmann
2024-02-14 10:44 ` Kalle Valo
2024-02-14 10:51 ` Arnd Bergmann
2024-02-14 12:21 ` Kalle Valo
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 read-only IMAP folder(s) and NNTP newsgroup(s).