Message ID | 20190613084416.6794-1-jani.nikula@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v2,1/3] drm/i915: make intel_sdvo_regs.h self-contained | expand |
Quoting Jani Nikula (2019-06-13 09:44:14) > Ensure intel_sdvo_regs.h is self-contained and remains that way. > > Signed-off-by: Jani Nikula <jani.nikula@intel.com> > --- > drivers/gpu/drm/i915/Makefile.header-test | 1 + > drivers/gpu/drm/i915/intel_sdvo_regs.h | 7 +++++++ > 2 files changed, 8 insertions(+) > > diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test > index 6ef3b647ac65..c04297ce57b4 100644 > --- a/drivers/gpu/drm/i915/Makefile.header-test > +++ b/drivers/gpu/drm/i915/Makefile.header-test > @@ -56,6 +56,7 @@ header_test := \ > intel_quirks.h \ > intel_runtime_pm.h \ > intel_sdvo.h \ > + intel_sdvo_regs.h \ > intel_sideband.h \ > intel_sprite.h \ > intel_tv.h \ > diff --git a/drivers/gpu/drm/i915/intel_sdvo_regs.h b/drivers/gpu/drm/i915/intel_sdvo_regs.h > index e9ba3b047f93..af02c0d21d6b 100644 > --- a/drivers/gpu/drm/i915/intel_sdvo_regs.h > +++ b/drivers/gpu/drm/i915/intel_sdvo_regs.h > @@ -24,6 +24,11 @@ > * Eric Anholt <eric@anholt.net> > */ > > +#ifndef __INTEL_SDVO_REGS_H__ > +#define __INTEL_SDVO_REGS_H__ > + #include <linux/compiler.h> or compiler_attributes.h for __packed Looks like random inclusion otherwise. > +#include <linux/types.h>
On Thu, 13 Jun 2019, Chris Wilson <chris@chris-wilson.co.uk> wrote: > Quoting Jani Nikula (2019-06-13 09:44:14) >> Ensure intel_sdvo_regs.h is self-contained and remains that way. >> >> Signed-off-by: Jani Nikula <jani.nikula@intel.com> >> --- >> drivers/gpu/drm/i915/Makefile.header-test | 1 + >> drivers/gpu/drm/i915/intel_sdvo_regs.h | 7 +++++++ >> 2 files changed, 8 insertions(+) >> >> diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test >> index 6ef3b647ac65..c04297ce57b4 100644 >> --- a/drivers/gpu/drm/i915/Makefile.header-test >> +++ b/drivers/gpu/drm/i915/Makefile.header-test >> @@ -56,6 +56,7 @@ header_test := \ >> intel_quirks.h \ >> intel_runtime_pm.h \ >> intel_sdvo.h \ >> + intel_sdvo_regs.h \ >> intel_sideband.h \ >> intel_sprite.h \ >> intel_tv.h \ >> diff --git a/drivers/gpu/drm/i915/intel_sdvo_regs.h b/drivers/gpu/drm/i915/intel_sdvo_regs.h >> index e9ba3b047f93..af02c0d21d6b 100644 >> --- a/drivers/gpu/drm/i915/intel_sdvo_regs.h >> +++ b/drivers/gpu/drm/i915/intel_sdvo_regs.h >> @@ -24,6 +24,11 @@ >> * Eric Anholt <eric@anholt.net> >> */ >> >> +#ifndef __INTEL_SDVO_REGS_H__ >> +#define __INTEL_SDVO_REGS_H__ >> + > > #include <linux/compiler.h> or compiler_attributes.h for __packed > > Looks like random inclusion otherwise. > >> +#include <linux/types.h> Huh, no errors about __packed that I could see, what am I missing? <linux/types.h> is for kernel unsigned types. BR, Jani.
Quoting Jani Nikula (2019-06-13 10:36:20) > On Thu, 13 Jun 2019, Chris Wilson <chris@chris-wilson.co.uk> wrote: > > Quoting Jani Nikula (2019-06-13 09:44:14) > >> Ensure intel_sdvo_regs.h is self-contained and remains that way. > >> > >> Signed-off-by: Jani Nikula <jani.nikula@intel.com> > >> --- > >> drivers/gpu/drm/i915/Makefile.header-test | 1 + > >> drivers/gpu/drm/i915/intel_sdvo_regs.h | 7 +++++++ > >> 2 files changed, 8 insertions(+) > >> > >> diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test > >> index 6ef3b647ac65..c04297ce57b4 100644 > >> --- a/drivers/gpu/drm/i915/Makefile.header-test > >> +++ b/drivers/gpu/drm/i915/Makefile.header-test > >> @@ -56,6 +56,7 @@ header_test := \ > >> intel_quirks.h \ > >> intel_runtime_pm.h \ > >> intel_sdvo.h \ > >> + intel_sdvo_regs.h \ > >> intel_sideband.h \ > >> intel_sprite.h \ > >> intel_tv.h \ > >> diff --git a/drivers/gpu/drm/i915/intel_sdvo_regs.h b/drivers/gpu/drm/i915/intel_sdvo_regs.h > >> index e9ba3b047f93..af02c0d21d6b 100644 > >> --- a/drivers/gpu/drm/i915/intel_sdvo_regs.h > >> +++ b/drivers/gpu/drm/i915/intel_sdvo_regs.h > >> @@ -24,6 +24,11 @@ > >> * Eric Anholt <eric@anholt.net> > >> */ > >> > >> +#ifndef __INTEL_SDVO_REGS_H__ > >> +#define __INTEL_SDVO_REGS_H__ > >> + > > > > #include <linux/compiler.h> or compiler_attributes.h for __packed > > > > Looks like random inclusion otherwise. > > > >> +#include <linux/types.h> > > Huh, no errors about __packed that I could see, what am I missing? > <linux/types.h> is for kernel unsigned types. Nothing, I think it gets accidentally included :) #include <linux/compiler.h> seems to the be common choice for __attributes. Or you could argue that __packed is naturally a type attribute and so should be pulled in via types.h :) -Chris
diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test index 6ef3b647ac65..c04297ce57b4 100644 --- a/drivers/gpu/drm/i915/Makefile.header-test +++ b/drivers/gpu/drm/i915/Makefile.header-test @@ -56,6 +56,7 @@ header_test := \ intel_quirks.h \ intel_runtime_pm.h \ intel_sdvo.h \ + intel_sdvo_regs.h \ intel_sideband.h \ intel_sprite.h \ intel_tv.h \ diff --git a/drivers/gpu/drm/i915/intel_sdvo_regs.h b/drivers/gpu/drm/i915/intel_sdvo_regs.h index e9ba3b047f93..af02c0d21d6b 100644 --- a/drivers/gpu/drm/i915/intel_sdvo_regs.h +++ b/drivers/gpu/drm/i915/intel_sdvo_regs.h @@ -24,6 +24,11 @@ * Eric Anholt <eric@anholt.net> */ +#ifndef __INTEL_SDVO_REGS_H__ +#define __INTEL_SDVO_REGS_H__ + +#include <linux/types.h> + /* * SDVO command definitions and structures. */ @@ -731,3 +736,5 @@ struct intel_sdvo_encode { u8 dvi_rev; u8 hdmi_rev; } __packed; + +#endif /* __INTEL_SDVO_REGS_H__ */
Ensure intel_sdvo_regs.h is self-contained and remains that way. Signed-off-by: Jani Nikula <jani.nikula@intel.com> --- drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/intel_sdvo_regs.h | 7 +++++++ 2 files changed, 8 insertions(+)