<html><body><p>
<pre>
Hi, Shu-hsiang:

On Wed, 2024-10-09 at 19:15 +0800, Shu-hsiang Yang wrote:
> Introduces the driver of the MediaTek Sensor Interface,
> focusing on integration with the MediaTek ISP CAMSYS. The
> seninf device bridges camera sensors and the ISP system,
> providing management for sensor data routing and processing.
> Key features include V4L2 framework control, and dynamic
> handling of stream configurations and virtual channels.
>
> Signed-off-by: Shu-hsiang Yang <Shu-hsiang.Yang@mediatek.com>
> ---

[snip]

> +struct seninf_mux *mtk_cam_seninf_mux_get_pref(struct seninf_ctx *ctx,
> + int *pref_idx, int pref_cnt)
> +{
> +int i;
> +struct seninf_core *core = ctx->core;
> +struct seninf_mux *ent = NULL;
> +
> +mutex_lock(&core->mutex);
> +
> +list_for_each_entry(ent, &core->list_mux, list) {
> +for (i = 0; i < pref_cnt; i++) {
> +if (ent->idx == pref_idx[i]) {

There is only two place to call mtk_cam_seninf_mux_get_pref(), and both place just make sure that pref_idx[i] = i.
So it's not necessary to pass an array as parameter. This code could be

if (ent->idx == i) {
...
}

Regards,
CK

> +list_move_tail(&ent->list, &ctx->list_mux);
> +mutex_unlock(&core->mutex);
> +return ent;
> +}
> +}
> +}
> +
> +mutex_unlock(&core->mutex);
> +
> +return mtk_cam_seninf_mux_get(ctx);
> +}
> +


</pre>
</p></body></html><!--type:text--><!--{--><pre>************* MEDIATEK Confidentiality Notice ********************
The information contained in this e-mail message (including any 
attachments) may be confidential, proprietary, privileged, or otherwise
exempt from disclosure under applicable laws. It is intended to be 
conveyed only to the designated recipient(s). Any use, dissemination, 
distribution, printing, retaining or copying of this e-mail (including its 
attachments) by unintended recipient(s) is strictly prohibited and may 
be unlawful. If you are not an intended recipient of this e-mail, or believe 
that you have received this e-mail in error, please notify the sender 
immediately (by replying to this e-mail), delete any and all copies of 
this e-mail (including any attachments) from your system, and do not
disclose the content of this e-mail to any other person. Thank you!
</pre><!--}-->