dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: David Airlie <airlied@linux.ie>,
	Peter Senna Tschudin <peter.senna@gmail.com>,
	Martyn Welch <martyn.welch@collabora.co.uk>,
	dri-devel@lists.freedesktop.org,
	Martin Donnelly <martin.donnelly@ge.com>
Subject: Re: [PATCH v2 2/2] drm/bridge: drop drmP.h usage
Date: Mon, 20 May 2019 20:06:40 +0200	[thread overview]
Message-ID: <20190520180640.GA32368@ravnborg.org> (raw)
In-Reply-To: <20190519212235.GF5213@pendragon.ideasonboard.com>

On Mon, May 20, 2019 at 12:22:35AM +0300, Laurent Pinchart wrote:
> Hi Sam,
> 
> Thank you for the patch.
> 
> On Sun, May 19, 2019 at 08:36:36PM +0200, Sam Ravnborg wrote:
> > Drop use of the deprecated drmP.h header file.
> > 
> > While touching the list of include files:
> > - Divide include files in blocks of linux/* drm/* etc.
> > - Sort individual blocks of include files
> > - Remove duplicated header file
> > 
> > v2:
> > - Be consistent in the order of the include blocks (Laurent)
> > 
> > Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> > Cc: Andrzej Hajda <a.hajda@samsung.com>
> > Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> > Cc: David Airlie <airlied@linux.ie>
> > Cc: Daniel Vetter <daniel@ffwll.ch>
> > Cc: Peter Senna Tschudin <peter.senna@gmail.com>
> > Cc: Martin Donnelly <martin.donnelly@ge.com>
> > Cc: Martyn Welch <martyn.welch@collabora.co.uk>
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
> By the way, on a side note, I came across a neat trick recently to help
> making headers self-contained. By including the header related to a C
> file as the very first header, the compiler will throw an error if the
> header is not self-contained. It would be a bit of an intrusive change
> in DRM, but maybe something to keep in mind.

In some projects I have worked with the rule was to include the most
specific headers first - so we would caugth early if a header file missed
something.

But as long as having all header files self-contained are not a hard
rule we should not try to do something like this.

I once went through all the drm header files to make them minimal and
self-contained.
But this triggered a massive update of all drm drivers / core files
so I skipped that again. The pain/gain ratio was far to high.
Just making them all self-contained is is smaller task that does
not break the build - but until now I have not seen any good reasons /
demands for this so I have left it.

	Sam
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

      reply	other threads:[~2019-05-20 18:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-19 18:36 [PATCH v2 0/2] drm/bridge: drop drmP.h usage Sam Ravnborg
2019-05-19 18:36 ` [PATCH v2 1/2] drm/bridge: make dw_mipi_dsi.h self-contained Sam Ravnborg
2019-05-19 21:15   ` Laurent Pinchart
2019-05-19 18:36 ` [PATCH v2 2/2] drm/bridge: drop drmP.h usage Sam Ravnborg
2019-05-19 21:22   ` Laurent Pinchart
2019-05-20 18:06     ` Sam Ravnborg [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190520180640.GA32368@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=martin.donnelly@ge.com \
    --cc=martyn.welch@collabora.co.uk \
    --cc=peter.senna@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox