public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Gerlando Falauto <gerlando.falauto@keymile.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v0 1/4] Groundwork for generalization of env interface
Date: Mon, 07 Nov 2011 22:06:33 +0100	[thread overview]
Message-ID: <4EB84859.6000906@keymile.com> (raw)
In-Reply-To: <20111105160958.F40D11893014@gemini.denx.de>

On 11/05/2011 05:09 PM, Wolfgang Denk wrote:

[NOTE: I removed the quoting from the hunks as it would not make any sense]

-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:

int ubifs_decompress(const void *buf, int len, void *out, int *out_len,
		     int compr_type);

Here there are 2 tabs + 5 spaces to align arguments from the first line 
with those on the second line. I did the same (except that in a patch 
hunk the plus sign before the first tab shifts it to the right).

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.

As for:

-	if (ep) {		/* variable exists */
+	if ((oldval != NULL) /* variable exists */
+	 && ((flag & H_FORCE) == 0)) { /* and we are not forced */

Ditto. Here I was trying to align parentheses. Could you please provide 
an example? In my opinion, using only tabs would definitely make the two 
lines not aligned and make the code much harder to read.

As for:

+	if (himport_ex(&env_htab, (char *)default_environment,
+		    sizeof(default_environment), '\0', 0,
+		      0, NULL, apply_function) == 0) {

What should be the right indentation?

Perhaps for function calls you would want something like:

+	if (himport_ex(&env_htab, (char *)default_environment,
+		sizeof(default_environment), '\0', 0,
+		0, NULL, apply_function) == 0) {

As soon as I have these questions answered, I will apply all the other 
changes you requested, and submit a new patchset.
I would very much appreciate some feedback about the idea though.

Thank you,
Gerlando Falauto

  reply	other threads:[~2011-11-07 21:06 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-26 16:37 [U-Boot] [PATCH v0 0/4] env: reworking + default/import individual vars Gerlando Falauto
2011-10-26 16:37 ` [U-Boot] [PATCH v0 1/4] Groundwork for generalization of env interface Gerlando Falauto
2011-11-05 16:09   ` Wolfgang Denk
2011-11-07 21:06     ` Gerlando Falauto [this message]
2011-11-07 22:05       ` Wolfgang Denk
2011-11-07 23:02         ` [U-Boot] Continuation line alignment Scott Wood
2011-11-07 23:32           ` Gerlando Falauto
2011-11-07 23:44             ` Scott Wood
2011-11-07 23:58             ` Scott Wood
2011-11-08 10:20               ` Gerlando Falauto
2011-11-07 23:05         ` [U-Boot] [PATCH v0 1/4] Groundwork for generalization of env interface Gerlando Falauto
2011-11-07 23:30           ` Wolfgang Denk
2011-11-05 16:34   ` Wolfgang Denk
2011-10-26 16:37 ` [U-Boot] [PATCH v0 2/4] env: check and apply changes on delete/destroy Gerlando Falauto
2011-11-05 16:13   ` Wolfgang Denk
2011-10-26 16:37 ` [U-Boot] [PATCH v0 3/4] env: implement selective "env default" Gerlando Falauto
2011-11-05 16:40   ` Wolfgang Denk
2011-10-26 16:37 ` [U-Boot] [PATCH v0 4/4] env: implement "env import -n var[, var...]" Gerlando Falauto
2011-11-06 19:52 ` [U-Boot] [PATCH] env: fix "env ask" command Wolfgang Denk
2011-11-06 19:55   ` [U-Boot] [PATCH 1/2] Add SLRE - Super Light Regular Expression library Wolfgang Denk
2011-11-06 19:55     ` [U-Boot] [PATCH 2/2] env: add regex support for environment variables Wolfgang Denk
2011-11-07 11:07       ` Detlev Zundel
2013-03-22 21:44     ` [U-Boot] [PATCH 0/9] Add Regular Expressions Support Wolfgang Denk
2013-03-22 21:44       ` [U-Boot] [PATCH 1/9] hashtable: preparations to use hexport_r() for "env grep" Wolfgang Denk
2013-03-22 21:44       ` [U-Boot] [PATCH 2/9] "env grep" - reimplement command using hexport_r() Wolfgang Denk
2013-03-22 21:44       ` [U-Boot] [PATCH 3/9] "env grep" - add options to grep in name, value, or both Wolfgang Denk
2013-03-22 21:44       ` [U-Boot] [PATCH 4/9] Add SLRE - Super Light Regular Expression library Wolfgang Denk
2013-03-22 21:44       ` [U-Boot] [PATCH 5/9] "env grep" - add support for regular expression matches Wolfgang Denk
2013-03-22 21:44       ` [U-Boot] [PATCH 6/9] setexpr: simplify code, improve help message Wolfgang Denk
2013-03-22 21:44       ` [U-Boot] [PATCH 7/9] setexpr: add regex substring matching and substitution Wolfgang Denk
2013-03-22 22:36         ` Marek Vasut
2013-03-24  9:38           ` Wolfgang Denk
2013-03-22 21:44       ` [U-Boot] [PATCH 8/9] m28evk: enable "env grep" and regexp support Wolfgang Denk
2013-03-22 21:44       ` [U-Boot] [PATCH 9/9] amcc-common.h: enable support for "env grep", "setexpr", and regex Wolfgang Denk
2013-03-22 21:50       ` [U-Boot] [PATCH 0/9] Add Regular Expressions Support Wolfgang Denk
2013-03-23 12:18       ` Otavio Salvador
2013-03-24  9:41         ` Wolfgang Denk
2013-02-20 14:53   ` [U-Boot] [PATCH] env: fix "env ask" command Wolfgang Denk
2011-11-06 19:57 ` [U-Boot] [PATCH v0 0/4] env: reworking + default/import individual vars Wolfgang Denk
2011-11-06 22:15 ` Wolfgang Denk
2011-11-08  9:33   ` Gerlando Falauto
2011-11-08 11:46     ` Wolfgang Denk
2011-11-08 12:04       ` Gerlando Falauto
2011-11-08 12:47         ` Wolfgang Denk
2011-11-08 13:33           ` Holger Brunck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EB84859.6000906@keymile.com \
    --to=gerlando.falauto@keymile.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox