lib: sbi: Remove unnecessary semicolon
authorXiang W <wxjstz@126.com>
Tue, 25 Apr 2023 08:56:23 +0000 (16:56 +0800)
committerAnup Patel <anup@brainfault.org>
Thu, 11 May 2023 07:01:34 +0000 (12:31 +0530)
We have redundant semicolon at quite a few places so let's remove it.

Signed-off-by: Xiang W <wxjstz@126.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
15 files changed:
include/sbi/sbi_list.h
lib/sbi/riscv_asm.c
lib/sbi/sbi_domain.c
lib/sbi/sbi_ecall_legacy.c
lib/sbi/sbi_ecall_pmu.c
lib/sbi/sbi_ecall_rfence.c
lib/sbi/sbi_emulate_csr.c
lib/sbi/sbi_hsm.c
lib/sbi/sbi_illegal_insn.c
lib/sbi/sbi_init.c
lib/sbi/sbi_ipi.c
lib/sbi/sbi_trap.c
lib/sbi/sbi_unpriv.c
lib/utils/fdt/fdt_helper.c
lib/utils/libfdt/fdt_overlay.c

index fe735dff0547d4787f457f691be199d3f87952b6..9e56c526faf2fb07d01572ddb752b7c5855c6738 100644 (file)
@@ -31,7 +31,7 @@ struct sbi_dlist _lname = SBI_LIST_HEAD_INIT(_lname)
 #define SBI_INIT_LIST_HEAD(ptr)        \
 do { \
        (ptr)->next = ptr; (ptr)->prev = ptr; \
-} while (0);
+} while (0)
 
 static inline void __sbi_list_add(struct sbi_dlist *new,
                                  struct sbi_dlist *prev,
index a09cf78e9c1b1d11953429775ca71757ab22dd7f..cd565534ca1e856a055d73734247ede4614d2817 100644 (file)
@@ -152,7 +152,7 @@ unsigned long csr_read_num(int csr_num)
        default:
                sbi_panic("%s: Unknown CSR %#x", __func__, csr_num);
                break;
-       };
+       }
 
        return ret;
 
@@ -220,7 +220,7 @@ void csr_write_num(int csr_num, unsigned long val)
        default:
                sbi_panic("%s: Unknown CSR %#x", __func__, csr_num);
                break;
-       };
+       }
 
 #undef switchcase_csr_write_64
 #undef switchcase_csr_write_32
index 67b87f3043c5215dad323b629de654e745fe13dc..c55e192207da24b81afd63e58e767460aabe3f4c 100644 (file)
@@ -261,7 +261,7 @@ static int sanitize_domain(const struct sbi_platform *plat,
                                   "hart %d\n", __func__, dom->name, i);
                        return SBI_EINVAL;
                }
-       };
+       }
 
        /* Check memory regions */
        if (!dom->regions) {
@@ -451,7 +451,7 @@ void sbi_domain_dump(const struct sbi_domain *dom, const char *suffix)
        default:
                sbi_printf("Unknown\n");
                break;
-       };
+       }
 
        sbi_printf("Domain%d SysReset    %s: %s\n",
                   dom->index, suffix, (dom->system_reset_allowed) ? "yes" : "no");
index e20de766d27eca41c8c3816c2bb4d617a66b7dc6..8237498b538fb668d35b4fa062ed2b455c12ae37 100644 (file)
@@ -112,7 +112,7 @@ static int sbi_ecall_legacy_handler(unsigned long extid, unsigned long funcid,
                break;
        default:
                ret = SBI_ENOTSUPP;
-       };
+       }
 
        return ret;
 }
index 8f91f9cec014ddd53fca1ffd7970d16d96085c3f..367e92774261a13029a6940114269df690764384 100644 (file)
@@ -76,7 +76,7 @@ static int sbi_ecall_pmu_handler(unsigned long extid, unsigned long funcid,
                break;
        default:
                ret = SBI_ENOTSUPP;
-       };
+       }
 
        return ret;
 }
index 8f0e3d7bacf408039bca88c4bdda0fff4964d889..6334c001d45012cdc42301e571cfeb4c8723ea6f 100644 (file)
@@ -74,7 +74,7 @@ static int sbi_ecall_rfence_handler(unsigned long extid, unsigned long funcid,
                break;
        default:
                ret = SBI_ENOTSUPP;
-       };
+       }
 
        return ret;
 }
