mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stephen Boyd <swboyd@chromium.org>
To: Douglas Anderson <dianders@chromium.org>,
	a.hajda@samsung.com, narmstrong@baylibre.com, sam@ravnborg.org
Cc: robdclark@chromium.org, bjorn.andersson@linaro.org,
	spanda@codeaurora.org, Douglas Anderson <dianders@chromium.org>,
	Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@linux.ie>,
	Jernej Skrabec <jernej.skrabec@siol.net>,
	Jonas Karlman <jonas@kwiboo.se>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/4] drm/bridge: ti-sn65dsi86: Check the regmap return value when setting a GPIO
Date: Thu, 11 Jun 2020 02:58:24 -0700	[thread overview]
Message-ID: <159186950406.242598.11120838219466948342@swboyd.mtv.corp.google.com> (raw)
In-Reply-To: <20200608104832.4.Ia4376fd88cdc6e8f8b43c65548458305f82f1d61@changeid>

Quoting Douglas Anderson (2020-06-08 10:48:35)
> The ti_sn_bridge_gpio_set() got the return value of
> regmap_update_bits() but didn't check it.  The function can't return
> an error value, but we should at least print a warning if it didn't
> work.
> 
> This fixes a compiler warning about setting "ret" but not using it.
> 
> Fixes: 27ed2b3f22ed ("drm/bridge: ti-sn65dsi86: Export bridge GPIOs to Linux")
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---
> 
>  drivers/gpu/drm/bridge/ti-sn65dsi86.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> index 1080e4f9df96..526add27dc03 100644
> --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> @@ -999,6 +999,9 @@ static void ti_sn_bridge_gpio_set(struct gpio_chip *chip, unsigned int offset,
>         ret = regmap_update_bits(pdata->regmap, SN_GPIO_IO_REG,
>                                  BIT(SN_GPIO_OUTPUT_SHIFT + offset),
>                                  val << (SN_GPIO_OUTPUT_SHIFT + offset));
> +       if (ret)
> +               dev_warn(pdata->dev,
> +                        "Failed to set bridge GPIO %d: %d\n", offset, ret);

GPIO %u because it's unsigned?

  reply	other threads:[~2020-06-11  9:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-08 17:48 [PATCH 1/4] drm/bridge: ti-sn65dsi86: Don't compile GPIO bits if not CONFIG_OF_GPIO Douglas Anderson
2020-06-08 17:48 ` [PATCH 2/4] drm/bridge: ti-sn65dsi86: Don't use kernel-doc comment for local array Douglas Anderson
2020-06-11  9:57   ` Stephen Boyd
2020-06-08 17:48 ` [PATCH 3/4] drm/bridge: ti-sn65dsi86: Fix kernel-doc typo ln_polr => ln_polrs Douglas Anderson
2020-06-11  9:59   ` Stephen Boyd
2020-06-08 17:48 ` [PATCH 4/4] drm/bridge: ti-sn65dsi86: Check the regmap return value when setting a GPIO Douglas Anderson
2020-06-11  9:58   ` Stephen Boyd [this message]
2020-06-11 14:34     ` Doug Anderson
2020-06-29  8:41       ` Neil Armstrong
2020-06-11  9:56 ` [PATCH 1/4] drm/bridge: ti-sn65dsi86: Don't compile GPIO bits if not CONFIG_OF_GPIO Stephen Boyd
2020-06-20 20:21 ` Linus Walleij

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=159186950406.242598.11120838219466948342@swboyd.mtv.corp.google.com \
    --to=swboyd@chromium.org \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=a.hajda@samsung.com \
    --cc=airlied@linux.ie \
    --cc=bjorn.andersson@linaro.org \
    --cc=daniel@ffwll.ch \
    --cc=dianders@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@siol.net \
    --cc=jonas@kwiboo.se \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=narmstrong@baylibre.com \
    --cc=robdclark@chromium.org \
    --cc=sam@ravnborg.org \
    --cc=spanda@codeaurora.org \
    /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

all inboxes | Powered by JetHome®