From patchwork Fri Jan 20 14:36:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geliang Tang X-Patchwork-Id: 9528645 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 381E860459 for ; Fri, 20 Jan 2017 14:37:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 21D9A28135 for ; Fri, 20 Jan 2017 14:37:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 168BF28658; Fri, 20 Jan 2017 14:37:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 42BB928135 for ; Fri, 20 Jan 2017 14:37:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C567E6E1B5; Fri, 20 Jan 2017 14:37:17 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pg0-x242.google.com (mail-pg0-x242.google.com [IPv6:2607:f8b0:400e:c05::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3FB626E1B5; Fri, 20 Jan 2017 14:37:16 +0000 (UTC) Received: by mail-pg0-x242.google.com with SMTP id t6so7078019pgt.1; Fri, 20 Jan 2017 06:37:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=CeGlpP0PboaV/QmxdqKAOitW2luI6QoeStalq+I1WUo=; b=tSAMenCD1iU4ApX52jx59xHP3Z18kKhUxPMl0x6IfUJJxOFm0zMIjeLBsUAM7GF0DX 9WJLgi9j1hHIpI8eAOUGLWtD5Hkcdi5Q3l/Z9+dxlGKA6SIuC2CPSMOsPO2t+gZubcTs 4uk2nSZTmoTd3jM51PmhJdumvInBs+uVUCnm0Wi3eKgMc2r84MajmahEUSqZXSBqN3Uj kxvYzWx0lVb34S5U64/mmBfDF53uiLzo3d7NtrvCs3EIVAz/5bNAlcOU9IICmcyA9GBw x5WrJf9A6Kce/qvwLJr0nlRV5vNEWN3ODUF164pJ8bvPsI2mAGA+JgZGoWTgRaCOfDK3 OOyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=CeGlpP0PboaV/QmxdqKAOitW2luI6QoeStalq+I1WUo=; b=o4iNtE6RAeFIzbkJSCtYDkYo81VQ7OnXLspQS/IYXmJxD9pJc21j26xalP8GPcsN5/ BU0ubavuqw91/bqTOXAEo39OPz3lGLXw6WxHJPXQnmkWWN3/91ucaqFvjg9nAvGVXZWq KfPiwBGnsNIl4LXToedv8c3Nt1y+mNx/1MevzwS6PSGQ/TdjWIZeFJFZ84gKJOHDkXon BwMo588a+JGWqcUhxSpgeWPtSPBGfAd2tGCgndg5SOmstZMaLCDEVqbKcDTzRfUNVmop A4DZY9hGMcyTZB1h4zjG25rQCIGaetmWSdwf/3FJG1Pq/fS0fQr3+KhOkKA1SjwtWApA Si2w== X-Gm-Message-State: AIkVDXKtMTlSvETH7IY+e9I6E4Ovo2YjfQ1MfrbLzLK43MOYWZhLZL16mXx/kMFJea9lXw== X-Received: by 10.99.171.75 with SMTP id k11mr17363972pgp.16.1484923035887; Fri, 20 Jan 2017 06:37:15 -0800 (PST) Received: from localhost ([162.211.125.117]) by smtp.gmail.com with ESMTPSA id 143sm17400229pfu.58.2017.01.20.06.37.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Jan 2017 06:37:15 -0800 (PST) From: Geliang Tang To: Daniel Vetter , Jani Nikula , David Airlie Date: Fri, 20 Jan 2017 22:36:55 +0800 Message-Id: X-Mailer: git-send-email 2.9.3 In-Reply-To: References: Cc: Geliang Tang , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [Intel-gfx] [PATCH] drm/i915/error: use rb_entry() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP To make the code clearer, use rb_entry() instead of container_of() to deal with rbtree. Signed-off-by: Geliang Tang --- drivers/gpu/drm/i915/i915_gpu_error.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c index 9cd22cd..e537532 100644 --- a/drivers/gpu/drm/i915/i915_gpu_error.c +++ b/drivers/gpu/drm/i915/i915_gpu_error.c @@ -1080,7 +1080,7 @@ static void error_record_engine_waiters(struct intel_engine_cs *engine, ee->waiters = waiter; for (rb = rb_first(&b->waiters); rb; rb = rb_next(rb)) { - struct intel_wait *w = container_of(rb, typeof(*w), node); + struct intel_wait *w = rb_entry(rb, typeof(*w), node); strcpy(waiter->comm, w->tsk->comm); waiter->pid = w->tsk->pid;