From: Sam Ravnborg <sam@ravnborg.org>
To: Bernard <bernard@vivo.com>
Cc: opensource.kernel@vivo.com, linux-samsung-soc@vger.kernel.org,
Joonyoung Shim <jy0922.shim@samsung.com>,
David Airlie <airlied@linux.ie>,
Seung-Woo Kim <sw0312.kim@samsung.com>,
linux-kernel@vger.kernel.org,
Krzysztof Kozlowski <krzk@kernel.org>,
Inki Dae <inki.dae@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Kukjin Kim <kgene@kernel.org>,
dri-devel@lists.freedesktop.org, Daniel Vetter <daniel@ffwll.ch>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] drm/exynos: remove no need devm_kfree in probe [re-send, welcome any comments]
Date: Fri, 8 May 2020 09:52:10 +0200 [thread overview]
Message-ID: <20200508075210.GA8789@ravnborg.org> (raw)
In-Reply-To: <AMkACAAICCLCcgaekrYcyKoA.1.1588769343436.Hmail.bernard@vivo.com>
Hi Bernard.
On Wed, May 06, 2020 at 08:49:03PM +0800, Bernard wrote:
> Remove no need devm_kfree in probe.
> The change is to make the code a bit more readable
>
> Signed-off-by: Bernard Zhao <bernard@vivo.com>
Could you take a closer look and fix similar patterns
in the rest of the driver?
For example in exynos_dpi_probe()
Is would be nice to only have to review for this
type of changes once, so one patch-set is preferred
over single patches over time.
You can add:
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
to this patch when you re-send a new series.
Thanks,
Sam
> ---
> drivers/gpu/drm/exynos/exynos_drm_dpi.c | 10 +++-------
> 1 file changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_dpi.c b/drivers/gpu/drm/exynos/exynos_drm_dpi.c
> index 43fa0f26c052..e06f7d7a6695 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_dpi.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_dpi.c
> @@ -181,10 +181,8 @@ static int exynos_dpi_parse_dt(struct exynos_dpi *ctx)
> return -ENOMEM;
>
> ret = of_get_videomode(dn, vm, 0);
> - if (ret < 0) {
> - devm_kfree(dev, vm);
> + if (ret < 0)
> return ret;
> - }
>
> ctx->vm = vm;
>
> @@ -233,10 +231,8 @@ struct drm_encoder *exynos_dpi_probe(struct device *dev)
> ctx->dev = dev;
>
> ret = exynos_dpi_parse_dt(ctx);
> - if (ret < 0) {
> - devm_kfree(dev, ctx);
> - return NULL;
> - }
> + if (ret < 0)
> + return ERR_PTR(ret);
>
> if (ctx->panel_node) {
> ctx->panel = of_drm_find_panel(ctx->panel_node);
> --
> 2.26.2
>
>
> [re-send, welcome any comments]
> Regards,
> Bernard
>
>
>
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-05-08 7:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-06 12:49 [PATCH] drm/exynos: remove no need devm_kfree in probe [re-send, welcome any comments] Bernard
2020-05-08 7:52 ` Sam Ravnborg [this message]
2020-05-08 8:44 ` Bernard
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=20200508075210.GA8789@ravnborg.org \
--to=sam@ravnborg.org \
--cc=airlied@linux.ie \
--cc=bernard@vivo.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=inki.dae@samsung.com \
--cc=jy0922.shim@samsung.com \
--cc=kgene@kernel.org \
--cc=krzk@kernel.org \
--cc=kyungmin.park@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=opensource.kernel@vivo.com \
--cc=sw0312.kim@samsung.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;
as well as URLs for NNTP newsgroup(s).