> 0xe1,
> 0x00, 0x10, 0x1f, 0x10, 0x00, 0x48, 0x2d, 0xe9, 0x04, 0xb0, 0x8d,
> 0xe2,
> 0x08, 0x00, 0x9f, 0xe5, 0xe6, 0xff, 0xff, 0xeb, 0x00, 0x00, 0xa0,
> 0xe1,
> 0x00, 0x88, 0xbd, 0xe8, 0x84, 0x00, 0x01, 0x00, 0x00, 0x10, 0x1f,
> 0x10,
> 'H', 'e', 'l', 'l','o', ' ', 'w', 'o','r', 'l', 'd', '!',
> '\n', '\0'
> };
>
> ?
Yes, good suggestion. Your version is clearer and more readable for humans.
Best,
Su Hang
s; if not, I will
implement it after my task get finished.
Sincerely sorry for the trouble I might made.
SU Hang
> -Original Messages-
> From: "Stefan Hajnoczi"
> Sent Time: 2018-06-11 21:55:07 (Monday)
> To: "Su Hang"
> Cc: qemu-devel@nongnu.org, jus
For example, in my past patch
serias, "Hello World!" will be printed out, if Hex File get successfully loaded.
Julia has told me a method, I haven't tried it. I will do it as quick as I
could.
Best,
Su Hang
> -Original Messages-
> From: "Stefan Hajnoczi"
Sure, Thanks for remind me of this.
One thing I must point out, in current code logic, if "START_SEG_ADDR_RECORD"
occured multiple times, only the last one works. I don't know whether GNU
binutils would emit 'The Record' many times.
Best,
SU Hang
> -Original M
ned me about this. But at that time, I was thinking
about "get this patch merged first, then add support for armv7m". I am wrong.
SU Hang
> -Original Messages-
> From: "Peter Maydell"
> Sent Time: 2018-05-24 22:40:04 (Thursday)
> To: "Su Hang"
Sure, I will list other involved files. Thanks for you suggestion.
SU Hang
"Eric Blake" wrote:
> On 05/24/2018 06:29 AM, Su Hang wrote:
> > 'test.hex' file is a bare metal ARM software stored in Hexadecimal
> > Object Format. When it's loaded by QEM
tream
for you to fetch changes up to a9120811a5b9109d79f704e0a79fb851860e9f04:
Add QTest testcase for the Intel Hexadecimal Object File Loader. (2018-05-24
18:54:02 +0800)
--------
Su Hang (2):
Implement .hex file loader
Add QTes
h is used to verify correctness.
Reviewed-by: Stefan Hajnoczi
Suggested-by: Steffen Gortz
Suggested-by: Stefan Hajnoczi
Signed-off-by: Su Hang
---
MAINTAINERS | 6
configure| 4 +++
tests/Makefile.include | 2 ++
tests/hex-lo
, etc.
Reviewed-by: Stefan Hajnoczi
Suggested-by: Stefan Hajnoczi
Signed-off-by: Su Hang
---
hw/arm/boot.c | 7 +-
hw/core/loader.c| 246
include/hw/loader.h | 12 +++
3 files changed, 264 insertions(+), 1 deletion(-)
diff --git a
, etc.
Reviewed-by: Stefan Hajnoczi
Suggested-by: Stefan Hajnoczi
Signed-off-by: Su Hang
---
hw/arm/boot.c | 7 +-
hw/core/loader.c| 246
include/hw/loader.h | 12 +++
3 files changed, 264 insertions(+), 1 deletion(-)
diff --git a
h is used to verify correctness.
Reviewed-by: Stefan Hajnoczi
Suggested-by: Steffen Gortz
Suggested-by: Stefan Hajnoczi
Signed-off-by: Su Hang
---
MAINTAINERS | 6
configure| 4 +++
tests/Makefile.include | 2 ++
tests/hex-lo
_blob_as`, replace it with
`rom_add_blob_fixed_as`, because they are equivalent;
v9:
-- Modify 'configure' file and test data file path in 'hexloader-test.c' to
support 'hexloader-test.c' out-of-tree builds and run;
Su Hang (2):
Implement .hex file load
Great! Thanks for your suggestion!
Best,
SU Hang
"Steffen Görtz" wrote:
> On 10.05.2018 09:18, Su Hang wrote:
>
> Hi,
> this will be my first comment on devel as part of my GSoC participation
> this year.
>
> > +
> > +QTestState *s = qtest_star
h is used to verify correctness.
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Su Hang
---
MAINTAINERS | 6
tests/Makefile.include | 2 ++
tests/hex-loader-check-data/test.hex | 12
tests/hexloader-test.c | 56 +++
, etc.
Suggested-by: Stefan Hajnoczi
Signed-off-by: Su Hang
---
hw/arm/boot.c | 7 +-
hw/core/loader.c| 246
include/hw/loader.h | 12 +++
3 files changed, 264 insertions(+), 1 deletion(-)
diff --git a/hw/arm/boot.c b/hw/arm/boot.c
_blob_as`, replace it with
`rom_add_blob_fixed_as`, because they are equivalent;
Su Hang (2):
Implement .hex file loader
Add QTest testcase for the Intel Hexadecimal Object File Loader.
MAINTAINERS | 6 +
hw/arm/boot.c
; > and microcontrollers, such as Micro:bit Arduino, ARM, STM32, etc.
> >
>
> The hex format is used mainly by Cortex-M boards. This code doesn't
> support them, because armv7m uses its own load function. Could you add
> support for armv7m?
Sure, I'm willing to help, but in the next patch, not in this patch series.
Best,
Su Hang
h is used to verify correctness.
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Su Hang
---
MAINTAINERS | 6
tests/Makefile.include | 2 ++
tests/hex-loader-check-data/test.hex | 12
tests/hexloader-test.c | 56 +++
_blob_as`, replace it with
`rom_add_blob_fixed_as`, because they are equivalent;
Su Hang (2):
Implement .hex file loader
Add QTest testcase for the Intel Hexadecimal Object File Loader.
MAINTAINERS | 6 +
hw/arm/boot.c
, etc.
Suggested-by: Stefan Hajnoczi
Signed-off-by: Su Hang
---
hw/arm/boot.c | 7 +-
hw/core/loader.c| 246
include/hw/loader.h | 12 +++
3 files changed, 264 insertions(+), 1 deletion(-)
diff --git a/hw/arm/boot.c b/hw/arm/boot.c
arser.line.byte_count) * 2 != record_index)`
-- Remove unused field `max_sz`;
-- Replace `int` with `size_t` for local variable `total_size`
in function `parse_hex_blob`
-- Rename function `load_image_targphys_hex_as` argument `addr` to `entry`;
Su Hang (2):
Implement .hex file loader
Add QT
ude/hw/core/generic-loader.h
F: docs/generic-loader.txt
+Intel Hexadecimal Object File Loader
+M: Su Hang
+S: Maintained
+F: tests/hexloader-test.c
+F: tests/hex-loader-check-data/test.hex
+
CHRP NVRAM
M: Thomas Huth
S: Maintained
diff --git a/tests/Makefile.include b/tests/Makefile.include
index
, etc.
Suggested-by: Stefan Hajnoczi
Signed-off-by: Su Hang
---
hw/arm/boot.c | 10 ++-
hw/core/loader.c| 246
include/hw/loader.h | 15
3 files changed, 269 insertions(+), 2 deletions(-)
diff --git a/hw/arm/boot.c b/hw/arm
should I use `long long` instead of `int`?
Su Hang
> A malicious input file can control the following values:
> * record_index using whitespace (see "case default" below)
> * byte_count in range [0x00, 0xff]
> * our_checksum = 0 by choosing the right address field values
Oh, that is really a disaster...
Thanks for
ude/hw/core/generic-loader.h
F: docs/generic-loader.txt
+Intel Hexadecimal Object File Loader
+M: Su Hang
+S: Maintained
+F: tests/hexloader-test.c
+F: tests/hex-loader-check-data/test.hex
+
CHRP NVRAM
M: Thomas Huth
S: Maintained
diff --git a/tests/Makefile.include b/tests/Makefile.include
index
, etc.
Suggested-by: Stefan Hajnoczi
Signed-off-by: Su Hang
---
hw/arm/boot.c | 17 ++--
hw/core/loader.c| 241
include/hw/loader.h | 16
3 files changed, 269 insertions(+), 5 deletions(-)
diff --git a/hw/arm/boot.c b/hw/arm
type to store entry point;
Su Hang (2):
Implement .hex file loader
Add QTest testcase for the Intel Hexadecimal Object File Loader.
MAINTAINERS | 6 +
hw/arm/boot.c| 17 ++-
hw/core/loader.c | 241
ude/hw/core/generic-loader.h
F: docs/generic-loader.txt
+Intel Hexadecimal Object File Loader
+M: Su Hang
+S: Maintained
+F: tests/hexloader-test.c
+F: tests/hex-loader-check-data/test.hex
+
CHRP NVRAM
M: Thomas Huth
S: Maintained
diff --git a/tests/Makefile.include b/tests/Makefile.include
index
.
Suggested-by: Stefan Hajnoczi
Signed-off-by: Su Hang
---
hw/arm/boot.c | 18 ++--
hw/core/loader.c| 253
include/hw/loader.h | 14 +++
3 files changed, 280 insertions(+), 5 deletions(-)
diff --git a/hw/arm/boot.c b/hw/arm/boot.c
index
ype cast;
Remove duplicate zero-initialization;
Correct typos;
Su Hang (2):
Implement .hex file loader
Add QTest testcase for the Intel Hexadecimal Object File Loader.
MAINTAINERS | 6 +
hw/arm/boot.c| 18 ++-
hw/core/loader.c
> -Original Messages-
> From: "Su Hang"
> Sent Time: 2018-04-16 22:49:48 (Monday)
> To: "stefan hajnoczi"
> Cc: "jim mussared" , qemu-devel
> , "joel stanley"
> Subject: Re: [Qemu-devel] [PATCH v4 1/2] Implement .hex file l
o_cpu() the first time you suggested it to me,
but qemu crashed...
I have read other places call this function to verify I use it correctly,
but it did crash(that's why I choose bswap16()), It's strange...
I'll report more detail about this case tomorrow.
Thank you for your patience
Thanks for your detailed reply! I will carefully treat
all the content that you mentioned, and apply them in v5.
> -Original Messages-
> From: "Stefan Hajnoczi"
> Sent Time: 2018-04-14 22:08:43 (Saturday)
> To: "Su Hang"
> Cc: "Jim Mussared"
Dear Kevin:
I notice checkpatch.pl complained about code style problems,
you may want to replace `while (aio_poll(bs->aio_context, false));`
with
```
while (aio_poll(bs->aio_context, false)) {
/* No further work */
}
```
to suppress the complaints.
Best,
Su Hang
"Kevin Wolf"
.
Suggested-by: Stefan Hajnoczi
Signed-off-by: Su Hang
---
hw/arm/boot.c | 9 +-
hw/core/loader.c| 280
include/hw/loader.h | 17
3 files changed, 305 insertions(+), 1 deletion(-)
diff --git a/hw/arm/boot.c b/hw/arm/boot.c
index
ude/hw/core/generic-loader.h
F: docs/generic-loader.txt
+Intel Hexadecimal Object File Loader
+M: Su Hang
+S: Maintained
+F: tests/hexloader-test.c
+F: tests/hex-loader-check-data/test.hex
+
CHRP NVRAM
M: Thomas Huth
S: Maintained
diff --git a/tests/Makefile.include b/tests/Makefile.include
index
hexloader-test.c.
Su Hang (2):
Implement .hex file loader
Add QTest testcase for the Intel Hexadecimal Object File Loader.
MAINTAINERS | 6 +
hw/arm/boot.c| 9 +-
hw/core/loader.c | 280 ++
\s*if/) {
``` that wraps '($line =~ /(\}.*)$/)' limits the scope of the match.
Best,
Su Hang
> -Original Messages-
> From: "Eric Blake"
> Sent Time: 2018-04-05 02:28:13 (Thursday)
> To: "Su Hang" , vsement...@virtuozzo.com
> Cc: qemu-t
ude/hw/core/generic-loader.h
F: docs/generic-loader.txt
+Intel Hexadecimal Object File Loader
+M: Su Hang
+S: Maintained
+F: tests/hexloader-test.c
+F: tests/hex-loader-check-data/test.hex
+
CHRP NVRAM
M: Thomas Huth
S: Maintained
diff --git a/tests/Makefile.include b/tests/Makefile.include
index
.
Suggested-by: Stefan Hajnoczi
Signed-off-by: Su Hang
---
hw/arm/boot.c | 9 +-
hw/core/loader.c| 280
include/hw/loader.h | 17
3 files changed, 305 insertions(+), 1 deletion(-)
diff --git a/hw/arm/boot.c b/hw/arm/boot.c
index
These series of patchs implement Intel Hexadecimal File loader and
add QTest testcase to verify the correctness of Loader.
v1: Basic version.
v2: Replace `do{}while(cond);` block with `for(;;)` block.
v3: Add two new files information in MAINTAINERS.
Su Hang (2):
Implement .hex file loader
.
Suggested-by: Stefan Hajnoczi
Signed-off-by: Su Hang
---
hw/arm/boot.c | 9 +-
hw/core/loader.c| 280
include/hw/loader.h | 17
3 files changed, 305 insertions(+), 1 deletion(-)
diff --git a/hw/arm/boot.c b/hw/arm/boot.c
index
These series of patchs implement Intel Hexadecimal File loader and
add QTest testcase to verify the correctness of Loader.
v1: Basic version.
v2: Replace `do{}while(cond);` block with `for(;;)` block.
v3: Add two new files information in MAINTAINERS.
Su Hang (2):
Implement .hex file loader
ude/hw/core/generic-loader.h
F: docs/generic-loader.txt
+Intel Hexadecimal Object File Loader
+M: Su Hang
+S: Maintained
+F: tests/hexloader-test.c
+F: tests/hex-loader-check-data/test.hex
+
CHRP NVRAM
M: Thomas Huth
S: Maintained
diff --git a/tests/Makefile.include b/tests/Makefile.include
index
Thanks for your reply! Owning to cultural difference, I used to regard “RFC” as
a way of show modest...
I will apply your suggestion in v3.
Best,
Su Hang
"Eric Blake" wrote:
> On 04/04/2018 10:19 AM, Su Hang wrote:
> > These series of patchs implement Intel Hexadecimal File
A bit embarrassing, this mistake was introduced by me. I submitted a
corresponding patch to fix it, but no one has reviewed it.
See link below:
http://lists.nongnu.org/archive/html/qemu-devel/2018-03/msg06506.html
"Eric Blake" wrote:
> On 04/03/2018 10:37 AM, no-re...@patchew.org wrote:
> > Hi,
>
.
Suggested-by: Stefan Hajnoczi
Signed-off-by: Su Hang
---
hw/arm/boot.c | 9 +-
hw/core/loader.c| 280
include/hw/loader.h | 17
3 files changed, 305 insertions(+), 1 deletion(-)
diff --git a/hw/arm/boot.c b/hw/arm/boot.c
index
+1,56 @@
+/*
+ * QTest testcase for the Intel Hexadecimal Object File Loader
+ *
+ * Authors:
+ * Su Hang 2018
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ *
+ */
+
+#include "qemu/osdep.h"
+
These series of patchs implement Intel Hexadecimal File loader and
add QTest testcase to verify the correctness of Loader.
v1: Basic version.
v2: Replace `do{}while(cond);` block with `for(;;)` block to
suppress code style complain.
Su Hang (2):
Implement .hex file loader
Add QTest testcase
.
Suggested-by: Stefan Hajnoczi
Signed-off-by: Su Hang
---
hw/arm/boot.c | 9 +-
hw/core/loader.c| 280
include/hw/loader.h | 17
3 files changed, 305 insertions(+), 1 deletion(-)
diff --git a/hw/arm/boot.c b/hw/arm/boot.c
index
These series of patchs implement Intel Hexadecimal File loader and
add QTest testcase to verify the correctness of Loader.
Su Hang (2):
Implement .hex file loader
Add QTest testcase for the Intel Hexadecimal Object File Loader.
hw/arm/boot.c | 9 +-
hw/core/loader.c | 280
+1,56 @@
+/*
+ * QTest testcase for the Intel Hexadecimal Object File Loader
+ *
+ * Authors:
+ * Su Hang 2018
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ *
+ */
+
+#include "qemu/osdep.h"
+
Please ignore this email, this patch was accidentally sent.
"Su Hang" wrote:
> checkpatch.pl stops complaining about following pattern:
> """
> do {
> //do somethins;
> } while (conditions);
> """
>
> One things need to be ment
mp;
$line !~ /\#\s*else/) {
"""
I'm not sure, please give me some advice.
(Sorry, I don't know this patch should base on which commit,
so I generate this patch based on
commit:fb8446d94ec7a3dc0c3a7e7da672406476f075ac,
I choose this by `git log -2 scripts/checkpa
These series of patchs implement Intel Hexadecimal File loader and
add QTest testcase to verify the correctness of Loader.
Su Hang (2):
Implement .hex file loader
Add QTest testcase for the Intel Hexadecimal Object File Loader.
hw/arm/boot.c | 9 +-
hw/core/loader.c | 280
+1,56 @@
+/*
+ * QTest testcase for the Intel Hexadecimal Object File Loader
+ *
+ * Authors:
+ * Su Hang 2018
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ *
+ */
+
+#include "qemu/osdep.h"
+
.
Suggested-by: Stefan Hajnoczi
Signed-off-by: Su Hang
---
hw/arm/boot.c | 9 +-
hw/core/loader.c| 280
include/hw/loader.h | 17
3 files changed, 305 insertions(+), 1 deletion(-)
diff --git a/hw/arm/boot.c b/hw/arm/boot.c
index
Commit 2b9aef6fcd96ba7ed8c1ee723e391901852d344c introduced a regression:
checkpatch.pl started complaining about the following valid pattern:
do {
/* something */
} while (condition);
Fix the script to once again permit this pattern.
Signed-off-by: Su Hang
---
v1: fix bug.
v2: correct
Thanks for your reply. :-)
Su Hang
"Paolo Bonzini" wrote:
> On 22/03/2018 08:03, Su Hang wrote:
> > When I was reading 'qemu/hw/timer/m48t59.c'(Line:328) and run with
> > `make check-qtest-ppc`,
> > I found when write an invalid value 0xc to address 0x
static inline uint8_t from_bcd(uint8_t val)
{
return ((val >> 4) * 10) + (val & 0x0f);
}
"""
Su Hang
Commit 2b9aef6fcd96ba7ed8c1ee723e391901852d344c introduced a regression:
checkpatch.pl started complaining about the following valid pattern:
do {
/* something */
} while (condition);
Fix the script to once again permit this pattern.
Signed-off-by: Su Hang
---
v1: fix bug.
v2: correct
description.
Signed-off-by: Su Hang
---
scripts/checkpatch.pl | 15 +--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 57daae05ea18..d52207a3cc9d 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2356,6
> -Original Messages-
> From: "Eric Blake"
> Sent Time: 2018-03-19 23:25:20 (Monday)
> To: "Su Hang" , vsement...@virtuozzo.com
> Cc: qemu-devel@nongnu.org
> Subject: Re: [Qemu-devel] [PATCH RFC] scripts/checkpatch.pl: Bug fix
> Having the c
Bug fix: checkpatch.pl stops complaining about following pattern:
"""
do {
//do somethins;
} while (conditions);
"""
Signed-off-by: Su Hang
---
scripts/checkpatch.pl | 15 +--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/s
Thanks for your reply!
I'm glad to understand where problem lies.
Su Hang
> -Original Messages-
> From: "Fam Zheng"
> Sent Time: 2018-03-16 15:08:19 (Friday)
> To: "Su Hang"
> Cc: peter.mayd...@linaro.org, vsement...@virtuozzo.com, qemu-dev
Because I generate my first patch on master, it should work.
I have a little trouble understanding what Mr.Peter wants me to do,
would you please spare a little of your time and have a look at it?
It will help me. Please...
Su Hang
> -Original Messages-
> From: "Fam Zheng&qu
mp;
$line !~ /\#\s*else/) {
"""
I'm not sure, please give me some advice.
(Sorry, I don't know this patch should base on which commit,
so I generate this patch based on
commit:fb8446d94ec7a3dc0c3a7e7da672406476f075ac,
I choose this by `git log -2 scripts/checkpa
for (i = 0; i < 0; ++i)
+{
"""
Instead of:
"""
ERROR: braces {} are necessary even for single statement blocks
#4: FILE: test.c:4:
+for (i = 0; i < 0; ++i)
+{
+;
+}
"""
> -----Original Messages-
> From: &qu
*if/ &&
$line !~ /\#\s*else/) {
"""
But I think, maybe it's ok, becasue all check has been done by
up block. I'm not sure, please give me some advice.
Signed-off-by: Su Hang
---
scripts/checkpatch.pl | 15 +--
1 file changed, 13 insertions(+),
Sincerely sorry for my negligence to cause this bug!
I will fix it as quick as I can!
Sorry again, I'm really ashamed about the mistake I have made.
Su Hang
> -Original Messages-
> From: "Dr. David Alan Gilbert"
> Sent Time: 2018-03-14 04:10:24 (Wednesday)
&
> -Original Messages-
> From: "Peter Maydell"
> Sent Time: 2018-03-12 19:40:22 (Monday)
> To: "Su Hang"
> Cc: "thomas huth" , "QEMU Developers"
>
> Subject: Re: [Qemu-devel] BiteSizedTasks: API conversion
>
>
space_write_rom`.
By the way, sorry I don't find tool like `WikiBlame`, to help me find
who add this task. So I can't CC others but you.
Best,
Su Hang
27;
But it doesn't do the same check for `for` and `while` statements.
Using `(?:...)` instead of `(...)` in regex pattern catch.
Because `(?:...)` is faster and avoids unwanted side-effect.
Suggested-by: Stefan Hajnoczi
Suggested-by: Eric Blake
Suggested-by: Thomas Huth
Signed-off-by: Su H
As too many emails overwhelmed my email box, I am very sorry for not seeing
your reply until this morning.
I will fix wrong using of git right now!
"Stefan Hajnoczi" wrote:
> On Wed, Feb 28, 2018 at 11:31:29AM +0800, Su Hang wrote:
> > Adding check for `while` and `for
27;
But it doesn't do the same check for `for` and `while` statements.
Using `(?:...)` instead of `(...)` in regex pattern catch.
Because `(?:...)` is faster and avoids unwanted side-effect.
Suggested-by: Stefan Hajnoczi
Suggested-by: Eric Blake
Suggested-by: Thomas Huth
Signed-off-by: Su H
I can't be too happy to know my first patch get accepted! ^_^
I hope I can make more contributions to community!
> -Original Messages-
> From: "Thomas Huth"
> Sent Time: 2018-02-26 14:49:46 (Monday)
> To: "Su Hang" , boxa...@163.com
> Cc:
27;
But it doesn't do the same check for `for` and `while` statements.
Suggested-by: Eric Blake
Suggested-by: Thomas Huth
Signed-off-by: Su Hang
---
scripts/checkpatch.pl | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
inde
Signed-off-by: Su Hang
---
util/uri.c | 1468 ++--
1 file changed, 735 insertions(+), 733 deletions(-)
diff --git a/util/uri.c b/util/uri.c
index 21b18281703a..cf09f41735a1 100644
--- a/util/uri.c
+++ b/util/uri.c
@@ -63,7 +63,6 @@ static
; /tmp/uri-cleanup.txt
diff -u /tmp/uri-*.txt
'''
With that, all complaints raised by checkpatch.pl have been suppressed.
Suggested-by: Thomas Huth
Suggested-by: Eric Blake
Signed-off-by: Su Hang
---
util/uri.c | 463 +++--
1 file
only remove brackets that wrap `return` statements' content.
use `perl -pi -e "s/return \((.*?)\);/return \1;/g" util/uri.c`
to remove pattern like this: "return (1);"
Signed-off-by: Su Hang
---
util/uri.c | 160 ++--
Su Hang (3):
util/uri.c: Coding style check, Only whitespace involved.
util/uri.c: remove brackets () that wrap `return` statement's content.
util/uri.c: wrap single statement blocks with braces {}
util/uri.c | 1753
1
Signed-off-by: Su Hang
---
util/uri.c | 1468 ++--
1 file changed, 735 insertions(+), 733 deletions(-)
diff --git a/util/uri.c b/util/uri.c
index 21b18281703a..cf09f41735a1 100644
--- a/util/uri.c
+++ b/util/uri.c
@@ -63,7 +63,6 @@ static
; /tmp/uri-cleanup.txt
diff -u /tmp/uri-*.txt
'''
With that, all complaints raised by checkpatch.pl have been suppressed.
Suggested-by: Thomas Huth
Suggested-by: Eric Blake
Signed-off-by: Su Hang
---
util/uri.c | 463 +++--
1 file
only remove brackets that wrap `return` statements' content.
use `perl -pi -e "s/return \((.*?)\);/return \1;/g" util/uri.c`
to remove pattern like this: "return (1);"
Signed-off-by: Su Hang
---
util/uri.c | 160 ++--
*** BLURB HERE ***
Su Hang (3):
util/uri.c: Coding style check, Only whitespace involved.
util/uri.c: remove brackets () that wrap `return` statement's content.
util/uri.c: wrap single statement blocks with braces {}
util/uri.c |
27;
But it doesn't do the same check for `for` and `while` statement.
Suggested-by: Eric Blake
Suggested-by: Thomas Huth
Signed-off-by: Su Hang
---
scripts/checkpatch.pl | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
inde
27;
But it doesn't do the same check for `for` and `while`.
Suggested-by: Eric Blake
Suggested-by: Thomas Huth
Signed-off-by: Su Hang
---
scripts/checkpatch.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 1b4b812e28fa
only remove brackets that wrap `return` statements' content.
use `perl -pi -e "s/return \((.*?)\);/return \1;/g" util/uri.c`
to remove pattern like this: "return (1);"
Signed-off-by: Su Hang
---
util/uri.c | 160 ++--
Add brackets that wrap `if`, `else`, `while` that hold single
statements.
In order to do this, I write a simple python regex script.
Since then, all complaints rised by checkpatch.pl has been suppressed.
Signed-off-by: Su Hang
---
util/uri.c | 462
Formating with clang-format. Change back few code by hand,
to make sure only include whitespace change.
Signed-off-by: Su Hang
---
util/uri.c | 1456 ++--
1 file changed, 729 insertions(+), 727 deletions(-)
diff --git a/util/uri.c b/util
;& (bas->path[cur] != '/'))
+cur++;
ERROR: braces {} are necessary for all arms of this statement
#1805: FILE: uri.c:1805:
+if (bas->path[cur] == 0)
[...]
'''
Signed-off-by: Su Hang
---
util/uri.c | 611 ++
92 matches
Mail list logo