New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 840402 link

Starred by 2 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

iwl7000: Incorrect expression (SIZEOF_MISMATCH)

Project Member Reported by groeck@chromium.org, May 7 2018

Issue description

This problem only affects v4.17+ kernels. Filing for tracking purposes.

Reported by Coverity:

*** CID 1435448:  Incorrect expression  (SIZEOF_MISMATCH)
/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c: 1010 in iwl_parse_nvm_mcc_info()
1004
1005            for (i = 0; i < regd->n_reg_rules; i++) {
1006                    if (!regd->reg_rules[i].wmm_rule)
1007                            continue;
1008
1009                    copy_rd->reg_rules[i].wmm_rule = d_wmm +
>>>     CID 1435448:  Incorrect expression  (SIZEOF_MISMATCH)
>>>     Pointer differences, such as "regd->reg_rules[i].wmm_rule - s_wmm", are automatically scaled down by the size (64 bytes) of
+the pointed-to type ("struct ieee80211_wmm_rule").  Most likely, the division by "sizeof (struct ieee80211_wmm_rule)" is extraneous
+and should be eliminated.
1010                            (regd->reg_rules[i].wmm_rule - s_wmm) /
1011                            sizeof(struct ieee80211_wmm_rule);
1012            }
1013
1014     out:
1015            kfree(regdb_ptrs);
1016            kfree(regd);
1017            return copy_rd;
1018     }

The same problem applies to iwl7000 (around line 1042 in chromeos-4.14).


 
Components: OS>Systems>Network
Labels: Enterprise-Triaged

Sign in to add a comment