public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: Andy Yan <andyshrk@163.com>
Cc: heiko@sntech.de, kishon@kernel.org,
	sebastian.reichel@collabora.com, yubing.zhang@rock-chips.com,
	dmitry.baryshkov@linaro.org, frank.wang@rock-chips.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org,
	linux-rockchip@lists.infradead.org,
	Andy Yan <andy.yan@rock-chips.com>
Subject: Re: Re: [PATCH] phy: rockchip: usbdp: Check these parameters only when the corresponding set flags are set
Date: Tue, 11 Mar 2025 12:13:46 +0100	[thread overview]
Message-ID: <Z9Aa6v1/1KRdZDKE@vaman> (raw)
In-Reply-To: <1379400c.90c.19582b05f74.Coremail.andyshrk@163.com>

On 11-03-25, 08:52, Andy Yan wrote:

> Do you mean we should do it like this:
> 
> static int rk_udphy_dp_phy_configure(struct phy *phy,
>                                      union phy_configure_opts *opts)
> {
>         struct rk_udphy *udphy = phy_get_drvdata(phy);
>         struct phy_configure_opts_dp *dp = &opts->dp;
>         u32 i, val, lane;
>         int ret;
> 
>        .............
>       if (dp->set_rate)
>            	ret = rk_udphy_dp_phy_verify_link_rate(dp->link_rate);
>      if (dp->set_lanes)
>                 ret = rk_udphy_dp_phy_verify_link_lanes(dp->lanes);
>      if (dp->set_voltates)
>                ret = rk_udphy_dp_phy_verify_link_voltate(dp->voltate);
> 
> 
> Add helper for each of them ?

That would look better for sure

-- 
~Vinod


  reply	other threads:[~2025-03-11 11:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-06  6:59 [PATCH] phy: rockchip: usbdp: Check these parameters only when the corresponding set flags are set Andy Yan
2025-03-10  7:26 ` Vinod Koul
2025-03-11  0:52   ` Andy Yan
2025-03-11 11:13     ` Vinod Koul [this message]
2025-03-11 12:22       ` Re:Re: " Andy Yan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z9Aa6v1/1KRdZDKE@vaman \
    --to=vkoul@kernel.org \
    --cc=andy.yan@rock-chips.com \
    --cc=andyshrk@163.com \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=frank.wang@rock-chips.com \
    --cc=heiko@sntech.de \
    --cc=kishon@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=sebastian.reichel@collabora.com \
    --cc=yubing.zhang@rock-chips.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox