Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-Wsometimes-uninitialized in drivers/net/wireless/intel/iwlwifi/mvm/sta.c #399

Closed
nathanchance opened this issue Feb 26, 2019 · 3 comments
Closed
Assignees
Labels
-Wsometimes-uninitialized [BUG] linux A bug that should be fixed in the mainline kernel. [FIXED][LINUX] 5.2 This bug was fixed in Linux 5.2

Comments

@nathanchance
Copy link
Member

Meta: #381

drivers/net/wireless/intel/iwlwifi/mvm/sta.c:2114:12: error: variable 'queue' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]

in iwl_mvm_send_add_bcast_sta. Fix will be the same as #382.

@nathanchance nathanchance added good first issue Good for newcomers [BUG] linux A bug that should be fixed in the mainline kernel. low priority This bug is not critical and not a priority -Wsometimes-uninitialized labels Feb 26, 2019
@nathanchance
Copy link
Member Author

@nathanchance nathanchance self-assigned this Mar 8, 2019
@nathanchance nathanchance added [PATCH] Submitted A patch has been submitted for review and removed good first issue Good for newcomers low priority This bug is not critical and not a priority labels Mar 8, 2019
@nathanchance
Copy link
Member Author

Patch is sitting in the wireless-drivers-next repo, it'll be in -next in the next pull request to net-next: https://git.kernel.org/kvalo/wireless-drivers-next/c/f8510d67d658c4f4fb7dcb13560d4c99e4de5082

@nathanchance nathanchance added [PATCH] Accepted A submitted patch has been accepted upstream and removed [PATCH] Submitted A patch has been submitted for review labels Apr 25, 2019
@nathanchance
Copy link
Member Author

Merged into mainline: https://git.kernel.org/linus/f8510d67d658c4f4fb7dcb13560d4c99e4de5082

@nathanchance nathanchance added [FIXED][LINUX] 5.2 This bug was fixed in Linux 5.2 and removed [PATCH] Accepted A submitted patch has been accepted upstream labels May 13, 2019
fcicq pushed a commit to fcicq/chromiumos-third_party-kernel that referenced this issue Jun 5, 2019
…_send_add_bcast_sta

When building with -Wsometimes-uninitialized, Clang warns:

drivers/net/wireless/intel/iwlwifi/mvm/sta.c:2114:12: warning: variable
'queue' is used uninitialized whenever 'if' condition is false
[-Wsometimes-uninitialized]

Clang can't evaluate at this point that WARN(1, ...) always returns true
because __ret_warn_on is defined as !!(condition), which isn't
immediately evaluated as 1. Change this branch to else so that it's
clear to Clang that we intend to bail out here.

Change-Id: I983a3eca8525ac897a694b3449f63969fca60a17
Link: ClangBuiltLinux/linux#399
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
[added a few more braces]
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
iwl7000-tree: 7588773d18cca9f52f2ad84964c189e7692c2db3
fcicq pushed a commit to fcicq/chromiumos-third_party-kernel that referenced this issue Nov 13, 2019
…_send_add_bcast_sta

When building with -Wsometimes-uninitialized, Clang warns:

drivers/net/wireless/intel/iwlwifi/mvm/sta.c:2114:12: warning: variable
'queue' is used uninitialized whenever 'if' condition is false
[-Wsometimes-uninitialized]

Clang can't evaluate at this point that WARN(1, ...) always returns true
because __ret_warn_on is defined as !!(condition), which isn't
immediately evaluated as 1. Change this branch to else so that it's
clear to Clang that we intend to bail out here.

Change-Id: I983a3eca8525ac897a694b3449f63969fca60a17
Link: ClangBuiltLinux/linux#399
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
[added a few more braces]
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
iwl7000-tree: 7588773d18cca9f52f2ad84964c189e7692c2db3
fcicq pushed a commit to fcicq/chromiumos-third_party-kernel that referenced this issue Nov 13, 2019
…_send_add_bcast_sta

When building with -Wsometimes-uninitialized, Clang warns:

drivers/net/wireless/intel/iwlwifi/mvm/sta.c:2114:12: warning: variable
'queue' is used uninitialized whenever 'if' condition is false
[-Wsometimes-uninitialized]

Clang can't evaluate at this point that WARN(1, ...) always returns true
because __ret_warn_on is defined as !!(condition), which isn't
immediately evaluated as 1. Change this branch to else so that it's
clear to Clang that we intend to bail out here.

Change-Id: I983a3eca8525ac897a694b3449f63969fca60a17
Link: ClangBuiltLinux/linux#399
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
[added a few more braces]
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
iwl7000-tree: 7588773d18cca9f52f2ad84964c189e7692c2db3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-Wsometimes-uninitialized [BUG] linux A bug that should be fixed in the mainline kernel. [FIXED][LINUX] 5.2 This bug was fixed in Linux 5.2
Projects
None yet
Development

No branches or pull requests

1 participant