[PATCH v3 1/2] cmd: load: Fix code indentation

Reported by smatch like: cmd/load.c:228 read_record() warn: inconsistent indenting
Signed-off-by: Michal Simek michal.simek@xilinx.com ---
Changes in v3: - Remove additional dt changes
Changes in v2: - One } was missing. Get it back.
cmd/load.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/cmd/load.c b/cmd/load.c index 9a3a16979c71..c6a7cc465153 100644 --- a/cmd/load.c +++ b/cmd/load.c @@ -228,12 +228,11 @@ static int read_record(char *buf, ulong len) *p = c; }
- /* Check for the console hangup (if any different from serial) */ - if (gd->jt->getc != getchar) { - if (ctrlc()) { - return (-1); + /* Check for the console hangup (if any different from serial) */ + if (gd->jt->getc != getchar) { + if (ctrlc()) + return (-1); } - } }
/* line too long - truncate */

Reported by smatch like: common/usb_storage.c:430 us_one_transfer() warn: inconsistent indenting
Signed-off-by: Michal Simek michal.simek@xilinx.com ---
(no changes since v1)
common/usb_storage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/usb_storage.c b/common/usb_storage.c index ff254419951f..7742bad1440d 100644 --- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -431,8 +431,8 @@ static int us_one_transfer(struct us_data *us, int pipe, char *buf, int length) return 0; } /* if our try counter reaches 0, bail out */ - debug(" %ld, data %d\n", - us->pusb_dev->status, partial); + debug(" %ld, data %d\n", + us->pusb_dev->status, partial); if (!maxtry--) return result; }

st 2. 12. 2020 v 8:45 odesÃlatel Michal Simek michal.simek@xilinx.com napsal:
Reported by smatch like: common/usb_storage.c:430 us_one_transfer() warn: inconsistent indenting
Signed-off-by: Michal Simek michal.simek@xilinx.com
(no changes since v1)
common/usb_storage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/usb_storage.c b/common/usb_storage.c index ff254419951f..7742bad1440d 100644 --- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -431,8 +431,8 @@ static int us_one_transfer(struct us_data *us, int pipe, char *buf, int length) return 0; } /* if our try counter reaches 0, bail out */
debug(" %ld, data %d\n",
us->pusb_dev->status, partial);
debug(" %ld, data %d\n",
us->pusb_dev->status, partial); if (!maxtry--) return result; }
-- 2.29.2
Applied. M

On Wed, 2 Dec 2020 at 00:45, Michal Simek michal.simek@xilinx.com wrote:
Reported by smatch like: cmd/load.c:228 read_record() warn: inconsistent indenting
Signed-off-by: Michal Simek michal.simek@xilinx.com
Changes in v3:
- Remove additional dt changes
Changes in v2:
- One } was missing. Get it back.
cmd/load.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org

st 2. 12. 2020 v 8:45 odesÃlatel Michal Simek michal.simek@xilinx.com napsal:
Reported by smatch like: cmd/load.c:228 read_record() warn: inconsistent indenting
Signed-off-by: Michal Simek michal.simek@xilinx.com
Changes in v3:
- Remove additional dt changes
Changes in v2:
- One } was missing. Get it back.
cmd/load.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/cmd/load.c b/cmd/load.c index 9a3a16979c71..c6a7cc465153 100644 --- a/cmd/load.c +++ b/cmd/load.c @@ -228,12 +228,11 @@ static int read_record(char *buf, ulong len) *p = c; }
/* Check for the console hangup (if any different from serial) */
if (gd->jt->getc != getchar) {
if (ctrlc()) {
return (-1);
/* Check for the console hangup (if any different from serial) */
if (gd->jt->getc != getchar) {
if (ctrlc())
return (-1); }
} } /* line too long - truncate */
-- 2.29.2
Applied. M
participants (3)
-
Michal Simek
-
Michal Simek
-
Simon Glass