From: Dan Carpenter Date: Mon, 14 Dec 2020 07:05:36 +0000 Subject: Re: mmc: atmel-mci: Reduce =?utf-8?Q?scope?= =?utf-8?Q?_for_the_variable_=E2=80=9Cslot=E2=80=9D?= in Message-Id: <20201214070536.GB2809@kadam> List-Id: References: <466b4c6d-032f-fbcc-58ac-75f6f39d734f@web.de> <20201210151035.GC1578121@piout.net> <20201211083731.GP2789@kadam> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Markus Elfring Cc: Ulf Hansson , Alexandre Belloni , kernel-janitors@vger.kernel.org, linux-mmc@vger.kernel.org, LKML , Ludovic Desroches , Colin Ian King , linux-arm-kernel@lists.infradead.org On Fri, Dec 11, 2020 at 10:08:54AM +0100, Markus Elfring wrote: > > This makes it hard to review any patches or follow discussion... > > You shared also special software development opinions about extra variable > initialisations occasionally, didn't you? I generally put everything at the top of the function... I don't have a well developed philosophy for when variables should be declared with a smaller scope. int ret; <-- this should always be function scope Probably the other people are right that making scopes shorter is more important when the function is very long. regards, dan carpenter