Just noticed this in my latest build:
drivers/infiniband/ulp/srp/ib_srp.c: In function ‘srp_queuecommand’:
drivers/infiniband/ulp/srp/ib_srp.c:1116: warning: ‘req’ may be used
uninitialized in this function
Looks like it came from 76c75b258f1f ("IB/srp: reduce local coverage for
command submission and EH") because the code now looks like:
iu = __srp_get_tx_iu(target, SRP_IU_CMD);
if (iu) {
req = list_first_entry(&target->free_reqs, struct srp_request,
list);
list_del(&req->list);
}
// ...
if (!iu)
goto err;
// ...
scmnd->host_scribble = (void *) req;
and my gcc at least is not smart enough to see that we can't reach the
use of req without initializing req.
Simplest fix is to mark req with uninitialized_var() but maybe there's a
nicer way to handle this.
- R.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html