From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79B1DC43331 for ; Fri, 3 Apr 2020 17:35:35 +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 10AFC20737 for ; Fri, 3 Apr 2020 17:35:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=anholt-net.20150623.gappssmtp.com header.i=@anholt-net.20150623.gappssmtp.com header.b="H93YJMtU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 10AFC20737 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=anholt.net 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 317C46EC42; Fri, 3 Apr 2020 17:35:32 +0000 (UTC) Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id F05F66EC42 for ; Fri, 3 Apr 2020 17:35:30 +0000 (UTC) Received: by mail-lj1-x242.google.com with SMTP id r7so7728877ljg.13 for ; Fri, 03 Apr 2020 10:35:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anholt-net.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dKtIdZvLC52F10Y6xbDfkSl0Pu7i6ClghvBiyqtambU=; b=H93YJMtUtlhSvERgsd9+QhyHUPZkLUy1qm6kic51si2KSdRHYw+iGnwWRR0DJ77ORV 3xhJqij/IkPg2b9Lu55rd/U1mC12Ln1lFm6QK1yRZIco5vcryPGAnK6GmQbZezzP4mVZ pLMW5K2NguR0k8OlPVuhXA5LY88rXpv3guptSz6yRnnQkfzV+aLqWY9UeGeT+9/4GwUU qJcDdwabAiF2N0zGWrQWk/vnZpPvgNjILUBcgrKfLybcaDm/YxuKR3GpNgsR20YpQDbi FYUlEKxEdw6FafJzwcZGXHiMvE8r+lmWV4uA+NmywPEtywsIlKEmYEKXpVmHee7e+LUk j56Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dKtIdZvLC52F10Y6xbDfkSl0Pu7i6ClghvBiyqtambU=; b=dpSilCwNL60NAvDXiA30qkyTZ1hlIyz2f71dAIm4Sm8qp1zStD7ZkCEC74Kmy0fmHD WC4hxUhZMoOWAGzQMq41h6rjhQds+qSO2DOdlAasSvE6sM53wbxMKP27PJKPUtQPNktF 9hs1gtnhHnSYsuakdFzUCSi6yTzVlBnsKSGFoPIMSxaiv9ldU/J5vOrCC07fdo008rST kxZM/JGG680woTdZS22HDoTDje9qQFr4ROgRKMOmVy0sELJP9EXa3spwwzVmIYqf9gGl t1dn8vBgvtB46ba62BbqxonAEYfoPfU6y+7iZkSd+dOuer/6TXhATj6Izxa+sg7tXHG1 iI1w== X-Gm-Message-State: AGi0Pubdy6hXnTqMKeae0uAUanKNRkMhlzM+xQ+48LcHs3JUO8F2YKTv GeBysqvtAFmxVmfM2dENP3bz1pVQUErmcmGg5utQKw== X-Google-Smtp-Source: APiQypLs4HkiXBwOT8isUkymGTQ+IDH2CPTxP7O0KXPofVPFmo+KzfDaxV69aCpdnF7iK888NVyZKD1L0GpVYoGQfrM= X-Received: by 2002:a2e:b241:: with SMTP id n1mr5037078ljm.22.1585935329126; Fri, 03 Apr 2020 10:35:29 -0700 (PDT) MIME-Version: 1.0 References: <20200403135828.2542770-1-daniel.vetter@ffwll.ch> <20200403135828.2542770-15-daniel.vetter@ffwll.ch> In-Reply-To: <20200403135828.2542770-15-daniel.vetter@ffwll.ch> From: Eric Anholt Date: Fri, 3 Apr 2020 10:35:17 -0700 Message-ID: Subject: Re: [PATCH 14/44] drm/v3d: Delete v3d_dev->pdev To: Daniel Vetter 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 , Intel Graphics Development , DRI Development Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Fri, Apr 3, 2020 at 6:58 AM Daniel Vetter wrote: > > We already have it in v3d_dev->drm.dev with zero additional pointer > chasing. Personally I don't like duplicated pointers like this > because: > - reviewers need to check whether the pointer is for the same or > different objects if there's multiple > - compilers have an easier time too > > To avoid having to pull in some big headers I implemented the casting > function as a macro instead of a static inline. Typechecking thanks to > container_of still assured. > > But also a bit a bikeshed, so feel free to ignore. > > Signed-off-by: Daniel Vetter > Cc: Eric Anholt _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel