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

Chanho Park chanho61.park at samsung.com
Thu Jun 2 05:59:51 PDT 2022


> > +	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




More information about the linux-phy mailing list