public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* srp warning
@ 2011-01-12 17:43 Roland Dreier
       [not found] ` <adalj2q587i.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 16+ messages in thread
From: Roland Dreier @ 2011-01-12 17:43 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA, David Dillow

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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2011-01-13 19:22 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-12 17:43 srp warning Roland Dreier
     [not found] ` <adalj2q587i.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2011-01-12 17:52   ` David Dillow
     [not found]     ` <1294854748.15826.26.camel-FqX9LgGZnHWDB2HL1qBt2PIbXMQ5te18@public.gmane.org>
2011-01-12 18:02       ` Roland Dreier
     [not found]         ` <ada8vyq57bq.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2011-01-12 19:42           ` David Dillow
     [not found]             ` <1294861341.15826.38.camel-FqX9LgGZnHWDB2HL1qBt2PIbXMQ5te18@public.gmane.org>
2011-01-12 19:46               ` Roland Dreier
     [not found]                 ` <adaoc7l52hy.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2011-01-12 19:50                   ` Roland Dreier
     [not found]                     ` <adak4i952bk.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2011-01-12 21:07                       ` David Dillow
     [not found]                         ` <1294866460.15826.41.camel-FqX9LgGZnHWDB2HL1qBt2PIbXMQ5te18@public.gmane.org>
2011-01-12 21:23                           ` Roland Dreier
2011-01-13  7:06                           ` Bart Van Assche
2011-01-13 11:19                           ` Bart Van Assche
     [not found]                             ` <AANLkTi=RP74hwT5nEr7XHyADPoE-7LKs8ECT_5QfS4pZ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-01-13 15:21                               ` David Dillow
     [not found]                                 ` <1294932071.3667.5.camel-FqX9LgGZnHWDB2HL1qBt2PIbXMQ5te18@public.gmane.org>
2011-01-13 19:10                                   ` Bart Van Assche
     [not found]                                     ` <AANLkTinxZ=x9uQH-r1TN003HT1aKu_KjgF8-aXDkKzTm-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-01-13 19:22                                       ` David Dillow
2011-01-13 18:48                               ` Roland Dreier
2011-01-12 22:40               ` Jason Gunthorpe
     [not found]                 ` <20110112224016.GA2155-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2011-01-12 22:44                   ` David Dillow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox