From: kbuild test robot <lkp@intel.com>
To: Michael Chan <michael.chan@broadcom.com>
Cc: kbuild-all@01.org, davem@davemloft.net, netdev@vger.kernel.org,
selvin.xavier@broadcom.com, somnath.kotur@broadcom.com,
dledford@redhat.com, linux-rdma@vger.kernel.org
Subject: Re: [PATCH net-next 7/7] bnxt_en: Add interface to support RDMA driver.
Date: Wed, 7 Dec 2016 06:33:16 +0800 [thread overview]
Message-ID: <201612070603.EzOhmgFD%fengguang.wu@intel.com> (raw)
In-Reply-To: <1481044178-25193-8-git-send-email-michael.chan@broadcom.com>
[-- Attachment #1: Type: text/plain, Size: 5469 bytes --]
Hi Michael,
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Michael-Chan/bnxt_en-Add-interface-to-support-RDMA-driver/20161207-053721
config: i386-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
All warnings (new ones prefixed by >>):
drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c: In function 'bnxt_unregister_dev':
>> drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c:97:4: warning: 'i' may be used uninitialized in this function [-Wmaybe-uninitialized]
i++;
~^~
drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c: In function 'bnxt_ulp_stop':
>> drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c:219:6: warning: 'ops' may be used uninitialized in this function [-Wmaybe-uninitialized]
if (!ops || !ops->ulp_stop)
^
vim +/i +97 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c
91 RCU_INIT_POINTER(ulp->ulp_ops, NULL);
92 synchronize_rcu();
93 ulp->max_async_event_id = 0;
94 ulp->async_events_bmap = NULL;
95 while (atomic_read(&ulp->ref_count) != 0 && i < 10) {
96 msleep(100);
> 97 i++;
98 }
99 return 0;
100 }
101
102 static int bnxt_req_msix_vecs(struct bnxt_en_dev *edev, int ulp_id,
103 struct bnxt_msix_entry *ent, int num_msix)
104 {
105 struct net_device *dev = edev->net;
106 struct bnxt *bp = netdev_priv(dev);
107 int max_idx, max_cp_rings;
108 int avail_msix, i, idx;
109
110 ASSERT_RTNL();
111 if (ulp_id != BNXT_ROCE_ULP)
112 return -EINVAL;
113
114 if (!(bp->flags & BNXT_FLAG_USING_MSIX))
115 return -ENODEV;
116
117 max_cp_rings = bnxt_get_max_func_cp_rings(bp);
118 max_idx = min_t(int, bp->total_irqs, max_cp_rings);
119 avail_msix = max_idx - bp->cp_nr_rings;
120 if (!avail_msix)
121 return -ENOMEM;
122 if (avail_msix > num_msix)
123 avail_msix = num_msix;
124
125 idx = max_idx - avail_msix;
126 for (i = 0; i < avail_msix; i++) {
127 ent[i].vector = bp->irq_tbl[idx + i].vector;
128 ent[i].ring_idx = idx + i;
129 ent[i].db_offset = (idx + i) * 0x80;
130 }
131 bnxt_set_max_func_irqs(bp, max_idx - avail_msix);
132 bnxt_set_max_func_cp_rings(bp, max_cp_rings - avail_msix);
133 edev->ulp_tbl[ulp_id].msix_requested = avail_msix;
134 return avail_msix;
135 }
136
137 static int bnxt_free_msix_vecs(struct bnxt_en_dev *edev, int ulp_id)
138 {
139 struct net_device *dev = edev->net;
140 struct bnxt *bp = netdev_priv(dev);
141 int max_cp_rings, msix_requested;
142
143 ASSERT_RTNL();
144 if (ulp_id != BNXT_ROCE_ULP)
145 return -EINVAL;
146
147 max_cp_rings = bnxt_get_max_func_cp_rings(bp);
148 msix_requested = edev->ulp_tbl[ulp_id].msix_requested;
149 bnxt_set_max_func_cp_rings(bp, max_cp_rings + msix_requested);
150 edev->ulp_tbl[ulp_id].msix_requested = 0;
151 bnxt_set_max_func_irqs(bp, bp->total_irqs);
152 return 0;
153 }
154
155 void bnxt_subtract_ulp_resources(struct bnxt *bp, int ulp_id)
156 {
157 ASSERT_RTNL();
158 if (bnxt_ulp_registered(bp->edev, ulp_id)) {
159 struct bnxt_en_dev *edev = bp->edev;
160 unsigned int msix_req, max;
161
162 msix_req = edev->ulp_tbl[ulp_id].msix_requested;
163 max = bnxt_get_max_func_cp_rings(bp);
164 bnxt_set_max_func_cp_rings(bp, max - msix_req);
165 max = bnxt_get_max_func_stat_ctxs(bp);
166 bnxt_set_max_func_stat_ctxs(bp, max - 1);
167 }
168 }
169
170 static int bnxt_send_msg(struct bnxt_en_dev *edev, int ulp_id,
171 struct bnxt_fw_msg *fw_msg)
172 {
173 struct net_device *dev = edev->net;
174 struct bnxt *bp = netdev_priv(dev);
175 struct input *req;
176 int rc;
177
178 mutex_lock(&bp->hwrm_cmd_lock);
179 req = fw_msg->msg;
180 req->resp_addr = cpu_to_le64(bp->hwrm_cmd_resp_dma_addr);
181 rc = _hwrm_send_message(bp, fw_msg->msg, fw_msg->msg_len,
182 fw_msg->timeout);
183 if (!rc) {
184 struct output *resp = bp->hwrm_cmd_resp_addr;
185 u32 len = le16_to_cpu(resp->resp_len);
186
187 if (fw_msg->resp_max_len < len)
188 len = fw_msg->resp_max_len;
189
190 memcpy(fw_msg->resp, resp, len);
191 }
192 mutex_unlock(&bp->hwrm_cmd_lock);
193 return rc;
194 }
195
196 static void bnxt_ulp_get(struct bnxt_ulp *ulp)
197 {
198 atomic_inc(&ulp->ref_count);
199 }
200
201 static void bnxt_ulp_put(struct bnxt_ulp *ulp)
202 {
203 atomic_dec(&ulp->ref_count);
204 }
205
206 void bnxt_ulp_stop(struct bnxt *bp)
207 {
208 struct bnxt_en_dev *edev = bp->edev;
209 struct bnxt_ulp_ops *ops;
210 int i;
211
212 if (!edev)
213 return;
214
215 for (i = 0; i < BNXT_MAX_ULP; i++) {
216 struct bnxt_ulp *ulp = &edev->ulp_tbl[i];
217
218 rtnl_dereference(ulp->ulp_ops);
> 219 if (!ops || !ops->ulp_stop)
220 continue;
221 ops->ulp_stop(ulp->handle);
222 }
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 57018 bytes --]
prev parent reply other threads:[~2016-12-06 22:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-06 17:09 [PATCH net-next 0/7] bnxt_en: Add interface to support RDMA driver Michael Chan
2016-12-06 17:09 ` [PATCH net-next 1/7] bnxt_en: Add bnxt_set_max_func_irqs() Michael Chan
[not found] ` <1481044178-25193-1-git-send-email-michael.chan-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2016-12-06 17:09 ` [PATCH net-next 2/7] bnxt_en: Enable MSIX early in bnxt_init_one() Michael Chan
[not found] ` <1481044178-25193-3-git-send-email-michael.chan-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2016-12-06 23:55 ` kbuild test robot
2016-12-06 17:09 ` [PATCH net-next 5/7] bnxt_en: Reserve RDMA resources by default Michael Chan
2016-12-06 17:09 ` [PATCH net-next 6/7] bnxt_en: Refactor the driver registration function with firmware Michael Chan
2016-12-06 17:09 ` [PATCH net-next 3/7] bnxt_en: Move function reset to bnxt_init_one() Michael Chan
2016-12-06 17:09 ` [PATCH net-next 4/7] bnxt_en: Improve completion ring allocation for VFs Michael Chan
2016-12-06 17:09 ` [PATCH net-next 7/7] bnxt_en: Add interface to support RDMA driver Michael Chan
2016-12-06 22:33 ` kbuild test robot [this message]
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=201612070603.EzOhmgFD%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=davem@davemloft.net \
--cc=dledford@redhat.com \
--cc=kbuild-all@01.org \
--cc=linux-rdma@vger.kernel.org \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=selvin.xavier@broadcom.com \
--cc=somnath.kotur@broadcom.com \
/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