All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Daniel Vetter <daniel.vetter@intel.com>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	DRI Development <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 03/13] drm/radeon|amdgpu: Remove redundant num_connectors check
Date: Wed, 14 Dec 2016 11:59:32 -0500	[thread overview]
Message-ID: <CADnq5_NT091Uou-s1PZtxjqxJRUo14=ZLK+GmvggfYo679DWXQ@mail.gmail.com> (raw)
In-Reply-To: <20161213230814.19598-4-daniel.vetter@ffwll.ch>

On Tue, Dec 13, 2016 at 6:08 PM, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> The list walk will shortcircuit anyway.
>
> Cc: Alex Deucher <alexdeucher@gmail.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c |  6 ++----
>  drivers/gpu/drm/radeon/radeon_irq_kms.c | 12 ++++--------
>  2 files changed, 6 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> index fb902932f571..e63ece049b05 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> @@ -61,10 +61,8 @@ static void amdgpu_hotplug_work_func(struct work_struct *work)
>         struct drm_connector *connector;
>
>         mutex_lock(&mode_config->mutex);
> -       if (mode_config->num_connector) {
> -               list_for_each_entry(connector, &mode_config->connector_list, head)
> -                       amdgpu_connector_hotplug(connector);
> -       }
> +       list_for_each_entry(connector, &mode_config->connector_list, head)
> +               amdgpu_connector_hotplug(connector);
>         mutex_unlock(&mode_config->mutex);
>         /* Just fire off a uevent and let userspace tell us what to do */
>         drm_helper_hpd_irq_event(dev);
> diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c b/drivers/gpu/drm/radeon/radeon_irq_kms.c
> index c084cadcbf21..1b7528df7f7f 100644
> --- a/drivers/gpu/drm/radeon/radeon_irq_kms.c
> +++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c
> @@ -85,10 +85,8 @@ static void radeon_hotplug_work_func(struct work_struct *work)
>                 return;
>
>         mutex_lock(&mode_config->mutex);
> -       if (mode_config->num_connector) {
> -               list_for_each_entry(connector, &mode_config->connector_list, head)
> -                       radeon_connector_hotplug(connector);
> -       }
> +       list_for_each_entry(connector, &mode_config->connector_list, head)
> +               radeon_connector_hotplug(connector);
>         mutex_unlock(&mode_config->mutex);
>         /* Just fire off a uevent and let userspace tell us what to do */
>         drm_helper_hpd_irq_event(dev);
> @@ -103,10 +101,8 @@ static void radeon_dp_work_func(struct work_struct *work)
>         struct drm_connector *connector;
>
>         /* this should take a mutex */
> -       if (mode_config->num_connector) {
> -               list_for_each_entry(connector, &mode_config->connector_list, head)
> -                       radeon_connector_hotplug(connector);
> -       }
> +       list_for_each_entry(connector, &mode_config->connector_list, head)
> +               radeon_connector_hotplug(connector);
>  }
>  /**
>   * radeon_driver_irq_preinstall_kms - drm irq preinstall callback
> --
> 2.11.0
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-12-14 16:59 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-13 23:08 [PATCH 00/13] some stuff, and then connector_list locking Daniel Vetter
2016-12-13 23:08 ` [PATCH 01/13] drm/irq: drm_legacy_ prefix for legacy ioctls Daniel Vetter
2016-12-16 15:02   ` Sean Paul
2016-12-13 23:08 ` [PATCH 02/13] drm: Move atomic debugfs functions into drm_crtc_internal.h Daniel Vetter
2016-12-16 15:02   ` Sean Paul
2016-12-13 23:08 ` [PATCH 03/13] drm/radeon|amdgpu: Remove redundant num_connectors check Daniel Vetter
2016-12-14 16:59   ` Alex Deucher [this message]
2016-12-13 23:08 ` [PATCH 04/13] drm: Drop locking cargo-cult from drm_mode_config_init Daniel Vetter
2016-12-14  9:23   ` [Intel-gfx] " Daniel Stone
2016-12-16 15:03   ` Sean Paul
2016-12-13 23:08 ` [PATCH 05/13] drm: locking&new iterators for connector_list Daniel Vetter
2016-12-14  8:35   ` Chris Wilson
2016-12-14 11:22   ` Jani Nikula
2016-12-14 12:26     ` Daniel Vetter
2016-12-14 15:04       ` [Intel-gfx] " Jani Nikula
2016-12-16 15:03   ` Sean Paul
2016-12-13 23:08 ` [PATCH 06/13] drm: Convert all helpers to drm_connector_list_iter Daniel Vetter
2016-12-15 14:34   ` Harry Wentland
2016-12-15 15:58   ` [PATCH] " Daniel Vetter
2016-12-15 16:32     ` Harry Wentland
2016-12-15 22:47     ` kbuild test robot
2016-12-15 22:59     ` kbuild test robot
2016-12-16  7:29       ` Daniel Vetter
2016-12-16  7:41         ` [kbuild-all] " Fengguang Wu
2016-12-18 18:04           ` Ye Xiaolong
2016-12-16 15:03     ` Sean Paul
2016-12-13 23:08 ` [PATCH 07/13] drm: Clean up connectors by unreferencing them Daniel Vetter
2016-12-15 15:45   ` Harry Wentland
2016-12-16 15:03   ` Sean Paul
2016-12-13 23:08 ` [PATCH 08/13] drm: prevent double-(un)registration for connectors Daniel Vetter
2016-12-13 23:52   ` Chris Wilson
2016-12-16 15:03   ` Sean Paul
2016-12-13 23:08 ` [PATCH 09/13] drm: Tighten locking in drm_mode_getconnector Daniel Vetter
2016-12-16 15:03   ` Sean Paul
2016-12-18 13:40     ` Daniel Vetter
2016-12-13 23:08 ` [PATCH 10/13] drm/i915: Use drm_connector_list_iter in debugfs Daniel Vetter
2016-12-14 14:44   ` Jani Nikula
2016-12-14 14:51     ` [Intel-gfx] " Daniel Vetter
2016-12-13 23:08 ` [PATCH 11/13] drm/i915: use drm_connector_list_iter in intel_hotplug.c Daniel Vetter
2016-12-13 23:08 ` [PATCH 12/13] drm/i915: use drm_connector_list_iter in intel_opregion.c Daniel Vetter
2016-12-13 23:08 ` [PATCH 13/13] drm/i915: Make intel_get_pipe_from_connector atomic 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='CADnq5_NT091Uou-s1PZtxjqxJRUo14=ZLK+GmvggfYo679DWXQ@mail.gmail.com' \
    --to=alexdeucher@gmail.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.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.