From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Alexandra Diupina <adiupina@astralinux.ru>
Cc: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
Biju Das <biju.das.jz@bp.renesas.com>,
Jacopo Mondi <jacopo+renesas@jmondi.org>,
dri-devel@lists.freedesktop.org,
linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
lvc-project@linuxtesting.org
Subject: Re: [PATCH v2] drm: rcar-du: turn rcar_du_group_get() into void and remove its return value check
Date: Sat, 30 Sep 2023 17:50:32 +0300 [thread overview]
Message-ID: <20230930145032.GD31829@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20230927104438.30628-1-adiupina@astralinux.ru>
Hi Alexandra,
On Wed, Sep 27, 2023 at 01:44:38PM +0300, Alexandra Diupina wrote:
> rcar_du_group_get() never returns a negative
> error code (always returns 0), so change the comment
> about returned value, turn function into void (return
> code of rcar_du_group_get has been redundant for a
> long time, so perhaps it's just not required) and
> remove redundant error path handling in rcar_du_crtc_get()
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
Using tools to find issues is fine in principle, but not even
compile-testing the resulting patch before submitting it is not.
> Fixes: 0bb63534fdf3 ("drm: rcar-du: Perform the initial CRTC setup from rcar_du_crtc_get()")
> Signed-off-by: Alexandra Diupina <adiupina@astralinux.ru>
> ---
> v2: rcar_du_group_get() is turned into void and its return
> value check is removed in rcar_du_crtc_get()
> drivers/gpu/drm/renesas/rcar-du/rcar_du_crtc.c | 6 +-----
> drivers/gpu/drm/renesas/rcar-du/rcar_du_group.c | 5 +----
> 2 files changed, 2 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_du_crtc.c b/drivers/gpu/drm/renesas/rcar-du/rcar_du_crtc.c
> index 7e175dbfd892..2be7c6e64d72 100644
> --- a/drivers/gpu/drm/renesas/rcar-du/rcar_du_crtc.c
> +++ b/drivers/gpu/drm/renesas/rcar-du/rcar_du_crtc.c
> @@ -565,17 +565,13 @@ static int rcar_du_crtc_get(struct rcar_du_crtc *rcrtc)
> if (ret < 0)
> goto error_clock;
>
> - ret = rcar_du_group_get(rcrtc->group);
> - if (ret < 0)
> - goto error_group;
> + rcar_du_group_get(rcrtc->group);
>
> rcar_du_crtc_setup(rcrtc);
> rcrtc->initialized = true;
>
> return 0;
>
> -error_group:
> - clk_disable_unprepare(rcrtc->extclock);
> error_clock:
> clk_disable_unprepare(rcrtc->clock);
> return ret;
> diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_du_group.c b/drivers/gpu/drm/renesas/rcar-du/rcar_du_group.c
> index 2ccd2581f544..7113025dabff 100644
> --- a/drivers/gpu/drm/renesas/rcar-du/rcar_du_group.c
> +++ b/drivers/gpu/drm/renesas/rcar-du/rcar_du_group.c
> @@ -199,10 +199,8 @@ static void rcar_du_group_setup(struct rcar_du_group *rgrp)
> * before accessing any hardware registers.
> *
> * This function must be called with the DRM mode_config lock held.
> - *
> - * Return 0 in case of success or a negative error code otherwise.
> */
> -int rcar_du_group_get(struct rcar_du_group *rgrp)
> +void rcar_du_group_get(struct rcar_du_group *rgrp)
> {
> if (rgrp->use_count)
> goto done;
> @@ -211,7 +209,6 @@ int rcar_du_group_get(struct rcar_du_group *rgrp)
>
> done:
> rgrp->use_count++;
> - return 0;
> }
>
> /*
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2023-09-30 14:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <169383224922.277971.15400887308406098634@ping.linuxembedded.co.uk>
2023-09-27 10:44 ` [PATCH v2] drm: rcar-du: turn rcar_du_group_get() into void and remove its return value check Alexandra Diupina
2023-09-30 6:54 ` kernel test robot
2023-09-30 14:50 ` Laurent Pinchart [this message]
2023-10-02 7:26 ` Александра Дюпина
2023-10-02 7:29 ` [PATCH v3] " Alexandra Diupina
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=20230930145032.GD31829@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=adiupina@astralinux.ru \
--cc=airlied@gmail.com \
--cc=biju.das.jz@bp.renesas.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=jacopo+renesas@jmondi.org \
--cc=kieran.bingham+renesas@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=lvc-project@linuxtesting.org \
--cc=tomi.valkeinen+renesas@ideasonboard.com \
--cc=wsa+renesas@sang-engineering.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