From patchwork Wed Apr 15 07:39:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 11490039 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 67E3792C for ; Wed, 15 Apr 2020 07:41:36 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 46D50206D9 for ; Wed, 15 Apr 2020 07:41:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="a67CzmCU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 46D50206D9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0E6D46E88F; Wed, 15 Apr 2020 07:40:57 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by gabe.freedesktop.org (Postfix) with ESMTPS id 44CE46E87A for ; Wed, 15 Apr 2020 07:40:49 +0000 (UTC) Received: by mail-wm1-x341.google.com with SMTP id a201so17305539wme.1 for ; Wed, 15 Apr 2020 00:40:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CgX7+JzAzrMLxzBna+OEb05iI4HbBQeG4jLLn6dDjgg=; b=a67CzmCUX/ANWlQb5rd0+RZD/Ta5MecS+Ldu7gJm92Q/KF4sCYbr26jikOyStVvM0W GjGWPqyl8nl4RhJeZouuUiN0qgQkUtToqAxfJq/1SuD6rsNS0N5nDBHUYHMK1IsDQeP/ yIM3LBuBZ276VuG7brkw0JMyC69/iN00bNawI= 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:mime-version:content-transfer-encoding; bh=CgX7+JzAzrMLxzBna+OEb05iI4HbBQeG4jLLn6dDjgg=; b=j8Z0OQ/g068UEUEc83TostZKn4e/36KeJUQhbRezoO8pra5MlKLeCqvJMqillL3agz 70qDJblgbnDMMgn1S5s7y8hBankUaIGoz07TJY7O9KYwXpgngpc8f2p2AXZmBB+yJoR8 LLY6FanWWnyDCYZcfU0IeTWSAq0UV3HE15RRbhYa9sXD5VwGmnFgLhflZ3vU9llzxUDz x7v/st8vzfeoQokpgKvR4WOBjQACrdIRURV3/agwhxWVo9lq63SQjDertSAGgxcrzmYO TU1trU6YzQrgfoS+i5qvLR52W+ag0uYXqQzMsFCmg3yAKupyjoEcE5ihnuDK3eEwvgD+ 7E9w== X-Gm-Message-State: AGi0PuYpMCvptnqAb7TwFVYyt8+ReO6WElu1NRShAnLsol/MXD4ayfps 9kT4bBLRXJ2dOFhEX9vrEqp6HWkelJk= X-Google-Smtp-Source: APiQypKyXFavdPvml466ygFUU7M7XTGYvvh01BZeNaQLjrSWVYyV2OUaUzdwCHY0vgmK3CX18aWGMQ== X-Received: by 2002:a7b:c931:: with SMTP id h17mr4034496wml.105.1586936448020; Wed, 15 Apr 2020 00:40:48 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id u30sm1878552wru.13.2020.04.15.00.40.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Apr 2020 00:40:47 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development Subject: [PATCH 07/59] drm/v3d: Don't set drm_device->dev_private Date: Wed, 15 Apr 2020 09:39:42 +0200 Message-Id: <20200415074034.175360-8-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200415074034.175360-1-daniel.vetter@ffwll.ch> References: <20200415074034.175360-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Vetter , Daniel Vetter , DRI Development Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" And switch the helper over to container_of, which is a bunch faster than chasing a pointer. Plus allows gcc to see through this maze. Acked-by: Eric Anholt Signed-off-by: Daniel Vetter Cc: Eric Anholt --- drivers/gpu/drm/v3d/v3d_drv.c | 1 - drivers/gpu/drm/v3d/v3d_drv.h | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/v3d/v3d_drv.c b/drivers/gpu/drm/v3d/v3d_drv.c index 8d0c0daaac81..ead62a15d48f 100644 --- a/drivers/gpu/drm/v3d/v3d_drv.c +++ b/drivers/gpu/drm/v3d/v3d_drv.c @@ -265,7 +265,6 @@ static int v3d_platform_drm_probe(struct platform_device *pdev) } platform_set_drvdata(pdev, drm); - drm->dev_private = v3d; drmm_add_final_kfree(drm, v3d); ret = map_regs(v3d, &v3d->hub_regs, "hub"); diff --git a/drivers/gpu/drm/v3d/v3d_drv.h b/drivers/gpu/drm/v3d/v3d_drv.h index e0775c884553..112d80aed5f6 100644 --- a/drivers/gpu/drm/v3d/v3d_drv.h +++ b/drivers/gpu/drm/v3d/v3d_drv.h @@ -121,7 +121,7 @@ struct v3d_dev { static inline struct v3d_dev * to_v3d_dev(struct drm_device *dev) { - return (struct v3d_dev *)dev->dev_private; + return container_of(dev, struct v3d_dev, drm); } static inline bool