From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Mon, 7 Nov 2011 17:02:28 -0600 Subject: [U-Boot] Continuation line alignment In-Reply-To: <20111107220505.E5386189301B@gemini.denx.de> References: <1319647072-17504-1-git-send-email-gerlando.falauto@keymile.com> <1319647072-17504-2-git-send-email-gerlando.falauto@keymile.com> <20111105160958.F40D11893014@gemini.denx.de> <4EB84859.6000906@keymile.com> <20111107220505.E5386189301B@gemini.denx.de> Message-ID: <4EB86384.7010409@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 11/07/2011 04:05 PM, Wolfgang Denk wrote: > Dear Gerlando Falauto, > > In message <4EB84859.6000906@keymile.com> you wrote: >> >> -int _do_env_set (int flag, int argc, char * const argv[]) >> +int env_check_apply(const char *name, const char *oldval, >> + const char *newval, int flag) >> >>> Please use only TAB for indentation. Please fix globally. >> >> From fs/ubibfs/ubifs.h: > > Never ever use examples from other code to argument your's was right - > the example you chose might be wrong as well. > >> Could you please provide some examples as to what would be the correct >> coding style for function declarations and/or function calls that spawn >> on multiple lines? I could not find anything on the topic. > > http://www.denx.de/wiki/U-Boot/CodingStyle: > > Use TAB characters for indentation and vertical alignment, not > spaces It is impossible to align this nicely with tabs alone. Such alignment is not just an isolated example, but quite common in both the Linux kernel and U-Boot. Grep for a tab followed by a space... >> + if (himport_ex(&env_htab, (char *)default_environment, >> + sizeof(default_environment), '\0', 0, >> + 0, NULL, apply_function) == 0) { >> >> What should be the right indentation? > > In any case it makse no sense to have the 2nd and 3rd line indented > differently, right? They generally shouldn't be different from each other, but that doesn't answer the question of what it should look like. Documentation/CodingStyle calls for something like this: if (himport_ex(&env_htab, (char *)default_environment, sizeof(default_environment), '\0', 0, 0, NULL, apply_function) == 0) { ...but judging by how common it is, many people find this nicer: if (himport_ex(&env_htab, (char *)default_environment, sizeof(default_environment), '\0', 0, 0, NULL, apply_function) == 0) { I vote for allowing it, if anyone's counting. -Scott