From: Neil Armstrong <neil.armstrong@linaro.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Randy Dunlap <rdunlap@infradead.org>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Cc: Jessica Zhang <quic_jesszhan@quicinc.com>,
Sam Ravnborg <sam@ravnborg.org>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>
Subject: Re: [PATCH v1 3/3] drm/panel: ili9341: Use predefined error codes
Date: Thu, 25 Apr 2024 18:00:55 +0200 [thread overview]
Message-ID: <d435b6f6-2c67-4ec3-b346-08c6dd02ee38@linaro.org> (raw)
In-Reply-To: <20240425142706.2440113-4-andriy.shevchenko@linux.intel.com>
On 25/04/2024 16:26, Andy Shevchenko wrote:
> In one case the -1 is returned which is quite confusing code for
> the wrong device ID, in another the ret is returning instead of
> plain 0 that also confusing as readed may ask the possible meaning
> of positive codes, which are never the case there. Convert both
> to use explicit predefined error codes to make it clear what's going
> on there.
>
> Fixes: 5a04227326b0 ("drm/panel: Add ilitek ili9341 panel driver")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/gpu/drm/panel/panel-ilitek-ili9341.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9341.c b/drivers/gpu/drm/panel/panel-ilitek-ili9341.c
> index 24c74c56e564..b933380b7eb7 100644
> --- a/drivers/gpu/drm/panel/panel-ilitek-ili9341.c
> +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9341.c
> @@ -422,7 +422,7 @@ static int ili9341_dpi_prepare(struct drm_panel *panel)
>
> ili9341_dpi_init(ili);
>
> - return ret;
> + return 0;
> }
>
> static int ili9341_dpi_enable(struct drm_panel *panel)
> @@ -726,7 +726,7 @@ static int ili9341_probe(struct spi_device *spi)
> else if (!strcmp(id->name, "yx240qv29"))
> return ili9341_dbi_probe(spi, dc, reset);
>
> - return -1;
> + return -ENODEV;
> }
>
> static void ili9341_remove(struct spi_device *spi)
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
next prev parent reply other threads:[~2024-04-25 16:00 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-25 14:26 [PATCH v1 0/3] drm/panel: ili9341: Obvious fixes Andy Shevchenko
2024-04-25 14:26 ` [PATCH v1 1/3] drm/panel: ili9341: Correct use of device property APIs Andy Shevchenko
2024-04-25 16:00 ` Neil Armstrong
2024-04-25 18:08 ` [v1,1/3] " Sui Jingfeng
2024-04-25 18:53 ` Sui Jingfeng
2024-04-25 19:12 ` Andy Shevchenko
2024-04-25 21:13 ` Sui Jingfeng
2024-04-30 14:13 ` Andy Shevchenko
2024-04-30 16:27 ` Sui Jingfeng
2024-05-02 8:32 ` Andy Shevchenko
2024-05-02 16:25 ` Sui Jingfeng
2024-05-02 17:28 ` Andy Shevchenko
2024-05-03 4:57 ` Sui Jingfeng
2024-05-03 15:46 ` Andy Shevchenko
2024-04-25 19:10 ` Andy Shevchenko
2024-04-25 20:43 ` Sui Jingfeng
2024-04-25 21:27 ` Sui Jingfeng
2024-04-26 6:23 ` Maxime Ripard
2024-04-27 5:57 ` Sui Jingfeng
2024-04-29 11:55 ` Maxime Ripard
2024-04-29 16:54 ` Sui Jingfeng
2024-04-30 9:34 ` Maxime Ripard
2024-05-02 7:34 ` Neil Armstrong
2024-05-02 8:33 ` Andy Shevchenko
2024-05-02 17:28 ` Sui Jingfeng
2024-05-02 17:38 ` Andy Shevchenko
2024-04-30 14:32 ` Andy Shevchenko
2024-04-30 17:24 ` Sui Jingfeng
2024-04-30 10:19 ` [PATCH v1 1/3] " Dmitry Baryshkov
2024-04-25 14:26 ` [PATCH v1 2/3] drm/panel: ili9341: Respect deferred probe Andy Shevchenko
2024-04-25 16:00 ` Neil Armstrong
2024-04-30 10:21 ` Dmitry Baryshkov
2024-04-30 16:50 ` [v1,2/3] " Sui Jingfeng
2024-04-25 14:26 ` [PATCH v1 3/3] drm/panel: ili9341: Use predefined error codes Andy Shevchenko
2024-04-25 16:00 ` Neil Armstrong [this message]
2024-04-30 16:54 ` [v1,3/3] " Sui Jingfeng
2024-04-25 15:08 ` [PATCH v1 0/3] drm/panel: ili9341: Obvious fixes Andy Shevchenko
2024-05-02 7:43 ` Neil Armstrong
2024-05-02 8:33 ` Andy Shevchenko
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=d435b6f6-2c67-4ec3-b346-08c6dd02ee38@linaro.org \
--to=neil.armstrong@linaro.org \
--cc=airlied@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=quic_jesszhan@quicinc.com \
--cc=rdunlap@infradead.org \
--cc=sam@ravnborg.org \
--cc=tzimmermann@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).