mmc: atmel-mci: Reduce scope for the variable “slot” in atmci_request_end()
Dan Carpenter
dan.carpenter at oracle.com
Mon Dec 14 02:05:36 EST 2020
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
More information about the linux-arm-kernel
mailing list