RE: [PATCH 12/13] staging/rdma/hfi1: Read EFI variable for device description

2015-11-12 Thread Luick, Dean
> -Original Message- > From: gre...@linuxfoundation.org [mailto:gre...@linuxfoundation.org] > Sent: Wednesday, November 11, 2015 11:24 AM > > 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 v

Re: [PATCH 12/13] staging/rdma/hfi1: Read EFI variable for device description

2015-11-11 Thread gre...@linuxfoundation.org
> > gre...@linuxfoundation.org; dledf...@redhat.com; linux- > > r...@vger.kernel.org > > Subject: Re: [PATCH 12/13] staging/rdma/hfi1: Read EFI variable for device > > description > > > > > > > + if (efi_enabled(EFI_RUNTIME_SERVICES)) { > &g

RE: [PATCH 12/13] staging/rdma/hfi1: Read EFI variable for device description

2015-11-11 Thread Luick, Dean
nel.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_RUNTI

Re: [PATCH 12/13] staging/rdma/hfi1: Read EFI variable for device description

2015-11-11 Thread Dan Carpenter
t; > To: John, Jubin > > Cc: gre...@linuxfoundation.org; de...@driverdev.osuosl.org; linux- > > r...@vger.kernel.org; dledf...@redhat.com > > Subject: Re: [PATCH 12/13] staging/rdma/hfi1: Read EFI variable for device > > description > > > > On Wed, Nov 11, 20

RE: [PATCH 12/13] staging/rdma/hfi1: Read EFI variable for device description

2015-11-11 Thread Luick, Dean
sl.org; linux- > r...@vger.kernel.org; dledf...@redhat.com > Subject: Re: [PATCH 12/13] staging/rdma/hfi1: Read EFI variable for device > description > > On Wed, Nov 11, 2015 at 02:33:32AM -0500, Jubin John wrote: > > +static int read_efi_var(const char *name, unsigned long *size, >

Re: [PATCH 12/13] staging/rdma/hfi1: Read EFI variable for device description

2015-11-11 Thread Dan Carpenter
On Wed, Nov 11, 2015 at 02:33:32AM -0500, Jubin John wrote: > +static int read_efi_var(const char *name, unsigned long *size, > + void **return_data) > +{ > + int ret; > + > + /* set failure return values */ > + *size = 0; > + *return_data = NULL; > + > + /*