Re: [PATCH 09/13] media: qcom: camss: Add CSID Gen3 support for SM8550

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Bryan,

On 8/1/2024 12:12 AM, Bryan O'Donoghue wrote:
On 31/07/2024 16:26, Depeng Shao wrote:
I'm preparing the next version patches, then I find it is hard to avoid such warning if only apply current patch, since this will be used in the below patch, it will be in structures csid_res_8550 -> sm8550_resources -> camss_dt_match, so I need to add all csid_res_8550, sm8550_resources, camss_dt_match into this patch if I want to avoid the compile warning, then I also need to add compatible info for it to avoid sm8550_resources has unused variable warning, but the sm8550_resources structure also need to add other items to make it complete, then the driver will be incomplete but can be probed with this patch.

{ .compatible = "qcom,sm8550-camss", .data = &sm8550_resources },

https://lore.kernel.org/all/20240709160656.31146-14-quic_depengs@xxxxxxxxxxx/

Couldn't you just add the public structures at the same time they are referenced in &sm8550_resources ?

That way your patchset would progressively apply with no warnings.


Sorry, I don't get it, but in my understanding, but looks like the only way to avoid the compile warning is that adding compatible change in early patch set.

I can add the compatible change and structure sm8550_resources in the early patch, but the structure sm8550_resources will just have very few info in this patch. Then fill the other elements in sm8550_resources in the following patches, this can avoid the warning, but the issue is that the sm8550 can be probed once having patch set 1, but the sm8550_resources isn't complete in patch set 1.
Could you please common if this is fine?

patch set 1
+{ .compatible = "qcom,sm8550-camss", .data = &sm8550_resources },


+static const struct camss_resources sm8550_resources = {
+	.version = CAMSS_8550,
+	.pd_name = "top",
+	.icc_res = icc_res_sm8550,
+	.icc_path_num = ARRAY_SIZE(icc_res_sm8550),
+	.link_entities = camss_link_entities
+};


patch set2 - Adding csiphy driver and csiphy res to sm8550_resources
static const struct camss_resources sm8550_resources = {
	.version = CAMSS_8550,
	.pd_name = "top",
+	.csiphy_res = csiphy_res_8550,
	.icc_res = icc_res_sm8550,
	.icc_path_num = ARRAY_SIZE(icc_res_sm8550),
+	.csiphy_num = ARRAY_SIZE(csiphy_res_8550),
	.link_entities = camss_link_entities
};


patch set 3 - Adding csid driver and csid res to sm8550_resources
static const struct camss_resources sm8550_resources = {
	.version = CAMSS_8550,
	.pd_name = "top",
	.csiphy_res = csiphy_res_8550,
+	.csid_res = csid_res_8550,
	.icc_res = icc_res_sm8550,
	.icc_path_num = ARRAY_SIZE(icc_res_sm8550),
	.csiphy_num = ARRAY_SIZE(csiphy_res_8550),
+	.csid_num = ARRAY_SIZE(csid_res_8550),
	.link_entities = camss_link_entities
};

---
bod

Thanks,
Depeng




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux