Received: by 10.192.165.156 with SMTP id m28csp1308796imm; Wed, 11 Apr 2018 16:50:38 -0700 (PDT) X-Google-Smtp-Source: AIpwx48rd+PqXbH9v29lnBhS48muBiNzghbUeRkfbIbcq9oOyBloU2XF59Q66uTEPLykibJlxnrW X-Received: by 2002:a17:902:b081:: with SMTP id p1-v6mr7170990plr.31.1523490638573; Wed, 11 Apr 2018 16:50:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523490638; cv=none; d=google.com; s=arc-20160816; b=NDuW0lA1qJF+VQ5iq0zBLqd5S82z96k8jPaX3qIkX7678OrTEvWsGIHxHJSyr4cKqA j0el6LdzrZuHFcIxqf2coIEdQQLbx7jtmQnGhspoDyc5eaN57ovCFlmKWBG9xoItiYAw LpePc4aI36KqRYhWAhL5TS9XYYsmZE7lGEdySWQ1/0na9Cr9qOMNyStVjQpT+Yhu+iee sWJgpWq2U7XSQXqUVFyl54Ojm2ak2Av3hAtkAV9A/oYqK/jRP4tqxfbeI+ap41vUf78U 8CY6A6pKCjNLnZtJvXPJtsnSq6TNQKWahu3MUq7nZ/X02UnUfQM/J1+e954RsJbC59/S 87QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=Wor+d25EJ6c0x0w7alXngeQwKx9FsEgqcpBF9DOICYs=; b=QDgGkcJZcGoxIbCS+b0k9XezxWS2yKKFAyc9KsbTcisjYUm/UyqCDBQrXBFkqc+Hf6 JyeGh9sOA9W2WOKpc9nhmohMjf81UIY5qq7B5nGSdWLcbUZBweNZXdLJccLgSrh5IJUL Ce3+aERvUH3qrg87yUySx0vni/azj3hNlWsjvnPN9+yU1Z5RBYrCF3HA5ZihFjNdZ0b5 gTz/CjTw4E2YlduGFaFaL53Paexk63S7HHUWoMjbPqtz/gsnejOk6iKGslNNFoymwtDp mzByX3l2cmIV7SGONrVqvXW6Z2Ny1ErM1WJ2Fr9hOmeg4ED1Br2rbhg7cp9+X87RACGU bMEQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p8-v6si2121610plo.295.2018.04.11.16.50.01; Wed, 11 Apr 2018 16:50:38 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752574AbeDKXn1 (ORCPT + 99 others); Wed, 11 Apr 2018 19:43:27 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:60498 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752408AbeDKXnO (ORCPT ); Wed, 11 Apr 2018 19:43:14 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3BFB88182D1C; Wed, 11 Apr 2018 23:43:14 +0000 (UTC) Received: from malachite.bss.redhat.com (dhcp-10-20-1-55.bss.redhat.com [10.20.1.55]) by smtp.corp.redhat.com (Postfix) with ESMTP id E2BA71208F6B; Wed, 11 Apr 2018 23:43:13 +0000 (UTC) From: Lyude Paul To: intel-gfx@lists.freedesktop.org Cc: Manasi Navare , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , Gustavo Padovan , Maarten Lankhorst , Sean Paul , David Airlie , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v8 04/10] drm/dp_mst: Remove all evil duplicate state pointers Date: Wed, 11 Apr 2018 19:42:43 -0400 Message-Id: <20180411234302.2896-5-lyude@redhat.com> In-Reply-To: <20180411234302.2896-1-lyude@redhat.com> References: <20180411234302.2896-1-lyude@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Wed, 11 Apr 2018 23:43:14 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Wed, 11 Apr 2018 23:43:14 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'lyude@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There's no reason to track the atomic state three times. Unfortunately, this is currently what we're doing, and even worse is that there is only one actually correct state pointer: the one in mst_state->base.state. mgr->state never seems to be used, along with the one in mst_state->state. This confused me for over 4 hours until I realized there was no magic behind these pointers. So, let's save everyone else from the trouble. Signed-off-by: Lyude Paul . Cc: Manasi Navare Cc: Ville Syrjälä --- include/drm/drm_dp_mst_helper.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/include/drm/drm_dp_mst_helper.h b/include/drm/drm_dp_mst_helper.h index 2f6203407fd2..5ca77dcf4f90 100644 --- a/include/drm/drm_dp_mst_helper.h +++ b/include/drm/drm_dp_mst_helper.h @@ -409,7 +409,6 @@ struct drm_dp_payload { struct drm_dp_mst_topology_state { struct drm_private_state base; int avail_slots; - struct drm_atomic_state *state; struct drm_dp_mst_topology_mgr *mgr; }; @@ -497,11 +496,6 @@ struct drm_dp_mst_topology_mgr { */ int pbn_div; - /** - * @state: State information for topology manager - */ - struct drm_dp_mst_topology_state *state; - /** * @funcs: Atomic helper callbacks */ -- 2.14.3