index 64bebd8da7a3c002d093872c594d8a2a1e89a5a9..da811653661549b4bed5c73fa0b7104e1bd3635f 100644 (file)
@@ -149,7 +149,7 @@ int sbi_emulate_csr_read(int csr_num, struct sbi_trap_regs *regs,
        default:
                ret = SBI_ENOTSUPP;
                break;
-       };
+       }
 
        if (ret)
                sbi_dprintf("%s: hartid%d: invalid csr_num=0x%x\n",
@@ -187,7 +187,7 @@ int sbi_emulate_csr_write(int csr_num, struct sbi_trap_regs *regs,
        default:
                ret = SBI_ENOTSUPP;
                break;
-       };
+       }
 
        if (ret)
                sbi_dprintf("%s: hartid%d: invalid csr_num=0x%x\n",
index b2614105096b32d73f2c472602f3d4e6a291edb2..f870ca72bafca3a29e94b4e0965ecfdba0d64778 100644 (file)
@@ -172,7 +172,7 @@ static void sbi_hsm_hart_wait(struct sbi_scratch *scratch, u32 hartid)
        /* Wait for state transition requested by sbi_hsm_hart_start() */
        while (atomic_read(&hdata->state) != SBI_HSM_STATE_START_PENDING) {
                wfi();
-       };
+       }
 
        /* Restore MIE CSR */
        csr_write(CSR_MIE, saved_mie);
index 9691bce930f156c757fc5fc12c0184748a474320..2be47575a365437f92178fc13d895d3aaa3d0107 100644 (file)
@@ -90,7 +90,7 @@ static int system_opcode_insn(ulong insn, struct sbi_trap_regs *regs)
                break;
        default:
                return truly_illegal_insn(insn, regs);
-       };
+       }
 
        if (do_write && sbi_emulate_csr_write(csr_num, regs, new_csr_val))
                return truly_illegal_insn(insn, regs);
index 5db8e7f68c88a1cbd4e886cd94fcc02d0b0fed17..539f8245c44ebe230dd29fb0a1015ce4ac317bd7 100644 (file)
@@ -200,7 +200,7 @@ static void wait_for_coldboot(struct sbi_scratch *scratch, u32 hartid)
                        wfi();
                        cmip = csr_read(CSR_MIP);
                 } while (!(cmip & (MIP_MSIP | MIP_MEIP)));
-       };
+       }
 
        /* Acquire coldboot lock */
        spin_lock(&coldboot_lock);
index 4f94bcee6db4496599b0b2331c7739a9e27ece7a..ba83f245c14e5c6ccd47a93658224a16dbf234f0 100644 (file)
@@ -233,7 +233,7 @@ void sbi_ipi_process(void)
 skip:
                ipi_type = ipi_type >> 1;
                ipi_event++;
-       };
+       }
 }
 
 int sbi_ipi_raw_send(u32 target_hart)
index 025cf614c27dd67bdf95eb669956a345a550fb97..dbf307c6894336e4f18b1a31134e3efaad74c901 100644 (file)
@@ -212,7 +212,7 @@ static int sbi_trap_nonaia_irq(struct sbi_trap_regs *regs, ulong mcause)
                return sbi_irqchip_process(regs);
        default:
                return SBI_ENOENT;
-       };
+       }
 
        return 0;
 }
@@ -320,7 +320,7 @@ struct sbi_trap_regs *sbi_trap_handler(struct sbi_trap_regs *regs)
 
                rc = sbi_trap_redirect(regs, &trap);
                break;
-       };
+       }
 
 trap_error:
        if (rc)
index 9a34a717b00ebb0482eeeda789efa3523660d687..2a55d9dbf1188bb3227cf1b110f64be17d48e11c 100644 (file)
@@ -163,7 +163,7 @@ ulong sbi_get_insn(ulong mepc, struct sbi_trap_info *trap)
                break;
        default:
                break;
-       };
+       }
 
        return insn;
 }
index 48bc2fe4c280b2e5d627a1ed950ffb0b0f109c06..a88a4ba83fafb35ed6d0caa95f8e1bb8cd22848e 100644 (file)
@@ -689,7 +689,7 @@ int fdt_parse_imsic_node(void *fdt, int nodeoff, struct imsic_data *imsic)
                        break;
                regs->addr = reg_addr;
                regs->size = reg_size;
-       };
+       }
        if (!imsic->regs[0].size)
                return SBI_EINVAL;
 
index d217e79b672299f858a9b242e724e13cb53f110f..0871e260ff4cab5a0e763f5478979c56c1dec16e 100644 (file)
@@ -404,7 +404,7 @@ static int overlay_fixup_one_phandle(void *fdt, void *fdto,
                                                   name, name_len, poffset,
                                                   &phandle_prop,
                                                   sizeof(phandle_prop));
-};
+}
 
 /**
  * overlay_fixup_phandle - Set an overlay phandle to the base one