Skip to content

Commit 9817eb3

Browse files
chaohong-guolijinxia
authored andcommitted
Add a comment for switch fallthrough to quiet lint warning
Some code has switch fallthrough cases, it causes some warning during compiling. Adding a comment can quiet it. Tracked-On:#1260 Signed-off-by: Chaohong Guo <chaohong.guo@intel.com> Acked-by: Gen Zheng <gen.zheng@intel.com>
1 parent 0306bb4 commit 9817eb3

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

hypervisor/debug/npk_log.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ void npk_log_setup(struct hv_npk_log_param *param)
4444
case HV_NPK_LOG_CMD_CONF:
4545
if (param->mmio_addr || param->loglevel != 0xffffU)
4646
param->res = HV_NPK_LOG_RES_OK;
47+
/* falls through */
4748
case HV_NPK_LOG_CMD_ENABLE:
4849
if (param->mmio_addr)
4950
base = param->mmio_addr;

hypervisor/debug/shell.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -831,8 +831,10 @@ static int shell_loglevel(int argc, char **argv)
831831
switch (argc) {
832832
case 4:
833833
npk_loglevel = atoi(argv[3]);
834+
/* falls through */
834835
case 3:
835836
mem_loglevel = atoi(argv[2]);
837+
/* falls through */
836838
case 2:
837839
console_loglevel = atoi(argv[1]);
838840
break;

0 commit comments

Comments
 (0)