From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753220AbcAOPJq (ORCPT ); Fri, 15 Jan 2016 10:09:46 -0500 Received: from mail-wm0-f53.google.com ([74.125.82.53]:35342 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751180AbcAOPJn (ORCPT ); Fri, 15 Jan 2016 10:09:43 -0500 Date: Fri, 15 Jan 2016 17:09:35 +0200 From: Leon Romanovsky To: SF Markus Elfring Cc: linux-rdma@vger.kernel.org, Devesh Sharma , Doug Ledford , Hal Rosenstock , Mitesh Ahuja , Sean Hefty , Selvin Xavier , LKML , kernel-janitors@vger.kernel.org, Julia Lawall Subject: Re: InfiniBand-ocrdma: Delete unnecessary variable initialisations in 11 functions Message-ID: <20160115150935.GA32346@leon.nu> Reply-To: leon@leon.nu Mail-Followup-To: SF Markus Elfring , linux-rdma@vger.kernel.org, Devesh Sharma , Doug Ledford , Hal Rosenstock , Mitesh Ahuja , Sean Hefty , Selvin Xavier , LKML , kernel-janitors@vger.kernel.org, Julia Lawall References: <566ABCD9.1060404@users.sourceforge.net> <567EDED5.4040201@users.sourceforge.net> <5697D865.5010507@users.sourceforge.net> <5697DE31.9040309@users.sourceforge.net> <20160115132014.GC30615@leon.nu> <56990733.7000506@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56990733.7000506@users.sourceforge.net> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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