lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bcc4b5c7e841e758c43733599cca3b5a5430674a.camel@mediatek.com>
Date: Wed, 20 Mar 2024 09:04:43 +0000
From: CK Hu (胡俊光) <ck.hu@...iatek.com>
To: "jstephan@...libre.com" <jstephan@...libre.com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-mediatek@...ts.infradead.org" <linux-mediatek@...ts.infradead.org>,
	"robh+dt@...nel.org" <robh+dt@...nel.org>, "linux-media@...r.kernel.org"
	<linux-media@...r.kernel.org>, "devicetree@...r.kernel.org"
	<devicetree@...r.kernel.org>, "paul.elder@...asonboard.com"
	<paul.elder@...asonboard.com>, "mchehab@...nel.org" <mchehab@...nel.org>,
	"conor+dt@...nel.org" <conor+dt@...nel.org>,
	Andy Hsieh (謝智皓) <Andy.Hsieh@...iatek.com>,
	Louis Kuo (郭德寧) <louis.kuo@...iatek.com>,
	"krzysztof.kozlowski+dt@...aro.org" <krzysztof.kozlowski+dt@...aro.org>,
	"linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>, "laurent.pinchart@...asonboard.com"
	<laurent.pinchart@...asonboard.com>, "fsylvestre@...libre.com"
	<fsylvestre@...libre.com>, "matthias.bgg@...il.com" <matthias.bgg@...il.com>,
	"angelogioacchino.delregno@...labora.com"
	<angelogioacchino.delregno@...labora.com>, "pnguyen@...libre.com"
	<pnguyen@...libre.com>
Subject: Re: [PATCH v4 3/5] media: platform: mediatek: isp_30: add mediatek
 ISP3.0 sensor interface

Hi, Julien:

On Wed, 2024-01-10 at 15:14 +0100, Julien Stephan wrote:
>  	 
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>  From: Louis Kuo <louis.kuo@...iatek.com>
> 
> This will add the mediatek ISP3.0 seninf (sensor interface) driver
> found
> on several Mediatek SoCs such as the mt8365.
> 
> Then seninf module has 4 physical CSI-2 inputs. Depending on the soc
> they
> may not be all connected.
> 
> Signed-off-by: Louis Kuo <louis.kuo@...iatek.com>
> Signed-off-by: Phi-bang Nguyen <pnguyen@...libre.com>
> Signed-off-by: Florian Sylvestre <fsylvestre@...libre.com>
> Co-developed-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>
> Co-developed-by: Julien Stephan <jstephan@...libre.com>
> Signed-off-by: Julien Stephan <jstephan@...libre.com>
> ---

[snip]

> +
> +static const struct mtk_seninf_conf seninf_8365_conf = {
> +	.model = "mtk-camsys-3.0",
> +	.nb_inputs = 4,
> +	.nb_muxes = 6,
> +	.nb_outputs = 4,
> +};

I think you should directly define these value as symbols because now
only support one SoC.

#define MODEL     "mtk-camsys-3.0"
#define INPUT_NR  4
#define MUTEX_NR  6
#define OUTPUT_NR 4

Because we don't know which SoC would be upstream later, maybe the next
SoC would be

static const struct mtk_seninf_conf seninf_83xx_conf = {
	.model = "mtk-camsys-3.0",
	.nb_inputs = 4,
	.nb_muxes = 6,
	.nb_outputs = 4,
	.support_xxx = true;
};

then model, nb_inputs, nb_muxes, and nb_outputs has no difference, so
it's not necessary to define them as variable. So define them as
constant now, and when next SoC upstream, then we know which one would
be variable.

Regards,
CK

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