Skip to contentSkip to conversation

bsd-user: space required after semicolon

PATCH In review shiliyang 3 participants 4 messages Nov 4, 2020 – Nov 5, 2020 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

shiliyang

author
#1 lore raw

PATCH 1/4 bsd-user: space required after semicolon

This patch fixes error style problems found by checkpatch.pl:
ERROR: space required after that ';'

---
 bsd-user/elfload.c | 2 +-
 bsd-user/syscall.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
bsd-user/elfload.c +1 -1
index 9f4210af9a..25e625d86b 100644
@@ -1227,7 +1227,7 @@ int load_elf_binary(struct linux_binprm *bprm, struct target_pt_regs *regs,
     end_data = 0;
     interp_ex.a_info = 0;
 
-    for(i=0;i < elf_ex.e_phnum; i++) {
+    for(i=0; i < elf_ex.e_phnum; i++) {
         if (elf_ppnt->p_type == PT_INTERP) {
             if ( elf_interpreter != NULL )
             {
bsd-user/syscall.c +2 -2
index 9b471b665c..b178d87de1 100644
@@ -271,7 +271,7 @@ static abi_long lock_iovec(int type, struct iovec *vec, abi_ulong target_addr,
     target_vec = lock_user(VERIFY_READ, target_addr, count * sizeof(struct target_iovec), 1);
     if (!target_vec)
         return -TARGET_EFAULT;
-    for(i = 0;i < count; i++) {
+    for(i = 0; i < count; i++) {
         base = tswapl(target_vec[i].iov_base);
         vec[i].iov_len = tswapl(target_vec[i].iov_len);
         if (vec[i].iov_len != 0) {
@@ -297,7 +297,7 @@ static abi_long unlock_iovec(struct iovec *vec, abi_ulong target_addr,
     target_vec = lock_user(VERIFY_READ, target_addr, count * sizeof(struct target_iovec), 1);
     if (!target_vec)
         return -TARGET_EFAULT;
-    for(i = 0;i < count; i++) {
+    for(i = 0; i < count; i++) {
         if (target_vec[i].iov_base) {
             base = tswapl(target_vec[i].iov_base);
             unlock_user(vec[i].iov_base, base, copy ? vec[i].iov_len : 0);
Signature · 1 line
2.29.1.59.gf9b6481aed
#2 lore raw
Quoted 15 lines · shiliyang

This patch fixes error style problems found by checkpatch.pl:
ERROR: space required after that ';'

---
 bsd-user/elfload.c | 2 +-
 bsd-user/syscall.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
bsd-user/elfload.c +0 -0
index 9f4210af9a..25e625d86b 100644

bsd-user/elfload.c int load_elf_binary(struct linux_binprm *bprm, struct target_pt_regs *regs, · line 1230

Quoted 5 lines
bsd-user/elfload.c +1 -1
@@ -1227,7 +1227,7 @@ int load_elf_binary(struct linux_binprm *bprm, struct target_pt_regs *regs,
     end_data = 0;
     interp_ex.a_info = 0;
 
-    for(i=0;i < elf_ex.e_phnum; i++) {
+    for(i=0; i < elf_ex.e_phnum; i++) {

While you're at it, please also add white spaces around the "=" in that line.

Thanks,
Thomas

#3 lore raw
Quoted 19 lines · Thomas Huth
Quoted 18 lines · shiliyang

This patch fixes error style problems found by checkpatch.pl:
ERROR: space required after that ';'

---
 bsd-user/elfload.c | 2 +-
 bsd-user/syscall.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
bsd-user/elfload.c +0 -0
index 9f4210af9a..25e625d86b 100644
@@ -1227,7 +1227,7 @@ int load_elf_binary(struct linux_binprm *bprm, struct target_pt_regs *regs,
     end_data = 0;
     interp_ex.a_info = 0;
 
Quoted 4 lines

bsd-user/elfload.c int load_elf_binary(struct linux_binprm *bprm, struct target_pt_regs *regs, · line 1230

Quoted 2 lines
bsd-user/elfload.c +1 -1
-    for(i=0;i < elf_ex.e_phnum; i++) {
+    for(i=0; i < elf_ex.e_phnum; i++) {

While you're at it, please also add white spaces around the "=" in that line.

IOW please run checkpatch after fixing a checkpatch issue ;)

author
#4 lore raw
Quoted 20 lines · Philippe Mathieu-Daudé
Quoted 19 lines · Thomas Huth
Quoted 18 lines · shiliyang

This patch fixes error style problems found by checkpatch.pl:
ERROR: space required after that ';'

---
 bsd-user/elfload.c | 2 +-
 bsd-user/syscall.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
bsd-user/elfload.c +0 -0
index 9f4210af9a..25e625d86b 100644
@@ -1227,7 +1227,7 @@ int load_elf_binary(struct linux_binprm *bprm, struct target_pt_regs *regs,
     end_data = 0;
     interp_ex.a_info = 0;
 
Quoted 5 lines
Quoted 4 lines

bsd-user/elfload.c int load_elf_binary(struct linux_binprm *bprm, struct target_pt_regs *regs, · line 1230

Quoted 2 lines
bsd-user/elfload.c +1 -1
-    for(i=0;i < elf_ex.e_phnum; i++) {
+    for(i=0; i < elf_ex.e_phnum; i++) {

While you're at it, please also add white spaces around the "=" in that line.

Yes, thanks for your review, I will fix it.

Quoted 2 lines

IOW please run checkpatch after fixing a checkpatch issue ;)

Thanks for your advise, I missed this operation. I will fix other checkpatch issues first then send new patch.

Quoted 2 lines

.

Thanks.