All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Steve Wise" <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
To: 'Yann Droneaud'
	<ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>,
	'Hariprasad Shenai'
	<hariprasad-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org,
	kumaras-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org,
	nirranjan-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org
Subject: RE: [PATCH 8/8] iw_cxgb4: Use uninitialized_var()
Date: Wed, 26 Mar 2014 09:48:11 -0500	[thread overview]
Message-ID: <004001cf4902$691d3dc0$3b57b940$@opengridcomputing.com> (raw)
In-Reply-To: <1395844433.3297.2.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>



> -----Original Message-----
> From: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org [mailto:linux-rdma-owner@vger.kernel.org] On
> Behalf Of Yann Droneaud
> Sent: Wednesday, March 26, 2014 9:34 AM
> To: Hariprasad Shenai
> Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org; swise@opengridcomputing.com;
> kumaras-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org; nirranjan-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org
> 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 <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
> >
> 
> 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 <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
> > ---
> >  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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> 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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2014-03-26 14:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-26 13:23 [PATCH 0/8] Endpoint timeout fix, SQ flush and other misc. fixes for iw_cxgb4 Hariprasad Shenai
     [not found] ` <1395840239-4368-1-git-send-email-hariprasad-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
2014-03-26 13:23   ` [PATCH 1/8] iw_cxgb4: endpoint timeout fixes Hariprasad Shenai
2014-03-26 13:23   ` [PATCH 2/8] iw_cxgb4: rmb() after reading valid gen bit Hariprasad Shenai
2014-03-26 13:23   ` [PATCH 3/8] iw_cxgb4: SQ flush fix Hariprasad Shenai
2014-03-26 13:23   ` [PATCH 4/8] iw_cxgb4: Max fastreg depth depends on DSGL support Hariprasad Shenai
2014-03-26 13:23   ` [PATCH 5/8] iw_cxgb4: Use pr_warn_ratelimited Hariprasad Shenai
2014-03-26 13:23   ` [PATCH 6/8] iw_cxgb4: Initialize reserved fields in a FW work request Hariprasad Shenai
2014-03-26 13:23   ` [PATCH 7/8] iw_cxgb4: Add missing debug stats Hariprasad Shenai
2014-03-26 13:23   ` [PATCH 8/8] iw_cxgb4: Use uninitialized_var() Hariprasad Shenai
     [not found]     ` <1395840239-4368-9-git-send-email-hariprasad-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
2014-03-26 14:33       ` Yann Droneaud
     [not found]         ` <1395844433.3297.2.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2014-03-26 14:48           ` Steve Wise [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='004001cf4902$691d3dc0$3b57b940$@opengridcomputing.com' \
    --to=swise-7bpotxp6k4+p2yhjcf5u+vpxobypeauw@public.gmane.org \
    --cc=hariprasad-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org \
    --cc=kumaras-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=nirranjan-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org \
    --cc=roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org \
    --cc=ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.