Re: [PATCHv2] phy: mediatek: tphy: simplify main allocation
| Newsgroups | org.infradead.lists.linux-phy |
|---|---|
| Message-ID | <[email protected]> |
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] Meaningful code and commit message mismatch regarding the removal of a NULL check. -- --- Patch [1]: [PATCHv2] phy: mediatek: tphy: simplify main allocation --- commit 293b5d4728ba8a57dc62ffcf5575f966eef04ba8 Author: Rosen Penev <[email protected]> phy: mediatek: tphy: simplify main allocation This commit simplifies the main allocation by replacing a separate kzalloc and kcalloc with a single kzalloc using a flexible array member. It also shuffles code to satisfy __counted_by requirements. > Removed NULL check from of_get_match_data as it's never NULL per the > device table. > > Signed-off-by: Rosen Penev <[email protected]> > > --- > v2: add back NULL check [Severity: Medium] This isn't a bug, but the commit message body states the NULL check was removed, while the v2 notes and the patch itself show it was retained. Should the commit message be updated to remove this line so it accurately reflects the applied changes? > diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c > index acf5065295072..e9b9e667b3195 100644 > --- a/drivers/phy/mediatek/phy-mtk-tphy.c > +++ b/drivers/phy/mediatek/phy-mtk-tphy.c [ ... ] > @@ -1572,22 +1572,19 @@ static int mtk_tphy_probe(struct platform_device *pdev) [ ... ] > + tphy->nphys = nphys; > + tphy->dev = dev; > tphy->pdata = of_device_get_match_data(dev); > if (!tphy->pdata) > return -EINVAL; > -- Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy