Re: [PATCH][next] qtnfmac: Use struct_size() in kzalloc()

2019-06-24 Thread Kalle Valo
"Gustavo A. R. Silva" wrote: > One of the more common cases of allocation size calculations is finding > the size of a structure that has a zero-sized array at the end, along > with memory for some number of elements for that array. For example: > > struct ieee80211_regdomain { > ... >

Re: [PATCH][next] qtnfmac: Use struct_size() in kzalloc()

2019-06-10 Thread Sergey Matyukevich
> One of the more common cases of allocation size calculations is finding > the size of a structure that has a zero-sized array at the end, along > with memory for some number of elements for that array. For example: > > struct ieee80211_regdomain { > ... > struct ieee80211_reg_rul

[PATCH][next] qtnfmac: Use struct_size() in kzalloc()

2019-06-07 Thread Gustavo A. R. Silva
One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct ieee80211_regdomain { ... struct ieee80211_reg_rule reg_rules[];