[-next,1/2] media: chips-media: wave5: Remove unneeded semicolon

Message ID 20231127005959.108764-1-yang.lee@linux.alibaba.com
State New
Headers
Series [-next,1/2] media: chips-media: wave5: Remove unneeded semicolon |

Commit Message

Yang Li Nov. 27, 2023, 12:59 a.m. UTC
  ./drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c:95:2-3: Unneeded semicolon

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7633
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Sebastian Fricke Nov. 30, 2023, 9:53 a.m. UTC | #1
Hey Yang,

On 27.11.2023 08:59, Yang Li wrote:
>./drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c:95:2-3: Unneeded semicolon

Just pasting this line here makes the commit look a bit confusing.
It would be enough to simply write:

A switch statement does not require a semicolon after the closing curly
bracket, remove it.

The same applies for the second patch.

Greetings,
Sebastian
>
>Reported-by: Abaci Robot <abaci@linux.alibaba.com>
>Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7633
>Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
>---
> drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c b/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
>index f29cfa3af94a..8bbf9d10b467 100644
>--- a/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
>+++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
>@@ -92,7 +92,7 @@ static int switch_state(struct vpu_instance *inst, enum vpu_instance_state state
> 		break;
> 	case VPU_INST_STATE_STOP:
> 		break;
>-	};
>+	}
>
> 	dev_dbg(inst->dev->dev, "Switch state from %s to %s.\n",
> 		state_to_str(inst->state), state_to_str(state));
>-- 
>2.20.1.7.g153144c
>
>
  

Patch

diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c b/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
index f29cfa3af94a..8bbf9d10b467 100644
--- a/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
+++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
@@ -92,7 +92,7 @@  static int switch_state(struct vpu_instance *inst, enum vpu_instance_state state
 		break;
 	case VPU_INST_STATE_STOP:
 		break;
-	};
+	}
 
 	dev_dbg(inst->dev->dev, "Switch state from %s to %s.\n",
 		state_to_str(inst->state), state_to_str(state));