Message ID | 20190526173535.32701-2-sam@ravnborg.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm: make headers self-contained and drop drmP.h | expand |
On Sun, 26 May 2019, Sam Ravnborg <sam@ravnborg.org> wrote: > Do not require users of include/drm/drm_auth.h to include > other files just to let it build. > > Signed-off-by: Sam Ravnborg <sam@ravnborg.org> > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> > Cc: Maxime Ripard <maxime.ripard@bootlin.com> > Cc: Sean Paul <sean@poorly.run> > Cc: David Airlie <airlied@linux.ie> > Cc: Daniel Vetter <daniel@ffwll.ch> > --- > include/drm/drm_auth.h | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/include/drm/drm_auth.h b/include/drm/drm_auth.h > index 871008118bab..6bf8b2b78991 100644 > --- a/include/drm/drm_auth.h > +++ b/include/drm/drm_auth.h > @@ -1,3 +1,6 @@ > +#ifndef _DRM_AUTH_H_ > +#define _DRM_AUTH_H_ > + It's a bit of a bikeshed and this got applied already, but I think the copyright/license comment should be the first thing in any file, and the ifdefs should come after that. Using SPDX headers mandate this anyway. BR, Jani. > /* > * Internal Header for the Direct Rendering Manager > * > @@ -25,8 +28,12 @@ > * OTHER DEALINGS IN THE SOFTWARE. > */ > > -#ifndef _DRM_AUTH_H_ > -#define _DRM_AUTH_H_ > +#include <linux/idr.h> > +#include <linux/kref.h> > +#include <linux/wait.h> > + > +struct drm_file; > +struct drm_hw_lock; > > /* > * Legacy DRI1 locking data structure. Only here instead of in drm_legacy.h for
Hi Jani. On Tue, May 28, 2019 at 03:54:48PM +0300, Jani Nikula wrote: > On Sun, 26 May 2019, Sam Ravnborg <sam@ravnborg.org> wrote: > > Do not require users of include/drm/drm_auth.h to include > > other files just to let it build. > > > > Signed-off-by: Sam Ravnborg <sam@ravnborg.org> > > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> > > Cc: Maxime Ripard <maxime.ripard@bootlin.com> > > Cc: Sean Paul <sean@poorly.run> > > Cc: David Airlie <airlied@linux.ie> > > Cc: Daniel Vetter <daniel@ffwll.ch> > > --- > > include/drm/drm_auth.h | 11 +++++++++-- > > 1 file changed, 9 insertions(+), 2 deletions(-) > > > > diff --git a/include/drm/drm_auth.h b/include/drm/drm_auth.h > > index 871008118bab..6bf8b2b78991 100644 > > --- a/include/drm/drm_auth.h > > +++ b/include/drm/drm_auth.h > > @@ -1,3 +1,6 @@ > > +#ifndef _DRM_AUTH_H_ > > +#define _DRM_AUTH_H_ > > + > > It's a bit of a bikeshed and this got applied already, but I think the > copyright/license comment should be the first thing in any file, and the > ifdefs should come after that. Using SPDX headers mandate this anyway. I was inspired by other files when I did this change. But you are right, this was a bad change. For future changes I will keep this in mind. Sam
diff --git a/include/drm/drm_auth.h b/include/drm/drm_auth.h index 871008118bab..6bf8b2b78991 100644 --- a/include/drm/drm_auth.h +++ b/include/drm/drm_auth.h @@ -1,3 +1,6 @@ +#ifndef _DRM_AUTH_H_ +#define _DRM_AUTH_H_ + /* * Internal Header for the Direct Rendering Manager * @@ -25,8 +28,12 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef _DRM_AUTH_H_ -#define _DRM_AUTH_H_ +#include <linux/idr.h> +#include <linux/kref.h> +#include <linux/wait.h> + +struct drm_file; +struct drm_hw_lock; /* * Legacy DRI1 locking data structure. Only here instead of in drm_legacy.h for
Do not require users of include/drm/drm_auth.h to include other files just to let it build. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Maxime Ripard <maxime.ripard@bootlin.com> Cc: Sean Paul <sean@poorly.run> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> --- include/drm/drm_auth.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)