Re: InfiniBand-ocrdma: Delete unnecessary variable initialisations in 11 functions

From: Leon Romanovsky
Date: Fri Jan 15 2016 - 10:09:48 EST


On Fri, Jan 15, 2016 at 03:50:27PM +0100, SF Markus Elfring wrote:
> >> The variable "status" will be set to an appropriate value a bit later.
> >> Thus omit the explicit initialisation at the beginning.
> >
> > What did you try to achieve by this patch?
>
> I would like to optimise the affected source files a bit.
> Would you like to clarify any measurable effects around the implementation
> detail when various variables will only be initialised immediately
> before they will be read again?

Compiler will drop this variable initialization by itself because
there are no reads between this variable initialization and write.

I recommend you to take a look on the assembly code and ensure it
by yourself.

The proposed change won't affect performance at all.

>
> Regards,
> Markus