linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org" <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>
To: "Luick, Dean" <dean.luick-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Dan Carpenter
	<dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>,
	"devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b@public.gmane.org"
	<devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b@public.gmane.org>,
	"John,
	Jubin" <jubin.john-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org"
	<dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 12/13] staging/rdma/hfi1: Read EFI variable for device description
Date: Wed, 11 Nov 2015 09:24:11 -0800	[thread overview]
Message-ID: <20151111172411.GA20481@kroah.com> (raw)
In-Reply-To: <4AF12E8016D2BF46BCDFCE8FAA77A3580BC19FC8-AtyAts71sc9cIJlls4ac1rfspsVTdybXVpNB7YpNyf8@public.gmane.org>

On Wed, Nov 11, 2015 at 03:03:12PM +0000, Luick, Dean wrote:
> > -----Original Message-----
> > From: Dan Carpenter [mailto:dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org]
> > Sent: Wednesday, November 11, 2015 8:39 AM
> > To: Luick, Dean <dean.luick-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> > Cc: John, Jubin <jubin.john-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>; devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b@public.gmane.org;
> > gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org; dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org; linux-
> > rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> > Subject: Re: [PATCH 12/13] staging/rdma/hfi1: Read EFI variable for device
> > description
> > 
> > > > > +	if (efi_enabled(EFI_RUNTIME_SERVICES)) {
> > > >
> > > >
> > > > Flip this around:
> > > >
> > > > 	if (!efi_enabled(EFI_RUNTIME_SERVICES))
> > > > 		return -ENOSYS;
> > >
> > > The style here is very deliberate.
> > >
> > > The issue is how efi_enabled() is defined via CONFIG options.
> > >  The function can be turned into a 0 if certain CONFIG variables are
> > > not set.  The code is structured to make all of the dependent
> > > variables disappear if efi_enabled() becomes 0.
> > 
> > This all understand.
> > 
> > >  If the code is shifted as you suggest, we will get builds from the
> > > automatic builders that try all combinations with unused variables.
> > >  This was done to avoid that.
> > 
> > I'm not sure I understand.  You are doing this to try tricking the
> > autobuilders into not testind certain configs?  What?
> 
> Certainly not.  I did not explain this well.
> 
> > I don't
> > understand what you mean by unused variables.  There shouldn't be any
> > unused variable warnings.  If you are getting unused variable warnings
> > can you post one so that I can take a look?
> 
> If you move the variables to the top and have the early return as you suggest, then in some CONFIG cases, there will be all those automatic variables declared but they are never used - the compiler has short-circuited the rest of the function.  Will not the compiler complain about unused variables in those cases?  That is the situation I was trying to avoid.

Try it and see (hint, I don't think so...)
--
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:[~2015-11-11 17:24 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-11  7:33 [PATCH 01/13] staging/rdma/hfi1: Use BIT macro Jubin John
     [not found] ` <1447227213-15122-1-git-send-email-jubin.john-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-11-11  7:33   ` [PATCH 02/13] staging/rdma/hfi1: Fix downgrade race Jubin John
2015-11-11  7:33   ` [PATCH 03/13] staging/rdma/hfi1: remove RxCtxRHQS from hfi1stats Jubin John
2015-11-11  7:33   ` [PATCH 04/13] staging/rdma/hfi: Remove rcv bubbles code Jubin John
2015-11-11  7:33   ` [PATCH 05/13] staging/rdma/hfi1: Add space between concatenated string elements Jubin John
2015-11-11  7:33   ` [PATCH 06/13] staging/rdma/hfi1: Move s_sde to the read mostly portion of the hfi1_qp structure Jubin John
2015-11-11  7:33   ` [PATCH 07/13] staging/rdma/hfi1: rework is_a0() and is_bx() Jubin John
2015-11-11  7:33   ` [PATCH 08/13] staging/rdma/hfi1: change krcvqs module parameter type from byte to uint Jubin John
2015-11-11  7:33   ` [PATCH 09/13] staging/rdma/hfi1: Change default krcvqs Jubin John
2015-11-11  7:33   ` [PATCH 10/13] staging/rdma/hfi1: adding per SDMA engine stats to hfistats Jubin John
     [not found]     ` <1447227213-15122-10-git-send-email-jubin.john-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-11-11  8:22       ` Dan Carpenter
2015-11-16 21:33         ` Jubin John
2015-11-11  7:33   ` [PATCH 11/13] staging/rdma/hfi1: Remove unneeded variable index Jubin John
2015-11-11  7:33   ` [PATCH 12/13] staging/rdma/hfi1: Read EFI variable for device description Jubin John
     [not found]     ` <1447227213-15122-12-git-send-email-jubin.john-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-11-11  8:44       ` Dan Carpenter
2015-11-11 14:03         ` Luick, Dean
     [not found]           ` <4AF12E8016D2BF46BCDFCE8FAA77A3580BC19F69-AtyAts71sc9cIJlls4ac1rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-11-11 14:39             ` Dan Carpenter
2015-11-11 15:03               ` Luick, Dean
     [not found]                 ` <4AF12E8016D2BF46BCDFCE8FAA77A3580BC19FC8-AtyAts71sc9cIJlls4ac1rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-11-11 17:24                   ` gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r [this message]
     [not found]                     ` <20151111172411.GA20481-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2015-11-12 12:31                       ` Luick, Dean
2015-11-11  7:33   ` [PATCH 13/13] staging/rdma/hfi1: Adjust EPROM partitions, add EPROM commands Jubin John
2015-11-13 13:15   ` [PATCH 01/13] staging/rdma/hfi1: Use BIT macro Sudip Mukherjee
2015-11-13 16:09     ` Jubin John
     [not found]       ` <20151113160921.GA31028-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2015-11-13 18:03         ` Jubin John
     [not found]           ` <20151113180344.GA10934-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2015-11-13 18:25             ` Jubin John
2015-11-14  7:11         ` Sudip Mukherjee
2015-11-16 21:21           ` Jubin John

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=20151111172411.GA20481@kroah.com \
    --to=gregkh-hqyy1w1ycw8ekmwlsbkhg0b+6bgklq7r@public.gmane.org \
    --cc=dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=dean.luick-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=jubin.john-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).