RE: [PATCH 12/37] smartpqi: change functions to inline

2017-05-03 Thread Don Brace
> -Original Message-
> From: Bart Van Assche [mailto:bart.vanass...@sandisk.com]
> Sent: Tuesday, April 25, 2017 3:08 PM
> To: h...@infradead.org; Viswas G <viswa...@microsemi.com>; Gerry
> Morong <gerry.mor...@microsemi.com>; Mahesh Rajashekhara
> <mahesh.rajashekh...@microsemi.com>; posw...@suse.com; Scott
> Benesh <scott.ben...@microsemi.com>; Don Brace
> <don.br...@microsemi.com>; Bader Ali - Saleh
> <bader.alisa...@microsemi.com>; Kevin Barnett
> <kevin.barn...@microsemi.com>; joseph.szczy...@hpe.com; Scott Teel
> <scott.t...@microsemi.com>; j...@linux.vnet.ibm.com; Justin Lindley
> <justin.lind...@microsemi.com>; John Hall <john.h...@microsemi.com>
> Cc: linux-scsi@vger.kernel.org
> Subject: Re: [PATCH 12/37] smartpqi: change functions to inline
> 
> EXTERNAL EMAIL
> 
> 
> On Tue, 2017-04-25 at 14:47 -0500, Don Brace wrote:
> > From: Kevin Barnett <kevin.barn...@hpe.com>
> >
> > Reviewed-by: Scott Benesh <scott.ben...@microsemi.com>
> > Signed-off-by: Kevin Barnett <kevin.barn...@microsemi.com>
> > Signed-off-by: Don Brace <don.br...@microsemi.com>
> > ---
> >  drivers/scsi/smartpqi/smartpqi_init.c |2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/scsi/smartpqi/smartpqi_init.c
> b/drivers/scsi/smartpqi/smartpqi_init.c
> > index 728db8f..523b730 100644
> > --- a/drivers/scsi/smartpqi/smartpqi_init.c
> > +++ b/drivers/scsi/smartpqi/smartpqi_init.c
> > @@ -432,7 +432,7 @@ static struct pqi_io_request *pqi_alloc_io_request(
> >   return io_request;
> >  }
> >
> > -static void pqi_free_io_request(struct pqi_io_request *io_request)
> > +static inline void pqi_free_io_request(struct pqi_io_request *io_request)
> >  {
> >   atomic_dec(_request->refcount);
> >  }
> 
> A patch description should not only explain what has been changed but also
> why a change has been made. What is the reason that this function has been
> declared inline? Why do you think that the compiler is not smart enough to
> decide on its own to inline this function?
> 
> Thanks,
> 
> Bart.

We could have given a patch description. I'll provide one.

Thanks,
Don Brace
ESC - Smart Storage
Microsemi Corporation




Re: [PATCH 12/37] smartpqi: change functions to inline

2017-04-25 Thread Bart Van Assche
On Tue, 2017-04-25 at 14:47 -0500, Don Brace wrote:
> From: Kevin Barnett 
> 
> Reviewed-by: Scott Benesh 
> Signed-off-by: Kevin Barnett 
> Signed-off-by: Don Brace 
> ---
>  drivers/scsi/smartpqi/smartpqi_init.c |2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/smartpqi/smartpqi_init.c 
> b/drivers/scsi/smartpqi/smartpqi_init.c
> index 728db8f..523b730 100644
> --- a/drivers/scsi/smartpqi/smartpqi_init.c
> +++ b/drivers/scsi/smartpqi/smartpqi_init.c
> @@ -432,7 +432,7 @@ static struct pqi_io_request *pqi_alloc_io_request(
>   return io_request;
>  }
>  
> -static void pqi_free_io_request(struct pqi_io_request *io_request)
> +static inline void pqi_free_io_request(struct pqi_io_request *io_request)
>  {
>   atomic_dec(_request->refcount);
>  }

A patch description should not only explain what has been changed but also
why a change has been made. What is the reason that this function has been
declared inline? Why do you think that the compiler is not smart enough to
decide on its own to inline this function?

Thanks,

Bart.