[PATCH 3/3] media: qcom: camss: vfe: Eliminate ever expanding src_pad_code switch logic
From: bryan . odonoghue
Date: Sat Nov 21 2026 - 21:11:15 EST
From: Bryan O'Donoghue <bryan.odonoghue@xxxxxxxxxx>
Every time we add a SoC the src_pad_code switch statement is expanded. This
expansion has continued to the point where there are more SoCs listed for
what used to be the exceptional state, than the reverse.
Invert the logic. The exception to the rule is the old SoC set there's no
purpose in expanding this switch continuously.
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@xxxxxxxxxx>
---
drivers/media/platform/qcom/camss/camss-vfe.c | 20 +-------------------
1 file changed, 1 insertion(+), 19 deletions(-)
diff --git a/drivers/media/platform/qcom/camss/camss-vfe.c b/drivers/media/platform/qcom/camss/camss-vfe.c
index f9bd2367671f6..10ad862ff5010 100644
--- a/drivers/media/platform/qcom/camss/camss-vfe.c
+++ b/drivers/media/platform/qcom/camss/camss-vfe.c
@@ -340,21 +340,7 @@ static u32 vfe_src_pad_code(struct vfe_line *line, u32 sink_code,
return sink_code;
}
break;
- case CAMSS_660:
- case CAMSS_2290:
- case CAMSS_6150:
- case CAMSS_6350:
- case CAMSS_7280:
- case CAMSS_8x96:
- case CAMSS_8250:
- case CAMSS_8280XP:
- case CAMSS_8300:
- case CAMSS_845:
- case CAMSS_8550:
- case CAMSS_8650:
- case CAMSS_8775P:
- case CAMSS_KAANAPALI:
- case CAMSS_X1E80100:
+ default:
switch (sink_code) {
case MEDIA_BUS_FMT_YUYV8_1X16:
{
@@ -415,10 +401,6 @@ static u32 vfe_src_pad_code(struct vfe_line *line, u32 sink_code,
return sink_code;
}
break;
- default:
- WARN(1, "Unsupported HW version: %x\n",
- vfe->camss->res->version);
- break;
}
return 0;
}
--
2.56.0