Messages in this thread | | | Date | Mon, 14 Dec 2020 10:05:36 +0300 | From | Dan Carpenter <> | Subject | Re: mmc: atmel-mci: Reduce scope for the variable “slot” in atmci_request_end() |
| |
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
| |