diff mbox series

[12/16] media: qcom: camss: Add default case in vfe_src_pad_code

Message ID 20241205155538.250743-13-quic_depengs@quicinc.com (mailing list archive)
State New
Headers show
Series media: qcom: camss: Add sm8550 support | expand

Commit Message

Depeng Shao Dec. 5, 2024, 3:55 p.m. UTC
Add a default case in vfe_src_pad_code to get rid of a compile
warning if a new hw enum is added.

Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 drivers/media/platform/qcom/camss/camss-vfe.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Bryan O'Donoghue Dec. 6, 2024, 12:21 a.m. UTC | #1
On 05/12/2024 15:55, Depeng Shao wrote:
> Add a default case in vfe_src_pad_code to get rid of a compile
> warning if a new hw enum is added.
> 
> Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
>   drivers/media/platform/qcom/camss/camss-vfe.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/media/platform/qcom/camss/camss-vfe.c b/drivers/media/platform/qcom/camss/camss-vfe.c
> index 58e24a043e81..1c9b6569fbe5 100644
> --- a/drivers/media/platform/qcom/camss/camss-vfe.c
> +++ b/drivers/media/platform/qcom/camss/camss-vfe.c
> @@ -404,6 +404,10 @@ 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;
>   }

Please re-order your patches here.

Generic fixes in a series to enable silicon are _fine_ but such fixes 
should come before the silicon enabling portion of the series.

So this patch should come before "[PATCH 11/16] dt-bindings: media: 
camss: Add qcom,sm8550-camss binding"

---
bod
Depeng Shao Dec. 6, 2024, 2:20 a.m. UTC | #2
Hi Bryan,

On 12/6/2024 8:21 AM, Bryan O'Donoghue wrote:
> On 05/12/2024 15:55, Depeng Shao wrote:
>> Add a default case in vfe_src_pad_code to get rid of a compile
>> warning if a new hw enum is added.
>>
>> Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
>> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
>> ---
>>   drivers/media/platform/qcom/camss/camss-vfe.c | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/media/platform/qcom/camss/camss-vfe.c b/drivers/ 
>> media/platform/qcom/camss/camss-vfe.c
>> index 58e24a043e81..1c9b6569fbe5 100644
>> --- a/drivers/media/platform/qcom/camss/camss-vfe.c
>> +++ b/drivers/media/platform/qcom/camss/camss-vfe.c
>> @@ -404,6 +404,10 @@ 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;
>>   }
> 
> Please re-order your patches here.
> 
> Generic fixes in a series to enable silicon are _fine_ but such fixes 
> should come before the silicon enabling portion of the series.
> 
> So this patch should come before "[PATCH 11/16] dt-bindings: media: 
> camss: Add qcom,sm8550-camss binding"
> 

Sure, will re-order the patches based on your suggestion.

Thanks,
Depeng
diff mbox series

Patch

diff --git a/drivers/media/platform/qcom/camss/camss-vfe.c b/drivers/media/platform/qcom/camss/camss-vfe.c
index 58e24a043e81..1c9b6569fbe5 100644
--- a/drivers/media/platform/qcom/camss/camss-vfe.c
+++ b/drivers/media/platform/qcom/camss/camss-vfe.c
@@ -404,6 +404,10 @@  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;
 }