Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp21379imm; Tue, 19 Jun 2018 13:33:33 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJqT8Gy8uM+knV6hFaiscEtn4WURjLQcBqHIaRQIFreDCOuz9t0ROmymYCqknexzS7mpBNL X-Received: by 2002:a17:902:8e87:: with SMTP id bg7-v6mr20422072plb.129.1529440413336; Tue, 19 Jun 2018 13:33:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529440413; cv=none; d=google.com; s=arc-20160816; b=iM+lRSXRgwB20i5O0nP5+CwuaL3oyXxKZtqcJTcwfTHCejzBRq1iVKUFH+TP0tlx0R TWQnxoS2k9zXzqu20ltgI3KGCk3Zf6IncPNwCEeUNeiPGGl7rfMIzGMP2hlUzhqSn9hb 4WHC3ZKfpu93/+KQCgY/raqDwE5jfyefCSFJBEYQVZzVZUnCThow2A3gqYwQw+mA5wMM VcfHytEYgydT/wsEJ8P75ucX7INN6L0ZZFkbg3DKUqGhnujB3GAkoA6HqwgyqE3gZ4VI LZVgx0In4Ceg36g2LCmJo1FQ5P7PPZQqMRYtwc0kB4gB0v9nJJYsc7FgkuGMYj2wN/lV ocpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=ht4eZixTn5+tjkWxF8iFQ8lGmj1j45/TFrf+OTnnwc8=; b=N23HDim0k5vNTLksd4RCLjBkfSYPIiLjFo6GVyI0ElAszrkN2vd+c4X6Ws1l2s9AKo J11tWd3D5+xjTtIEoZOSKBfn4uzZSE+/E2gDWeli1+BhFFcCLbCcK3QR/JiKnWfByIzm YWRN4ALWe0LOK6zDgbV556CbvMuGUEKjXwMBPx/dCfG/nWQ5q1RPUjuPx7YziJ5PCKjK a5UKPhE6v9QFYJOy/m2rAa7JS/Bee6U+Q7wI+9tOo0oNfejgZekn9dJgA4/lrAex8eow 39JF0fOlObNX+bMJq8DookJCfXq22GUW2OXXiURKiP+9TJc4m3WTJbx2iZ6boU+623iy vnpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qoK2AQ60; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d2-v6si454405pge.342.2018.06.19.13.33.19; Tue, 19 Jun 2018 13:33:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qoK2AQ60; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030443AbeFSUcg (ORCPT + 99 others); Tue, 19 Jun 2018 16:32:36 -0400 Received: from mail-qt0-f196.google.com ([209.85.216.196]:43815 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967224AbeFSUcc (ORCPT ); Tue, 19 Jun 2018 16:32:32 -0400 Received: by mail-qt0-f196.google.com with SMTP id y89-v6so1021193qtd.10 for ; Tue, 19 Jun 2018 13:32:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ht4eZixTn5+tjkWxF8iFQ8lGmj1j45/TFrf+OTnnwc8=; b=qoK2AQ60MnL2GIrwTkJlLB3YM+fekvB5lF7sgq8IuBREZKQ7smbi/mLBqEqUAZkwOd Kdly7O01QuIagZwQDhBzCo3sxLm7uZszsJ8kLfUkBoaXjcGyPGi0foZAhlr/r5qlb6VA MVSW67I/Iy2Tsi2FjH0t80YNUlv6l2sKqiRsYBjKJlogBIgG1rkCyHBaSRLuq9oqwy4O 198uwZWosRyLCT+zQsT5ggmP/Oc5yfhT+OFN5AizUNedS0XFtGYxylduecH54JHR/cxS oqI6KqvHNdTuLQqTRPllXdiMk9bOCxBD8bJPBGn0B6a03zGF+m4t7XN9QhuZrHssa3Fr zByA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ht4eZixTn5+tjkWxF8iFQ8lGmj1j45/TFrf+OTnnwc8=; b=C/E11KLsbvISOEagl7O2QR1HecFXHb9GjTI1sXspHiGAdzalPh4umg08Aew6Skg1k2 Z1w9P5WreVT48KASADrTJCJpVuA5B3wVeACPMeJntpuoJha2ZVjUJgnMEoo2l6HWpYD/ o9B2JJx27bhnCI+pqNOdGIf6srsJ+Ha2LDYr2o/NY8aNGyeJz07uxtgNkJ3k4vW0+vqX i1qHk9pzob0JkyVhUSpBJEGT29h8QJ8frR4wQyqj8Acqv9Z7hLhQE6eqzJ198Mp90MhQ VVOCjSv58aA3L8RzFn8qKL0ukb1urDldzt8tHDnayeCg9ttHPlk/X6wxbWn27NgiIqZL vDSQ== X-Gm-Message-State: APt69E0OLkzsDK5iC3VK4z57lvPGTDgqq3JPFHBxAVwAcBvYptw2Wx8z 0QevqhQf1g82SUghYehq2j0exuhkl/eobEd6yrM= X-Received: by 2002:a0c:b3d5:: with SMTP id b21-v6mr15787037qvf.80.1529440351106; Tue, 19 Jun 2018 13:32:31 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:aed:3f3d:0:0:0:0:0 with HTTP; Tue, 19 Jun 2018 13:32:30 -0700 (PDT) In-Reply-To: <4C5FD65B.8080800@gmail.com> References: <20100809063742.GA1632@arch.tripp.de> <20100809083053.GB2169@osiris.boeblingen.de.ibm.com> <20100809083451.GC2169@osiris.boeblingen.de.ibm.com> <4C5FC49B.9040208@kernel.org> <4C5FCC14.6030901@gmail.com> <20100809094630.GA1603@arch.tripp.de> <4C5FCF0C.2000100@gmail.com> <4C5FD1D1.9060302@gmail.com> <20100809101406.GA1633@arch.tripp.de> <4C5FD65B.8080800@gmail.com> From: Dave Airlie Date: Wed, 20 Jun 2018 06:32:30 +1000 Message-ID: Subject: Re: [PATCH] drm: fix fallouts from slow-work -> wq conversion To: Tejun Heo Cc: Markus Trippelsdorf , Suresh Siddha , David Airlie , Heiko Carstens , LKML , DRI , walt Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9 August 2010 at 20:20, Tejun Heo wrote: > >From 9a919c46dfa48a9c1f465174609b90253eb8ffc1 Mon Sep 17 00:00:00 2001 > From: Tejun Heo > Date: Mon, 9 Aug 2010 12:01:27 +0200 > > Commit 991ea75c (drm: use workqueue instead of slow-work), which made > drm to use wq instead of slow-work, didn't account for the return > value difference between delayed_slow_work_enqueue() and > queue_delayed_work(). The former returns 0 on success and -errno on > failures while the latter never fails and only uses the return value > to indicate whether the work was already pending or not. > > This misconversion triggered spurious error messages. Remove the now > unnecessary return value check and error message. > > Markus: caught another incorrect conversion in drm_kms_helper_poll_enable() Acked-by: David Airlie For queuing via your tree. Thanks, Dave. > > Signed-off-by: Tejun Heo > Reported-by: Markus Trippelsdorf > Tested-by: Markus Trippelsdorf > Cc: David Airlie > Cc: dri-devel@lists.freedesktop.org > --- > Oops, you're right. So, this should do it. > > Thank you. > > drivers/gpu/drm/drm_crtc_helper.c | 16 ++++------------ > 1 files changed, 4 insertions(+), 12 deletions(-) > > diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c > index 4598130..b9e4dbf 100644 > --- a/drivers/gpu/drm/drm_crtc_helper.c > +++ b/drivers/gpu/drm/drm_crtc_helper.c > @@ -839,7 +839,6 @@ static void output_poll_execute(struct work_struct *work) > struct drm_connector *connector; > enum drm_connector_status old_status, status; > bool repoll = false, changed = false; > - int ret; > > mutex_lock(&dev->mode_config.mutex); > list_for_each_entry(connector, &dev->mode_config.connector_list, head) { > @@ -874,11 +873,8 @@ static void output_poll_execute(struct work_struct *work) > dev->mode_config.funcs->output_poll_changed(dev); > } > > - if (repoll) { > - ret = queue_delayed_work(system_nrt_wq, delayed_work, DRM_OUTPUT_POLL_PERIOD); > - if (ret) > - DRM_ERROR("delayed enqueue failed %d\n", ret); > - } > + if (repoll) > + queue_delayed_work(system_nrt_wq, delayed_work, DRM_OUTPUT_POLL_PERIOD); > } > > void drm_kms_helper_poll_disable(struct drm_device *dev) > @@ -893,18 +889,14 @@ void drm_kms_helper_poll_enable(struct drm_device *dev) > { > bool poll = false; > struct drm_connector *connector; > - int ret; > > list_for_each_entry(connector, &dev->mode_config.connector_list, head) { > if (connector->polled) > poll = true; > } > > - if (poll) { > - ret = queue_delayed_work(system_nrt_wq, &dev->mode_config.output_poll_work, DRM_OUTPUT_POLL_PERIOD); > - if (ret) > - DRM_ERROR("delayed enqueue failed %d\n", ret); > - } > + if (poll) > + queue_delayed_work(system_nrt_wq, &dev->mode_config.output_poll_work, DRM_OUTPUT_POLL_PERIOD); > } > EXPORT_SYMBOL(drm_kms_helper_poll_enable); > > -- > 1.7.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel