aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
diff options
context:
space:
mode:
authorGustavo A. R. Silva <[email protected]>2019-04-03 16:03:42 +0000
committerLuca Coelho <[email protected]>2019-06-29 07:09:38 +0000
commite344896723562d1288ba76cc8f232718b9a435f7 (patch)
treee4be43443561d80b0abe405b0d27e8688fe5718c /drivers/net/wireless/intel/iwlwifi/mvm/utils.c
parentiwlwifi: lib: Use struct_size() helper (diff)
downloadkernel-e344896723562d1288ba76cc8f232718b9a435f7.tar.gz
kernel-e344896723562d1288ba76cc8f232718b9a435f7.zip
iwlwifi: d3: Use struct_size() helper
Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes, in particular in the context in which this code is being used. So, change the following form: sizeof(*pattern_cmd) + wowlan->n_patterns * sizeof(struct iwlagn_wowlan_pattern) to : struct_size(pattern_cmd, patterns, wowlan->n_patterns) This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/utils.c')
0 files changed, 0 insertions, 0 deletions