Received: by 10.192.165.156 with SMTP id m28csp1271197imm; Wed, 11 Apr 2018 15:58:53 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+CM4sn0ciw6+YW/pdWf3b/9Sl2geRatkbbOk8ABuJFQpvtyakR3eS4ZFSPJ8K4kAW9NDBS X-Received: by 10.99.3.17 with SMTP id 17mr3401843pgd.163.1523487533220; Wed, 11 Apr 2018 15:58:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523487533; cv=none; d=google.com; s=arc-20160816; b=lI/38j2XLt/0zB4yFIcaRsDlea7VxswL005Nm72cyhQNwqqALL1HjPcBZFPFSaNV5v hrvAnwe5g48Xlv/pG3sAyLfHOBdXvgsM2hL41ddyHwoZZxRSDAOyBuyAmdO+LUu5PcOK q1kJySoNjt+wa9VIIaZcVqBLTmCRSmZhYL18HYp574FemNgML+K3gBbdZ8T+4HO6xbcw qmNdNsnUHIpfe47gg5+IcPWrHwoMDP3iPz+fSX+C6u0Nslria96N6+NlUSQKi2LU3ZQy MDTchMrBcealTBghOa2gckGFGAbjY7ZNZqhzj6Gu+IMVgA/gm/6SFFs8xXxU2MZNpfQ4 c3QQ== 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=f6N0EATpl/bTLfCp8kWN05UNvLjtCQCIZHTjs6WDwJA=; b=A8A1OXmGlwLoZsfFhtyQSV/C93HceHQUWU3889JgGc5c2Ipc68D6eE6pR4JYHS6U2+ c+SRKyHktjyFR1+Ev+xlI2/xA4LSjqeo8Z0jRvmY3Y0PTSwCqfOe6IEnC8aFit1r4GIS acacsBeMEC6PlL9Rq26sakQBtncKPmN31PGPVRfXxuMoSIyaZDvLolG9tA2lgpI7RWtY xLsAE7jaMlRh8QmtvkWhK8OFps6WsH4PMd75VDyWBkCxsS2sTGKLSCIn4HeQ6WeZSY7S Ij5rzxM3V/syT3LSz0kSKG18OByg91zOAzSgb831jXORhfHpBDYTUUWI0BNROQaO6a1I DOgg== 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 o12si1387821pgn.20.2018.04.11.15.58.15; Wed, 11 Apr 2018 15:58:53 -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 S1752652AbeDKWzY (ORCPT + 99 others); Wed, 11 Apr 2018 18:55:24 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:39546 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751734AbeDKWzV (ORCPT ); Wed, 11 Apr 2018 18:55:21 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C0F5E40201A8; Wed, 11 Apr 2018 22:55:20 +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 732E22026985; Wed, 11 Apr 2018 22:55:20 +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 v7 04/10] drm/dp_mst: Remove all evil duplicate state pointers Date: Wed, 11 Apr 2018 18:54:41 -0400 Message-Id: <20180411225501.26751-5-lyude@redhat.com> In-Reply-To: <20180411225501.26751-1-lyude@redhat.com> References: <20180411225501.26751-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.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Wed, 11 Apr 2018 22:55:20 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Wed, 11 Apr 2018 22:55:20 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.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ä Signed-off-by: Lyude Paul --- 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