> -----Original Message----- > From: [email protected] > [mailto:[email protected]] On > Behalf Of Yann Droneaud > Sent: Wednesday, March 26, 2014 9:34 AM > To: Hariprasad Shenai > Cc: [email protected]; [email protected]; > [email protected]; > [email protected]; [email protected] > Subject: Re: [PATCH 8/8] iw_cxgb4: Use uninitialized_var() > > Le mercredi 26 mars 2014 à 18:53 +0530, Hariprasad Shenai a écrit : > > From: Steve Wise <[email protected]> > > > > What for ? Please describe the reason to use uninitialized_var() >
Function poll_cq() fills out var cqe. The compiler doesn't know that so either you initialize cqe unnecessarily, or use uninitized_var(). The poll path is performance-critical, and I hate to initialize variables without reason. > > > Signed-off-by: Steve Wise <[email protected]> > > --- > > drivers/infiniband/hw/cxgb4/cq.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/infiniband/hw/cxgb4/cq.c > > b/drivers/infiniband/hw/cxgb4/cq.c > > index e17b155..cfaa56a 100644 > > --- a/drivers/infiniband/hw/cxgb4/cq.c > > +++ b/drivers/infiniband/hw/cxgb4/cq.c > > @@ -672,7 +672,7 @@ skip_cqe: > > static int c4iw_poll_cq_one(struct c4iw_cq *chp, struct ib_wc *wc) > > { > > struct c4iw_qp *qhp = NULL; > > - struct t4_cqe cqe = {0, 0}, *rd_cqe; > > + struct t4_cqe uninitialized_var(cqe), *rd_cqe; > > struct t4_wq *wq; > > u32 credit = 0; > > u8 cqe_flushed; > > > -- > 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 -- 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
