Received: by 10.213.65.68 with SMTP id h4csp2865243imn; Mon, 2 Apr 2018 15:49:53 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+cqykmjzNqsD53neeND7M7IfT3/cb+rN3bMgapL9iy9GTD1qsU5gxtzr/r8G6e9PXptN+L X-Received: by 10.99.97.130 with SMTP id v124mr7370589pgb.351.1522709393885; Mon, 02 Apr 2018 15:49:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522709393; cv=none; d=google.com; s=arc-20160816; b=w3lU2QZTLvwKNdUz9LKOa8O/1rwPYuGj53HaasaEFfTEFItOLcV+C/vvIcq7p000k1 +X9pvt4w+qtjNDNPSQ1FfBo2vGxQawz/9EH19fSaJcHe5Q+7BfOqfHvAu81QNqJN47MY 0MvKZsnriE2BOk5rvjSF6m8prQZL68iWokDnEXP3KYZKZ5L76TUNdSgHjAA5u/NvhU1j E0E8LvvmfCFtKg+SUMnQttk5hvLpcXRCkYpShxbkvtaV1S3/9fu/gq85LeHUDgwNMp6t jIdRuvYi/lB38CsmReS6c2QVcEGwVA80knuLIjovMGXh2j/e+et3dtGfUplgT7d28qaN dm8g== 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=hJKtuXXssTmgpzgCFX6cu6Ww+XRJ1xTGHYO1GmQ25Vg=; b=BPc19Jt/bsXs8hP0ULnMX/oJrrDOalBcVdrgUWsJsvMGRjrTsZKjoWIa2R56zBCXxf fByENVdIrg/hIqgE98zG0u/wwqGJe672V1nkaFAZAPaLyf4fh+ccD6SQpwkdyqpVyh1X rNOVhnwRFd+/a3NXzID1knsi3VMZs10dwxH+J0Xjok6PndD4F8UE1PE6ugiag9dPN6Xu QlFDd7hm0iGIHJVeNTv/t1VacLjn9BZ2bF9md2DGtRG78oodNkau865vcrVV2ycyY3Ce yUVvL7ICtFIO4KBr7ADqROtLlLttVSaOfjUGgx2J9Kj8/bSgrUZPrez7LdZ4se2y08La pvxg== 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 y34-v6si1295430plb.248.2018.04.02.15.49.36; Mon, 02 Apr 2018 15:49: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 S1754666AbeDBWsT (ORCPT + 99 others); Mon, 2 Apr 2018 18:48:19 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:55174 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754516AbeDBWsQ (ORCPT ); Mon, 2 Apr 2018 18:48:16 -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 A6CB984250; Mon, 2 Apr 2018 22:48:15 +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 5908F111DCE8; Mon, 2 Apr 2018 22:48:15 +0000 (UTC) From: Lyude Paul To: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Cc: Manasi Navare , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , Gustavo Padovan , Maarten Lankhorst , Sean Paul , David Airlie , linux-kernel@vger.kernel.org Subject: [PATCH v5 04/10] drm/dp_mst: Remove all evil duplicate state pointers Date: Mon, 2 Apr 2018 18:47:40 -0400 Message-Id: <20180402224800.16080-5-lyude@redhat.com> In-Reply-To: <20180402224800.16080-1-lyude@redhat.com> References: <20180402224800.16080-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.2]); Mon, 02 Apr 2018 22:48:15 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Mon, 02 Apr 2018 22:48:15 +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ä 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 41a8f08da05d..035963fbcd9d 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