Hi Steve, I love your patch! Perhaps something to improve: [auto build test WARNING on rdma/for-next] [also build test WARNING on next-20180329] [cannot apply to linus/master v4.16-rc7] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Steve-Wise/RDMA-nldev-Add-explicit-pad-attribute/20180330-161729 base: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git for-next config: xtensa-allmodconfig (attached as .config) compiler: xtensa-linux-gcc (GCC) 7.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=xtensa 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/infiniband/hw/cxgb4/restrack.c: In function 'fill_res_qp_entry': >> drivers/infiniband/hw/cxgb4/restrack.c:322:6: warning: 'last_rq_idx' may be used uninitialized in this function [-Wmaybe-uninitialized] if (fill_swrqes(msg, &wq.rq, first_rq_idx, frp, last_rq_idx, lrp)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/infiniband/hw/cxgb4/restrack.c:322:6: warning: 'first_rq_idx' may be used uninitialized in this function [-Wmaybe-uninitialized] >> drivers/infiniband/hw/cxgb4/restrack.c:316:6: warning: 'last_sq_idx' may be used uninitialized in this function [-Wmaybe-uninitialized] if (fill_swsqes(msg, &wq.sq, first_sq_idx, fsp, last_sq_idx, lsp)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/infiniband/hw/cxgb4/restrack.c:316:6: warning: 'first_sq_idx' may be used uninitialized in this function [-Wmaybe-uninitialized] vim +/last_rq_idx +322 drivers/infiniband/hw/cxgb4/restrack.c 256 257 static int fill_res_qp_entry(struct sk_buff *msg, 258 struct netlink_callback *cb, 259 struct rdma_restrack_entry *res) 260 { 261 struct ib_qp *ibqp = container_of(res, struct ib_qp, res); 262 struct t4_swsqe *fsp = NULL, *lsp = NULL; 263 struct t4_swrqe *frp = NULL, *lrp = NULL; 264 struct c4iw_qp *qhp = to_c4iw_qp(ibqp); 265 struct t4_swsqe first_sqe, last_sqe; 266 struct t4_swrqe first_rqe, last_rqe; 267 u16 first_sq_idx, last_sq_idx; 268 u16 first_rq_idx, last_rq_idx; 269 struct nlattr *table_attr; 270 struct t4_wq wq; 271 272 /* User qp state is not available, so don't dump user qps */ 273 if (qhp->ucontext) 274 return 0; 275 276 table_attr = nla_nest_start(msg, RDMA_NLDEV_ATTR_PROVIDER); 277 if (!table_attr) 278 goto err; 279 280 /* Get a consistent snapshot */ 281 spin_lock_irq(&qhp->lock); 282 wq = qhp->wq; 283 284 /* If there are any pending sqes, copy the first and last */ 285 if (wq.sq.cidx != wq.sq.pidx) { 286 first_sq_idx = wq.sq.cidx; 287 first_sqe = qhp->wq.sq.sw_sq[first_sq_idx]; 288 fsp = &first_sqe; 289 last_sq_idx = wq.sq.pidx; 290 if (last_sq_idx-- == 0) 291 last_sq_idx = wq.sq.size - 1; 292 if (last_sq_idx != first_sq_idx) { 293 last_sqe = qhp->wq.sq.sw_sq[last_sq_idx]; 294 lsp = &last_sqe; 295 } 296 } 297 298 /* If there are any pending rqes, copy the first and last */ 299 if (wq.rq.cidx != wq.rq.pidx) { 300 first_rq_idx = wq.rq.cidx; 301 first_rqe = qhp->wq.rq.sw_rq[first_rq_idx]; 302 frp = &first_rqe; 303 last_rq_idx = wq.rq.pidx; 304 if (last_rq_idx-- == 0) 305 last_rq_idx = wq.rq.size - 1; 306 if (last_rq_idx != first_rq_idx) { 307 last_rqe = qhp->wq.rq.sw_rq[last_rq_idx]; 308 lrp = &last_rqe; 309 } 310 } 311 spin_unlock_irq(&qhp->lock); 312 313 if (fill_sq(msg, &wq)) 314 goto err_cancel_table; 315 > 316 if (fill_swsqes(msg, &wq.sq, first_sq_idx, fsp, last_sq_idx, lsp)) 317 goto err_cancel_table; 318 319 if (fill_rq(msg, &wq)) 320 goto err_cancel_table; 321 > 322 if (fill_swrqes(msg, &wq.rq, first_rq_idx, frp, last_rq_idx, lrp)) 323 goto err_cancel_table; 324 325 nla_nest_end(msg, table_attr); 326 return 0; 327 328 err_cancel_table: 329 nla_nest_cancel(msg, table_attr); 330 err: 331 return -EMSGSIZE; 332 } 333 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip