* [PATCH] ath10k: Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element
@ 2019-09-04 7:41 zhong jiang
2019-09-17 7:16 ` Kalle Valo
[not found] ` <20190917071632.001AC6155E@smtp.codeaurora.org>
0 siblings, 2 replies; 3+ messages in thread
From: zhong jiang @ 2019-09-04 7:41 UTC (permalink / raw)
To: kvalo, davem; +Cc: ath10k, linux-wireless, zhongjiang, netdev, linux-kernel
With the help of Coccinelle, ARRAY_SIZE can be replaced in ath10k_snoc_wlan_enable.
Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
drivers/net/wireless/ath/ath10k/snoc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c
index b491361..49fc044 100644
--- a/drivers/net/wireless/ath/ath10k/snoc.c
+++ b/drivers/net/wireless/ath/ath10k/snoc.c
@@ -976,8 +976,7 @@ static int ath10k_snoc_wlan_enable(struct ath10k *ar,
sizeof(struct ath10k_svc_pipe_cfg);
cfg.ce_svc_cfg = (struct ath10k_svc_pipe_cfg *)
&target_service_to_ce_map_wlan;
- cfg.num_shadow_reg_cfg = sizeof(target_shadow_reg_cfg_map) /
- sizeof(struct ath10k_shadow_reg_cfg);
+ cfg.num_shadow_reg_cfg = ARRAY_SIZE(target_shadow_reg_cfg_map);
cfg.shadow_reg_cfg = (struct ath10k_shadow_reg_cfg *)
&target_shadow_reg_cfg_map;
--
1.7.12.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ath10k: Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element
2019-09-04 7:41 [PATCH] ath10k: Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element zhong jiang
@ 2019-09-17 7:16 ` Kalle Valo
[not found] ` <20190917071632.001AC6155E@smtp.codeaurora.org>
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2019-09-17 7:16 UTC (permalink / raw)
To: zhong jiang
Cc: davem, ath10k, linux-wireless, zhongjiang, netdev, linux-kernel
zhong jiang <zhongjiang@huawei.com> wrote:
> With the help of Coccinelle, ARRAY_SIZE can be replaced in ath10k_snoc_wlan_enable.
>
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
I already got an identical patch so dropping this one.
error: patch failed: drivers/net/wireless/ath/ath10k/snoc.c:976
error: drivers/net/wireless/ath/ath10k/snoc.c: patch does not apply
stg import: Diff does not apply cleanly
--
https://patchwork.kernel.org/patch/11129531/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <20190917071632.001AC6155E@smtp.codeaurora.org>]
* Re: [PATCH] ath10k: Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element
[not found] ` <20190917071632.001AC6155E@smtp.codeaurora.org>
@ 2019-09-17 13:37 ` zhong jiang
0 siblings, 0 replies; 3+ messages in thread
From: zhong jiang @ 2019-09-17 13:37 UTC (permalink / raw)
To: Kalle Valo; +Cc: davem, ath10k, linux-wireless, netdev, linux-kernel
On 2019/9/17 15:16, Kalle Valo wrote:
> zhong jiang <zhongjiang@huawei.com> wrote:
>
>> With the help of Coccinelle, ARRAY_SIZE can be replaced in ath10k_snoc_wlan_enable.
>>
>> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
> I already got an identical patch so dropping this one.
>
> error: patch failed: drivers/net/wireless/ath/ath10k/snoc.c:976
> error: drivers/net/wireless/ath/ath10k/snoc.c: patch does not apply
> stg import: Diff does not apply cleanly
>
Thank for your remainder.
Sincerely,
zhong jiang
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-09-17 13:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-04 7:41 [PATCH] ath10k: Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element zhong jiang
2019-09-17 7:16 ` Kalle Valo
[not found] ` <20190917071632.001AC6155E@smtp.codeaurora.org>
2019-09-17 13:37 ` zhong jiang
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).