[08/11] drm/i915: make intel_guc_reg.h self-contained

Submitted by Jani Nikula on June 17, 2019, 9:51 a.m.

Details

Message ID 20190617095108.22118-9-jani.nikula@intel.com
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in Intel GFX

Not browsing as part of any series.

Commit Message

Jani Nikula June 17, 2019, 9:51 a.m.
Add the minimal includes/declarations to make the header self-contained,
and ensure it stays that way.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/Makefile.header-test | 1 +
 drivers/gpu/drm/i915/intel_guc_reg.h      | 3 +++
 2 files changed, 4 insertions(+)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test
index b140afeb617e..085fba8e71f2 100644
--- a/drivers/gpu/drm/i915/Makefile.header-test
+++ b/drivers/gpu/drm/i915/Makefile.header-test
@@ -22,6 +22,7 @@  header_test := \
 	intel_drv.h \
 	intel_guc_ct.h \
 	intel_guc_fwif.h \
+	intel_guc_reg.h \
 	intel_pm.h \
 	intel_runtime_pm.h \
 	intel_sideband.h \
diff --git a/drivers/gpu/drm/i915/intel_guc_reg.h b/drivers/gpu/drm/i915/intel_guc_reg.h
index a214f8b71929..02f4b1d61a98 100644
--- a/drivers/gpu/drm/i915/intel_guc_reg.h
+++ b/drivers/gpu/drm/i915/intel_guc_reg.h
@@ -24,6 +24,9 @@ 
 #ifndef _INTEL_GUC_REG_H_
 #define _INTEL_GUC_REG_H_
 
+#include <linux/compiler.h>
+#include <linux/types.h>
+
 /* Definitions of GuC H/W registers, bits, etc */
 
 #define GUC_STATUS			_MMIO(0xc000)

Comments

On Mon, 17 Jun 2019 11:51:05 +0200, Jani Nikula <jani.nikula@intel.com>  
wrote:

> Add the minimal includes/declarations to make the header self-contained,
> and ensure it stays that way.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/Makefile.header-test | 1 +
>  drivers/gpu/drm/i915/intel_guc_reg.h      | 3 +++
>  2 files changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/Makefile.header-test  
> b/drivers/gpu/drm/i915/Makefile.header-test
> index b140afeb617e..085fba8e71f2 100644
> --- a/drivers/gpu/drm/i915/Makefile.header-test
> +++ b/drivers/gpu/drm/i915/Makefile.header-test
> @@ -22,6 +22,7 @@ header_test := \
>  	intel_drv.h \
>  	intel_guc_ct.h \
>  	intel_guc_fwif.h \
> +	intel_guc_reg.h \
>  	intel_pm.h \
>  	intel_runtime_pm.h \
>  	intel_sideband.h \
> diff --git a/drivers/gpu/drm/i915/intel_guc_reg.h  
> b/drivers/gpu/drm/i915/intel_guc_reg.h
> index a214f8b71929..02f4b1d61a98 100644
> --- a/drivers/gpu/drm/i915/intel_guc_reg.h
> +++ b/drivers/gpu/drm/i915/intel_guc_reg.h
> @@ -24,6 +24,9 @@
>  #ifndef _INTEL_GUC_REG_H_
>  #define _INTEL_GUC_REG_H_
> +#include <linux/compiler.h>
> +#include <linux/types.h>
> +
>  /* Definitions of GuC H/W registers, bits, etc */
> #define GUC_STATUS			_MMIO(0xc000)

shouldn't we also include i915_reg.h for _MMIO definition?
On Mon, 17 Jun 2019, Michal Wajdeczko <michal.wajdeczko@intel.com> wrote:
> On Mon, 17 Jun 2019 11:51:05 +0200, Jani Nikula <jani.nikula@intel.com>  
> wrote:
>
>> Add the minimal includes/declarations to make the header self-contained,
>> and ensure it stays that way.
>>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> ---
>>  drivers/gpu/drm/i915/Makefile.header-test | 1 +
>>  drivers/gpu/drm/i915/intel_guc_reg.h      | 3 +++
>>  2 files changed, 4 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/Makefile.header-test  
>> b/drivers/gpu/drm/i915/Makefile.header-test
>> index b140afeb617e..085fba8e71f2 100644
>> --- a/drivers/gpu/drm/i915/Makefile.header-test
>> +++ b/drivers/gpu/drm/i915/Makefile.header-test
>> @@ -22,6 +22,7 @@ header_test := \
>>  	intel_drv.h \
>>  	intel_guc_ct.h \
>>  	intel_guc_fwif.h \
>> +	intel_guc_reg.h \
>>  	intel_pm.h \
>>  	intel_runtime_pm.h \
>>  	intel_sideband.h \
>> diff --git a/drivers/gpu/drm/i915/intel_guc_reg.h  
>> b/drivers/gpu/drm/i915/intel_guc_reg.h
>> index a214f8b71929..02f4b1d61a98 100644
>> --- a/drivers/gpu/drm/i915/intel_guc_reg.h
>> +++ b/drivers/gpu/drm/i915/intel_guc_reg.h
>> @@ -24,6 +24,9 @@
>>  #ifndef _INTEL_GUC_REG_H_
>>  #define _INTEL_GUC_REG_H_
>> +#include <linux/compiler.h>
>> +#include <linux/types.h>
>> +
>>  /* Definitions of GuC H/W registers, bits, etc */
>> #define GUC_STATUS			_MMIO(0xc000)
>
> shouldn't we also include i915_reg.h for _MMIO definition?

Thanks, added that in v2. Though this compiles just fine standalone when
nobody uses the macros. ;)

BR,
Jani.