Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10592433imu; Mon, 31 Dec 2018 02:54:51 -0800 (PST) X-Google-Smtp-Source: ALg8bN7dNGOP/APafPtrmbOpaKoGy5sZJpygIPu7emm9n+Ecj8S7i7V2r22IXR1LoIGDHboFqAPC X-Received: by 2002:a63:eb52:: with SMTP id b18mr34405965pgk.213.1546253691065; Mon, 31 Dec 2018 02:54:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546253691; cv=none; d=google.com; s=arc-20160816; b=nVoVLqn8nr4bGTjr51PzUexwm9fGN8QFwwanxWJtxCNeulSMS7RPWTuzQOVmBZrhE2 HZwkMBiB9IHtDyJuaXlXgJ5eoWHBaino8GCH7bw4iPwMoxCSZ9XR3aUdvm3IXOFZ0HyP Bw3lnMKhxdfiDbXL7S1cX9TmmNZOoCTms8hdSkDhFOIG04rOHsKBY3e/DIB4R5EKxbYR pZazWSURwPm5oa6vh/62QybUXch2BPhoKdtg7Kv7qqnLWt/wM/x8wqNlwyExLEzMBOyM c6TUv3qKsmsCCaav9ZPa5oqlIegG0v5oRGAB82iLoxFdwq0TjUxzS2uQKhuZr0vrrj6g VgJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:cc:to:subject:dkim-signature:dkim-filter; bh=Zxj6SP95YpfZXWePv+WYDWjDmuZM6/A+YKdIB3ksJGc=; b=rN6k6y5/ED1XGYdnU9ZHSMDYgsQ5kDei+BSG6U8luc0XC0Df3LHlkOhp9LAEWmZS9M vksa6HHPR7optSSGQiM+ucNGtzrVhAFQxN5n88Wo52kpPXnMjuPi+fhsaO9rJQfR8Npw SiPtqvNPzgH6Kk3PJNVH+eWdYvzX2et8PZ+1yQXMr7Ei4ZPmNknJIeghc/HK1v/oMPfz XHWiMesxD0djM+d922qRjqM5OkaEDS1/SM9+Rrjloe6ascMFHfjmXhwWh4xj83n4UhaH 0p9FOMtgkwCTuu/sj67DvwT+lfOPJgAgACZcM0zQ85Z12f8d+YjvnlHcfKik686KZE9q 06qQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=OnYdWD8q; 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=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c3si43986931pgi.370.2018.12.31.02.54.35; Mon, 31 Dec 2018 02:54:51 -0800 (PST) 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; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=OnYdWD8q; 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=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727269AbeLaKxr (ORCPT + 99 others); Mon, 31 Dec 2018 05:53:47 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:60675 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726988AbeLaKxq (ORCPT ); Mon, 31 Dec 2018 05:53:46 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20181231105344euoutp0148689aa8998256120b41365dc4c8490d~1ZXqYru5D2894728947euoutp01n for ; Mon, 31 Dec 2018 10:53:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20181231105344euoutp0148689aa8998256120b41365dc4c8490d~1ZXqYru5D2894728947euoutp01n DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1546253624; bh=Zxj6SP95YpfZXWePv+WYDWjDmuZM6/A+YKdIB3ksJGc=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=OnYdWD8qpd3xrqIsJ6Fx6NEQxgurIXkY+ExNPXKYaNVfCPkY9fFGgJZroDSgqlEkb QiX0cSfFG5R6WgMCKa67ihT1ATWvFNpOQTD3MxBB5EIog42lLtx5DI30nl1OoGGExv /blUBwqVSHea6vL2QkEcN/3/6t0WUCWfEFhdYZu8= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20181231105343eucas1p21da338a4e1ecba79f665cf93fb933cd4~1ZXpUUwpe2091220912eucas1p2B; Mon, 31 Dec 2018 10:53:43 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id DF.28.04294.635F92C5; Mon, 31 Dec 2018 10:53:42 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20181231105342eucas1p15e8939e3599a77db58dbf31780f8a5f4~1ZXolHaF_1905919059eucas1p1A; Mon, 31 Dec 2018 10:53:42 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20181231105342eusmtrp2a4f47c790def9ad9897b40b85fd844cb~1ZXoV7MY11006010060eusmtrp2N; Mon, 31 Dec 2018 10:53:42 +0000 (GMT) X-AuditID: cbfec7f4-84fff700000010c6-b7-5c29f536fd57 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 09.1F.04284.535F92C5; Mon, 31 Dec 2018 10:53:42 +0000 (GMT) Received: from [106.120.43.17] (unknown [106.120.43.17]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20181231105341eusmtip13d47531cd3f6bc27b03a1e13e2762217~1ZXnwAIyz1842418424eusmtip1P; Mon, 31 Dec 2018 10:53:41 +0000 (GMT) Subject: Re: [PATCH v2 08/14] drm: remove include of drmP.h from bridge/dw_hdmi.h To: Sam Ravnborg , Daniel Vetter , David Airlie , Maarten Lankhorst , Maxime Ripard , Sean Paul , David Lechner , Laurent Pinchart , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: Archit Taneja , Kieran Bingham , Fabio Estevam , Neil Armstrong From: Andrzej Hajda Message-ID: Date: Mon, 31 Dec 2018 11:53:40 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181230174838.32330-9-sam@ravnborg.org> Content-Transfer-Encoding: 8bit Content-Language: en-US X-Brightmail-Tracker: H4sIAAAAAAAAA01SbUhTYRjt3b13u5Mmr9PyYUXloB8r0z7tRjIsCi9EUAQSKejS25R0xm6a 5Y+WZkyXlgXVlpjV+k7Er9UWZtlwjkwyp9inBhJUmC11JVS2u6vkv/Oec573nAcemlCOUyo6 x3CYMxp0uWppGOnonOpZlTCpSVvdbUlgKnu8EqbEPEox045qgrlmWsj4JsekTGPzW5L5MWBB THm1Xcb0uWqkzFV/K8kMf25HTEdVKnN7qhUx78+7UVI4OzZYJmNr7xezfVWVErYtUEeyl81W iv1xxkuxDwLDFFvr3c0OWTwStvHbQwnrcb2RsfYL/VJ2vGnJLsW+sMQsLjenkDPGazPCsvs+ PyUPlS8panjVR5jQV6hAchrwemiffi2tQGG0Et9GEDjZRgmCEk8gcJ6Ri8I4gsYTldTsRL/p HCUKtxC03Awg8TGKYMTvkAmuSLwH7jQ5JIIQhS0EVLiHQiEEdgb/qiwjBZcUa+BPs5AupxVY C966nyGexMuhpPRxKG8B3gvmoXszngjwWkdCHjlOgE+ddiRgAi+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G+dDWWLS9x6Mp9pAqPQLCTt s5C0zELSMgtJywJGllWMIqmlxbnpucWGesWJucWleel6yfm5mxiBSWDbsZ+bdzBe2hh8iFGA g1GJh3cGg2aMEGtiWXFl7iFGCQ5mJRHesHigEG9KYmVValF+fFFpTmrxIUZToOcmMkuJJucD E1ReSbyhqaG5haWhubG5sZmFkjjveYPKKCGB9MSS1OzU1ILUIpg+Jg5OqQbG8vcLyjZrVWz1 PNa8/2dO6I9XV1nvyB09ITFFYuNqKakjf851RL/0+T3x+SdF0c+ieSY+JZETfu+6b8CtKj5D yN1qFY+PpPsS6Q1PMpTZGvcb/frLeavg1NqLh5X+37mjH2Gk73/72bmux82NN/x+Tz3lOk8n b+EKqbvi9oUFnAvOv502363aT4mlOCPRUIu5qDgRACnYWs0YAwAA X-CMS-MailID: 20181231105342eucas1p15e8939e3599a77db58dbf31780f8a5f4 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20181230175004epcas1p4f675fc8ea5d1073e3461d15c9dd57862 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181230175004epcas1p4f675fc8ea5d1073e3461d15c9dd57862 References: <20181230174838.32330-9-sam@ravnborg.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30.12.2018 18:48, Sam Ravnborg wrote: > drmP.h is an relic from the days when there was a single header file. > To enable the removal of drmP.h from all users drop include > of drmP.h from bridge/dw_hdmi.h. > > A few files relied on the file included in drmP.h - add explicit > include statements or forward declarations to these files. > Build tested with arm and x86. > > v2: > - prefer forward declarations when possible (Laurent Pinchart) > - sort include files (Laurent Pinchart) > > Signed-off-by: Sam Ravnborg > Reviewed-by: Laurent Pinchart > Cc: Archit Taneja > Cc: Andrzej Hajda > Cc: David Airlie > Cc: Daniel Vetter > Cc: Kieran Bingham > Cc: Fabio Estevam > Cc: Neil Armstrong > Cc: Maxime Ripard One general comment below. > --- > drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c | 4 ++++ > drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c | 1 + > include/drm/bridge/dw_hdmi.h | 6 ++++-- > 3 files changed, 9 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c > index 2228689d9a5e..5cbb71a866d5 100644 > --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c > +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c > @@ -5,6 +5,10 @@ > * Copyright (c) 2017 Renesas Solutions Corp. > * Kuninori Morimoto > */ > + > +#include > +#include > + > #include > > #include > diff --git a/drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c b/drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c > index 75490a3e0a2a..790d499daa10 100644 > --- a/drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c > +++ b/drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c > @@ -7,6 +7,7 @@ > * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com) > */ > > +#include > #include > #include > > diff --git a/include/drm/bridge/dw_hdmi.h b/include/drm/bridge/dw_hdmi.h > index 9c56412bb2cf..9f93895dde88 100644 > --- a/include/drm/bridge/dw_hdmi.h > +++ b/include/drm/bridge/dw_hdmi.h > @@ -10,9 +10,11 @@ > #ifndef __DW_HDMI__ > #define __DW_HDMI__ > > -#include > - > +struct drm_connector; > +struct drm_display_mode; > +struct drm_encoder; > struct dw_hdmi; > +struct platform_device; > > /** > * DOC: Supported input formats and encodings I wonder if it wouldn't be better to create common file for forward declarations. For example: include/drm/drm_forward.h which will contain only forward declarations, this way we could avoid adding these declarations in every file again and again. Since I have not seen such practice in kernel I wonder if such approach has no serious drawbacks, but for now I do not see any, except it looks like another incarnation of drmP.h :) Quick grep shows potential candidates for forward declarations: $ git grep -Ph '^struct drm_\S+;$' include/ drivers/gpu/ | sort | uniq -c | sort -n | tail       7 struct drm_encoder;       7 struct drm_gem_object;       8 struct drm_printer;       9 struct drm_connector;       9 struct drm_framebuffer;      13 struct drm_plane;      14 struct drm_crtc;      22 struct drm_i915_private;      23 struct drm_file;      47 struct drm_device; Anyway: Reviewed-by: Andrzej Hajda  -- Regards Andrzej