Thread (22 messages) 22 messages, 2 authors, 2022-06-07

RE: [PATCH v2 3/6] phy: samsung: ufs: support secondary ufs phy

flat view

From: Chanho Park <hidden>
Date: 2022-06-02 13:00:05
Also in: linux-devicetree, linux-phy, linux-samsung-soc

quoted
+	phy->isol = devm_kzalloc(dev, sizeof(struct pmu_isol), GFP_KERNEL);
1. Looks like devm_kmemdup
2. sizeof(*variable), not sizeof(struct)

3. and actually you can simplify all that by storing struct pmu_isol
directly in struct samsung_ufs_phy, not as pointer.

After all that storing drvdata in samsung_ufs_phy does not make any sense
- only one field is left still used (has_symbol_clk), so this should be
simplified here as well.
It would be better storing struct pmu_isol directly and remove drvdata from samsung_ufs_phy as you suggested.
Furthermore, definition of struct pmu_isol looks odd in the definition of samsung_ufs_phy_drvdata.
So, I'll pop it out and change the naming to "struct samsung_ufs_phy_pmu_isol"

Best Regards,
Chanho Park


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help