linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* re: iwlwifi: add the MVM driver
@ 2016-05-03 11:52 Dan Carpenter
  2016-05-03 13:08 ` Bjørn Mork
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2016-05-03 11:52 UTC (permalink / raw)
  To: johannes.berg; +Cc: linux-wireless

Hello Johannes Berg,

The patch 8ca151b568b6: "iwlwifi: add the MVM driver" from Jan 24,
2013, leads to the following static checker warning:

	drivers/net/wireless/intel/iwlwifi/mvm/d3.c:2080 __iwl_mvm_resume()
	error: uninitialized symbol 'd3_status'.

drivers/net/wireless/intel/iwlwifi/mvm/d3.c
  2057  static int __iwl_mvm_resume(struct iwl_mvm *mvm, bool test)
  2058  {
  2059          struct ieee80211_vif *vif = NULL;
  2060          int ret = 1;
  2061          enum iwl_d3_status d3_status;
  2062          bool keep = false;
  2063          bool unified_image = fw_has_capa(&mvm->fw->ucode_capa,
  2064                                           IWL_UCODE_TLV_CAPA_CNSLDTD_D3_D0_IMG);
  2065  
  2066          u32 flags = CMD_ASYNC | CMD_HIGH_PRIO | CMD_SEND_IN_IDLE |
  2067                                      CMD_WAKE_UP_TRANS;
  2068  
  2069          mutex_lock(&mvm->mutex);
  2070  
  2071          /* get the BSS vif pointer again */
  2072          vif = iwl_mvm_get_bss_vif(mvm);
  2073          if (IS_ERR_OR_NULL(vif))
  2074                  goto err;
  2075  
  2076          ret = iwl_trans_d3_resume(mvm->trans, &d3_status, test, !unified_image);


iwl_trans_d3_resume() just calls a resume() function pointer, but if
that pointer is NULL then it's a no-op.

  2077          if (ret)
  2078                  goto err;
  2079  
  2080          if (d3_status != IWL_D3_STATUS_ALIVE) {
                    ^^^^^^^^^
This would still be uninitialized.

  2081                  IWL_INFO(mvm, "Device was reset during suspend\n");
  2082                  goto err;
  2083          }

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: iwlwifi: add the MVM driver
  2016-05-03 11:52 iwlwifi: add the MVM driver Dan Carpenter
@ 2016-05-03 13:08 ` Bjørn Mork
  0 siblings, 0 replies; 3+ messages in thread
From: Bjørn Mork @ 2016-05-03 13:08 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: johannes.berg, linux-wireless

Dan Carpenter <dan.carpenter@oracle.com> writes:

> The patch 8ca151b568b6: "iwlwifi: add the MVM driver" from Jan 24,
> 2013, leads to the following static checker warning:

Struggling to keep up with the backlog? :)


Bjørn

^ permalink raw reply	[flat|nested] 3+ messages in thread

* re: iwlwifi: add the MVM driver
@ 2013-02-05  8:04 Dan Carpenter
  0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2013-02-05  8:04 UTC (permalink / raw)
  To: johannes.berg; +Cc: linux-wireless

Hello Johannes Berg,

The patch 8ca151b568b6: "iwlwifi: add the MVM driver" from Jan 24,
2013, leads to the following warning:
"drivers/net/wireless/iwlwifi/mvm/sta.c:1119 iwl_mvm_remove_sta_key()
	 warn: 0x300 is larger than 8 bits"

[ This is a not ready for release Smatch check ].

drivers/net/wireless/iwlwifi/mvm/sta.c
  1118  
  1119          key_flags = cpu_to_le16(keyconf->keyidx & STA_KEY_FLG_KEYID_MSK);
                                        ^^^^^^^^^^^^^^^
This is s8.
                                                          ^^^^^^^^^^^^^^^^^^^^^
STA_KEY_FLG_KEYID_MSK is 0x300.

The result after the bitwise AND is always zero because 0xff & 0x300.

  1120          key_flags |= cpu_to_le16(STA_KEY_FLG_NO_ENC | STA_KEY_FLG_WEP_KEY_MAP);
  1121          key_flags |= cpu_to_le16(STA_KEY_NOT_VALID);
  1122  

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-05-03 13:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-03 11:52 iwlwifi: add the MVM driver Dan Carpenter
2016-05-03 13:08 ` Bjørn Mork
  -- strict thread matches above, loose matches on Subject: below --
2013-02-05  8:04 Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).