Re: [PATCH 2/2] iwlwifi: Use struct_size() in kzalloc

2019-01-28 Thread YueHaibing
On 2019/1/29 5:57, Joe Perches wrote: > On Mon, 2019-01-28 at 14:44 +0800, YueHaibing wrote: >> Use struct_size() in kzalloc instead of the 'regd_to_copy' > > There is also the use above that in the same function > that could also be converted. > > /* build a regdomain rule for every vali

Re: [PATCH 2/2] iwlwifi: Use struct_size() in kzalloc

2019-01-28 Thread Joe Perches
On Mon, 2019-01-28 at 14:44 +0800, YueHaibing wrote: > Use struct_size() in kzalloc instead of the 'regd_to_copy' There is also the use above that in the same function that could also be converted. /* build a regdomain rule for every valid channel */ size_of_regd =

[PATCH 2/2] iwlwifi: Use struct_size() in kzalloc

2019-01-27 Thread YueHaibing
Use struct_size() in kzalloc instead of the 'regd_to_copy' Signed-off-by: YueHaibing --- drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel