On Tue, Dec 13, 2016 at 6:08 PM, Daniel Vetter <daniel.vetter@xxxxxxxx> wrote: > The list walk will shortcircuit anyway. > > Cc: Alex Deucher <alexdeucher@xxxxxxxxx> > Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxxx> Reviewed-by: Alex Deucher <alexander.deucher@xxxxxxx> > --- > 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@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx