[PATCH v2 2/4] phy: rockchip-samsung-dcphy: factor MIPI D-PHY power on/off into helpers

Sebastian Reichel sebastian.reichel at collabora.com
Thu Aug 6 12:31:20 PDT 2026


Hi,

On Thu, Aug 06, 2026 at 05:17:45PM +0100, Bryan O'Donoghue wrote:
> On 26/07/2026 15:55, Jason Yang via B4 Relay wrote:
> >   static int samsung_mipi_dcphy_power_on(struct phy *phy)
> >   {
> >   	struct samsung_mipi_dcphy *samsung = phy_get_drvdata(phy);
> > @@ -1368,7 +1376,7 @@ static int samsung_mipi_dcphy_power_on(struct phy *phy)
> > 
> >   	switch (samsung->type) {
> >   	case PHY_TYPE_DPHY:
> > -		return samsung_mipi_dphy_power_on(samsung);
> > +		return samsung_mipi_dphy_tx_power_on(samsung);
> >   	default:
> >   		/* CPHY part to be implemented later */
> >   		return -EOPNOTSUPP;
> > @@ -1383,16 +1391,11 @@ static int samsung_mipi_dcphy_power_off(struct phy *phy)
> > 
> >   	switch (samsung->type) {
> >   	case PHY_TYPE_DPHY:
> > -		samsung_mipi_dphy_lane_disable(samsung);
> > -		break;
> > +		return samsung_mipi_dphy_tx_power_off(samsung);
> >   	default:
> >   		/* CPHY part to be implemented later */
> >   		return -EOPNOTSUPP;
> >   	}
> > -
> > -	samsung_mipi_dcphy_pll_disable(samsung);
> > -
> > -	return 0;
> >   }
> 
> This looks a bit funny.
> 
> Do you have an int method() {} with a final path that returns no value ?
> 
> Tooling/compilers will definitely and rightly complain about that.

int function() {
    ...

    switch(foo) {
    case 42:
        return 1;
    default:
        return 0;
    }
    /* cannot be reached */
}

Greetings,

-- Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20260806/763fd96f/attachment-0001.sig>


More information about the linux-arm-kernel mailing list