linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: walt <w41ter@gmail.com>
To: Tejun Heo <htejun@gmail.com>
Cc: Markus Trippelsdorf <markus@trippelsdorf.de>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	linux-kernel@vger.kernel.org,
	Suresh Siddha <suresh.b.siddha@intel.com>,
	David Airlie <airlied@linux.ie>,
	DRI <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] drm: fix fallouts from slow-work -> wq conversion
Date: Mon, 09 Aug 2010 07:00:30 -0700	[thread overview]
Message-ID: <4C6009FE.4020702@gmail.com> (raw)
In-Reply-To: <4C5FD65B.8080800@gmail.com>

On 08/09/2010 03:20 AM, Tejun Heo wrote:
>  From 9a919c46dfa48a9c1f465174609b90253eb8ffc1 Mon Sep 17 00:00:00 2001
> From: Tejun Heo<tj@kernel.org>
> 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.


> 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);


I was getting the same spurious error messages, and this patches fixes it, thanks.

  reply	other threads:[~2010-08-09 14:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-08 20:17 [BISECTED] Today's Linus.git hangs during boot: can't find the floppy controller walt
2010-08-09  6:37 ` Markus Trippelsdorf
2010-08-09  8:30   ` Heiko Carstens
2010-08-09  8:34     ` Heiko Carstens
2010-08-09  9:04       ` Tejun Heo
2010-08-09  9:36         ` [PATCH wq#for-linus] workqueue: workqueue_cpu_callback() should be cpu_notifier not hotcpu_notifier Tejun Heo
2010-08-09  9:46           ` Markus Trippelsdorf
2010-08-09  9:49             ` Tejun Heo
2010-08-09  9:56               ` Markus Trippelsdorf
2010-08-09 10:00               ` [PATCH wq#for-linus] drm: fix a fallout from slow-work -> wq conversion Tejun Heo
2010-08-09 10:14                 ` Markus Trippelsdorf
2010-08-09 10:20                   ` [PATCH] drm: fix fallouts " Tejun Heo
2010-08-09 14:00                     ` walt [this message]
2018-06-19 20:32                     ` Dave Airlie
2010-08-09 13:56           ` [PATCH wq#for-linus] workqueue: workqueue_cpu_callback() should be cpu_notifier not hotcpu_notifier walt
2010-08-09 17:07           ` Suresh Siddha

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=4C6009FE.4020702@gmail.com \
    --to=w41ter@gmail.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=heiko.carstens@de.ibm.com \
    --cc=htejun@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markus@trippelsdorf.de \
    --cc=suresh.b.siddha@intel.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).