Message ID | 20190226193609.9862-7-andrew.smirnov@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | tc358767 driver improvements | expand |
Hi Andrey, Thank you for the patch. On Tue, Feb 26, 2019 at 11:36:06AM -0800, Andrey Smirnov wrote: > Tc_poll_timeout() can only return -ETIMEDOUT, so checking for other > errors is not necessary. Drop it. No functional change intended. Is that true given patch 1/9 in this series ? regmap_read_poll_timeout() can also return an error from regmap_read(). > Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> > Cc: Archit Taneja <architt@codeaurora.org> > Cc: Andrzej Hajda <a.hajda@samsung.com> > Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com> > Cc: Chris Healy <cphealy@gmail.com> > Cc: Lucas Stach <l.stach@pengutronix.de> > Cc: dri-devel@lists.freedesktop.org > Cc: linux-kernel@vger.kernel.org > --- > drivers/gpu/drm/bridge/tc358767.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c > index ea30cec4a0c3..54ff95f66e30 100644 > --- a/drivers/gpu/drm/bridge/tc358767.c > +++ b/drivers/gpu/drm/bridge/tc358767.c > @@ -569,11 +569,10 @@ static int tc_aux_link_setup(struct tc_data *tc) > > ret = tc_poll_timeout(tc->regmap, DP_PHY_CTRL, PHY_RDY, PHY_RDY, 1, > 1000); > - if (ret == -ETIMEDOUT) { > + if (ret) { > dev_err(tc->dev, "Timeout waiting for PHY to become ready"); > return ret; > - } else if (ret) > - goto err; > + } > > /* Setup AUX link */ > tc_write(DP0_AUXCFG1, AUX_RX_FILTER_EN |
On Mon, Mar 4, 2019 at 4:33 AM Laurent Pinchart <laurent.pinchart@ideasonboard.com> wrote: > > Hi Andrey, > > Thank you for the patch. > > On Tue, Feb 26, 2019 at 11:36:06AM -0800, Andrey Smirnov wrote: > > Tc_poll_timeout() can only return -ETIMEDOUT, so checking for other > > errors is not necessary. Drop it. No functional change intended. > > Is that true given patch 1/9 in this series ? regmap_read_poll_timeout() > can also return an error from regmap_read(). > Ugh, I misread "?:" in regmap_read_poll_timeout() code as "?", this patch is incorrect. Sorry about that, will drop in v2. Thanks, Andrey Smirnov
diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index ea30cec4a0c3..54ff95f66e30 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -569,11 +569,10 @@ static int tc_aux_link_setup(struct tc_data *tc) ret = tc_poll_timeout(tc->regmap, DP_PHY_CTRL, PHY_RDY, PHY_RDY, 1, 1000); - if (ret == -ETIMEDOUT) { + if (ret) { dev_err(tc->dev, "Timeout waiting for PHY to become ready"); return ret; - } else if (ret) - goto err; + } /* Setup AUX link */ tc_write(DP0_AUXCFG1, AUX_RX_FILTER_EN |
Tc_poll_timeout() can only return -ETIMEDOUT, so checking for other errors is not necessary. Drop it. No functional change intended. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Cc: Archit Taneja <architt@codeaurora.org> Cc: Andrzej Hajda <a.hajda@samsung.com> Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com> Cc: Chris Healy <cphealy@gmail.com> Cc: Lucas Stach <l.stach@pengutronix.de> Cc: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org --- drivers/gpu/drm/bridge/tc358767.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)