From: kbuild test robot <lkp@intel.com>
To: Govind Singh <govinds@codeaurora.org>
Cc: kbuild-all@lists.01.org, ath10k@lists.infradead.org,
Kalle Valo <kvalo@codeaurora.org>
Subject: [ath6kl:pending 21/24] drivers/net/wireless/ath/ath11k/pci.c:49:34: warning: Local variable 'msi_config' shadows outer variable [shadowVariable]
Date: Tue, 12 May 2020 11:11:56 +0800 [thread overview]
Message-ID: <202005121153.gLRyf9Tw%lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git pending
head: 6303acc5b03a5fc3bf6cf5fa072ae0dc9aaa5dd0
commit: 398a800c183de17a49a5779550e72fbc3ba1e592 [21/24] ath11k: Add msi config init for QCA6390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
cppcheck warnings: (new ones prefixed by >>)
>> drivers/net/wireless/ath/ath11k/pci.c:49:34: warning: Local variable 'msi_config' shadows outer variable [shadowVariable]
const struct ath11k_msi_config *msi_config;
^
drivers/net/wireless/ath/ath11k/pci.c:23:39: note: Shadowed declaration
static const struct ath11k_msi_config msi_config = {
^
drivers/net/wireless/ath/ath11k/pci.c:49:34: note: Shadow variable
const struct ath11k_msi_config *msi_config;
^
vim +/msi_config +49 drivers/net/wireless/ath/ath11k/pci.c
45
46 static int ath11k_pci_enable_msi(struct ath11k_pci *ab_pci)
47 {
48 struct ath11k_base *ab = ab_pci->ab;
> 49 const struct ath11k_msi_config *msi_config;
50 struct msi_desc *msi_desc;
51 int num_vectors;
52 int ret;
53
54 ret = ath11k_pci_get_msi_assignment(ab_pci);
55 if (ret) {
56 ath11k_err(ab, "failed to get MSI assignment, err = %d\n", ret);
57 goto out;
58 }
59
60 msi_config = ab_pci->msi_config;
61 if (!msi_config) {
62 ath11k_err(ab, "msi_config is NULL!\n");
63 ret = -EINVAL;
64 goto out;
65 }
66
67 num_vectors = pci_alloc_irq_vectors(ab_pci->pdev,
68 msi_config->total_vectors,
69 msi_config->total_vectors,
70 PCI_IRQ_MSI);
71 if (num_vectors != msi_config->total_vectors) {
72 ath11k_err(ab, "failed to get enough MSI vectors (%d), available vectors = %d",
73 msi_config->total_vectors, num_vectors);
74 if (num_vectors >= 0)
75 ret = -EINVAL;
76 goto reset_msi_config;
77 }
78
79 msi_desc = irq_get_msi_desc(ab_pci->pdev->irq);
80 if (!msi_desc) {
81 ath11k_err(ab, "msi_desc is NULL!\n");
82 ret = -EINVAL;
83 goto free_msi_vector;
84 }
85
86 ab_pci->msi_ep_base_data = msi_desc->msg.data;
87
88 ath11k_dbg(ab, ATH11K_DBG_PCI, "msi base data is %d\n", ab_pci->msi_ep_base_data);
89
90 return 0;
91
92 free_msi_vector:
93 pci_free_irq_vectors(ab_pci->pdev);
94 reset_msi_config:
95 ab_pci->msi_config = NULL;
96 out:
97 return ret;
98 }
99
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
next reply other threads:[~2020-05-12 3:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-12 3:11 kbuild test robot [this message]
2020-05-12 8:26 ` [ath6kl:pending 21/24] drivers/net/wireless/ath/ath11k/pci.c:49:34: warning: Local variable 'msi_config' shadows outer variable [shadowVariable] Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202005121153.gLRyf9Tw%lkp@intel.com \
--to=lkp@intel.com \
--cc=ath10k@lists.infradead.org \
--cc=govinds@codeaurora.org \
--cc=kbuild-all@lists.01.org \
--cc=kvalo@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).