Subject: Re: [PATCH] wifi: brcmfmac: Fix allocation size

From: "Alexey V. Vissarionov" <[email-masked]>
Date: Tue, 17 Jan 2023 14:21:41 +0300

On 2023-01-17 13:05:24 +0200, Kalle Valo wrote:

 >> - buf_size += (max_idx + 1) * sizeof(pkt);
 >> + buf_size += (max_idx + 1) * sizeof(struct sk_buff);
 > Wouldn't sizeof(*pkt) be better?

Usually sizeof(type) produces less errors than sizeof(var)...

 > Just like with sizeof(*rfi) few lines above.

... but to keep consistency sizeof(*pkt) would also be ok.

-- 
Alexey V. Vissarionov
gremlin ПРИ altlinux ТЧК org; +vii-cmiii-ccxxix-lxxix-xlii
GPG: 0D92F19E1C0DC36E27F61A29CD17E2B43D879005 @ hkp://keys.gnupg.net