From: Daniel Vetter <daniel@ffwll.ch>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: airlied@linux.ie, daniel@ffwll.ch,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] drm: Release resources with a safer function
Date: Mon, 10 Oct 2016 09:22:37 +0000 [thread overview]
Message-ID: <20161010092237.GT20761@phenom.ffwll.local> (raw)
In-Reply-To: <1475825261-7735-1-git-send-email-christophe.jaillet@wanadoo.fr>
On Fri, Oct 07, 2016 at 09:27:41AM +0200, Christophe JAILLET wrote:
> We should use 'ida_simple_remove()' instead of 'ida_remove()' when freeing
> resources allocated with 'ida_simple_get()'.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Applied to drm-misc, thanks.
-Daniel
> ---
> drivers/gpu/drm/drm_connector.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
> index 2e7430283043..2db7fb510b6c 100644
> --- a/drivers/gpu/drm/drm_connector.c
> +++ b/drivers/gpu/drm/drm_connector.c
> @@ -341,11 +341,11 @@ void drm_connector_cleanup(struct drm_connector *connector)
> list_for_each_entry_safe(mode, t, &connector->modes, head)
> drm_mode_remove(connector, mode);
>
> - ida_remove(&drm_connector_enum_list[connector->connector_type].ida,
> - connector->connector_type_id);
> + ida_simple_remove(&drm_connector_enum_list[connector->connector_type].ida,
> + connector->connector_type_id);
>
> - ida_remove(&dev->mode_config.connector_ida,
> - connector->index);
> + ida_simple_remove(&dev->mode_config.connector_ida,
> + connector->index);
>
> kfree(connector->display_info.bus_formats);
> drm_mode_object_unregister(dev, &connector->base);
> --
> 2.7.4
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
WARNING: multiple messages have this Message-ID (diff)
From: Daniel Vetter <daniel@ffwll.ch>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: airlied@linux.ie, daniel@ffwll.ch,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] drm: Release resources with a safer function
Date: Mon, 10 Oct 2016 11:22:37 +0200 [thread overview]
Message-ID: <20161010092237.GT20761@phenom.ffwll.local> (raw)
In-Reply-To: <1475825261-7735-1-git-send-email-christophe.jaillet@wanadoo.fr>
On Fri, Oct 07, 2016 at 09:27:41AM +0200, Christophe JAILLET wrote:
> We should use 'ida_simple_remove()' instead of 'ida_remove()' when freeing
> resources allocated with 'ida_simple_get()'.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Applied to drm-misc, thanks.
-Daniel
> ---
> drivers/gpu/drm/drm_connector.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
> index 2e7430283043..2db7fb510b6c 100644
> --- a/drivers/gpu/drm/drm_connector.c
> +++ b/drivers/gpu/drm/drm_connector.c
> @@ -341,11 +341,11 @@ void drm_connector_cleanup(struct drm_connector *connector)
> list_for_each_entry_safe(mode, t, &connector->modes, head)
> drm_mode_remove(connector, mode);
>
> - ida_remove(&drm_connector_enum_list[connector->connector_type].ida,
> - connector->connector_type_id);
> + ida_simple_remove(&drm_connector_enum_list[connector->connector_type].ida,
> + connector->connector_type_id);
>
> - ida_remove(&dev->mode_config.connector_ida,
> - connector->index);
> + ida_simple_remove(&dev->mode_config.connector_ida,
> + connector->index);
>
> kfree(connector->display_info.bus_formats);
> drm_mode_object_unregister(dev, &connector->base);
> --
> 2.7.4
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
next prev parent reply other threads:[~2016-10-10 9:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-02 6:01 [PATCH] drm: Release resources with a safer function Christophe JAILLET
2016-10-02 6:01 ` Christophe JAILLET
2016-10-03 7:18 ` Ville Syrjälä
2016-10-03 7:18 ` Ville Syrjälä
2016-10-05 13:17 ` Daniel Vetter
2016-10-05 13:17 ` Daniel Vetter
2016-10-07 7:27 ` Christophe JAILLET
2016-10-07 7:27 ` Christophe JAILLET
2016-10-10 9:22 ` Daniel Vetter [this message]
2016-10-10 9:22 ` Daniel Vetter
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=20161010092237.GT20761@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=airlied@linux.ie \
--cc=christophe.jaillet@wanadoo.fr \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.