Skip to contentSkip to conversation

drm/i915: Drop extern qualifiers from header function prototypes

RFC PATCH Superseded Janusz Krzysztofik 3 participants 4 messages Jul 10, 2019 – Jul 11, 2019

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 drm/i915: Drop extern qualifiers from header function prototypes

Follow dim checkpatch recommendation so it doesn't complain on that now and again on header file modifications.

---
 drivers/gpu/drm/i915/gem/i915_gem_object.h |  2 +-
 drivers/gpu/drm/i915/gvt/gtt.h             | 13 +++---
 drivers/gpu/drm/i915/i915_drv.h            | 48 +++++++++++-----------
 drivers/gpu/drm/i915/i915_irq.h            |  4 +-
 drivers/gpu/drm/i915/oa/i915_oa_bdw.h      |  2 +-
 drivers/gpu/drm/i915/oa/i915_oa_bxt.h      |  2 +-
 drivers/gpu/drm/i915/oa/i915_oa_cflgt2.h   |  2 +-
 drivers/gpu/drm/i915/oa/i915_oa_cflgt3.h   |  2 +-
 drivers/gpu/drm/i915/oa/i915_oa_chv.h      |  2 +-
 drivers/gpu/drm/i915/oa/i915_oa_cnl.h      |  2 +-
 drivers/gpu/drm/i915/oa/i915_oa_glk.h      |  2 +-
 drivers/gpu/drm/i915/oa/i915_oa_hsw.h      |  2 +-
 drivers/gpu/drm/i915/oa/i915_oa_icl.h      |  2 +-
 drivers/gpu/drm/i915/oa/i915_oa_kblgt2.h   |  2 +-
 drivers/gpu/drm/i915/oa/i915_oa_kblgt3.h   |  2 +-
 drivers/gpu/drm/i915/oa/i915_oa_sklgt2.h   |  2 +-
 drivers/gpu/drm/i915/oa/i915_oa_sklgt3.h   |  2 +-
 drivers/gpu/drm/i915/oa/i915_oa_sklgt4.h   |  2 +-
 include/drm/i915_drm.h                     | 10 ++---
 19 files changed, 52 insertions(+), 53 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_object.h +1 -1
index 20754c15412a..67aea07ea019 100644
@@ -81,7 +81,7 @@ i915_gem_object_lookup(struct drm_file *file, u32 handle)
 }
 
 __deprecated
-extern struct drm_gem_object *
+struct drm_gem_object *
 drm_gem_object_lookup(struct drm_file *file, u32 handle);
 
 __attribute__((nonnull))
drivers/gpu/drm/i915/gvt/gtt.h +7 -6
index 42d0394f0de2..88789316807d 100644
@@ -205,17 +205,18 @@ struct intel_vgpu_gtt {
 	struct intel_vgpu_scratch_pt scratch_pt[GTT_TYPE_MAX];
 };
 
-extern int intel_vgpu_init_gtt(struct intel_vgpu *vgpu);
-extern void intel_vgpu_clean_gtt(struct intel_vgpu *vgpu);
+int intel_vgpu_init_gtt(struct intel_vgpu *vgpu);
+void intel_vgpu_clean_gtt(struct intel_vgpu *vgpu);
 void intel_vgpu_reset_ggtt(struct intel_vgpu *vgpu, bool invalidate_old);
 void intel_vgpu_invalidate_ppgtt(struct intel_vgpu *vgpu);
 
-extern int intel_gvt_init_gtt(struct intel_gvt *gvt);
+int intel_gvt_init_gtt(struct intel_gvt *gvt);
 void intel_vgpu_reset_gtt(struct intel_vgpu *vgpu);
-extern void intel_gvt_clean_gtt(struct intel_gvt *gvt);
+void intel_gvt_clean_gtt(struct intel_gvt *gvt);
 
-extern struct intel_vgpu_mm *intel_gvt_find_ppgtt_mm(struct intel_vgpu *vgpu,
-		int page_table_level, void *root_entry);
+struct intel_vgpu_mm *intel_gvt_find_ppgtt_mm(struct intel_vgpu *vgpu,
+					      int page_table_level,
+					      void *root_entry);
 
 struct intel_vgpu_oos_page {
 	struct intel_vgpu_ppgtt_spt *spt;
drivers/gpu/drm/i915/i915_drv.h +23 -25

79 lines not on this page · raw message

drivers/gpu/drm/i915/i915_irq.h +2 -2
index d93fa4e75442..4f803f910177 100644
@@ -13,8 +13,8 @@
 struct drm_i915_private;
 struct intel_crtc;
 
-extern void intel_irq_init(struct drm_i915_private *dev_priv);
-extern void intel_irq_fini(struct drm_i915_private *dev_priv);
+void intel_irq_init(struct drm_i915_private *dev_priv);
+void intel_irq_fini(struct drm_i915_private *dev_priv);
 int intel_irq_install(struct drm_i915_private *dev_priv);
 void intel_irq_uninstall(struct drm_i915_private *dev_priv);
 
drivers/gpu/drm/i915/oa/i915_oa_bdw.h +1 -1
index 0e667f1a8aa1..b5ed68882588 100644
@@ -10,6 +10,6 @@
 #ifndef __I915_OA_BDW_H__
 #define __I915_OA_BDW_H__
 
-extern void i915_perf_load_test_config_bdw(struct drm_i915_private *dev_priv);
+void i915_perf_load_test_config_bdw(struct drm_i915_private *dev_priv);
 
 #endif
drivers/gpu/drm/i915/oa/i915_oa_bxt.h +1 -1
index 679e92cf4f1d..43c3e4ab030a 100644
@@ -10,6 +10,6 @@
 #ifndef __I915_OA_BXT_H__
 #define __I915_OA_BXT_H__
 
-extern void i915_perf_load_test_config_bxt(struct drm_i915_private *dev_priv);
+void i915_perf_load_test_config_bxt(struct drm_i915_private *dev_priv);
 
 #endif
drivers/gpu/drm/i915/oa/i915_oa_cflgt2.h +1 -1
index 4d6025559bbe..1b4b563bc585 100644
@@ -10,6 +10,6 @@
 #ifndef __I915_OA_CFLGT2_H__
 #define __I915_OA_CFLGT2_H__
 
-extern void i915_perf_load_test_config_cflgt2(struct drm_i915_private *dev_priv);
+void i915_perf_load_test_config_cflgt2(struct drm_i915_private *dev_priv);
 
 #endif
drivers/gpu/drm/i915/oa/i915_oa_cflgt3.h +1 -1
index 0697f4077402..500565e055cd 100644
@@ -10,6 +10,6 @@
 #ifndef __I915_OA_CFLGT3_H__
 #define __I915_OA_CFLGT3_H__
 
-extern void i915_perf_load_test_config_cflgt3(struct drm_i915_private *dev_priv);
+void i915_perf_load_test_config_cflgt3(struct drm_i915_private *dev_priv);
 
 #endif
drivers/gpu/drm/i915/oa/i915_oa_chv.h +1 -1
index 0986eae3135f..ad85d6a6a573 100644
@@ -10,6 +10,6 @@
 #ifndef __I915_OA_CHV_H__
 #define __I915_OA_CHV_H__
 
-extern void i915_perf_load_test_config_chv(struct drm_i915_private *dev_priv);
+void i915_perf_load_test_config_chv(struct drm_i915_private *dev_priv);
 
 #endif
drivers/gpu/drm/i915/oa/i915_oa_cnl.h +1 -1
index e830a406aff2..9faaca38b587 100644
@@ -10,6 +10,6 @@
 #ifndef __I915_OA_CNL_H__
 #define __I915_OA_CNL_H__
 
-extern void i915_perf_load_test_config_cnl(struct drm_i915_private *dev_priv);
+void i915_perf_load_test_config_cnl(struct drm_i915_private *dev_priv);
 
 #endif
drivers/gpu/drm/i915/oa/i915_oa_glk.h +1 -1
index 06dedf991edb..cc13a1e9fd3e 100644
@@ -10,6 +10,6 @@
 #ifndef __I915_OA_GLK_H__
 #define __I915_OA_GLK_H__
 
-extern void i915_perf_load_test_config_glk(struct drm_i915_private *dev_priv);
+void i915_perf_load_test_config_glk(struct drm_i915_private *dev_priv);
 
 #endif
drivers/gpu/drm/i915/oa/i915_oa_hsw.h +1 -1
index 3d0c870cd0bd..f0ddcc79c761 100644
@@ -10,6 +10,6 @@
 #ifndef __I915_OA_HSW_H__
 #define __I915_OA_HSW_H__
 
-extern void i915_perf_load_test_config_hsw(struct drm_i915_private *dev_priv);
+void i915_perf_load_test_config_hsw(struct drm_i915_private *dev_priv);
 
 #endif
drivers/gpu/drm/i915/oa/i915_oa_icl.h +1 -1
index 24eaa97d61ba..e501651d385b 100644
@@ -10,6 +10,6 @@
 #ifndef __I915_OA_ICL_H__
 #define __I915_OA_ICL_H__
 
-extern void i915_perf_load_test_config_icl(struct drm_i915_private *dev_priv);
+void i915_perf_load_test_config_icl(struct drm_i915_private *dev_priv);
 
 #endif
drivers/gpu/drm/i915/oa/i915_oa_kblgt2.h +1 -1
index a55398a904de..dc460e6e0fae 100644
@@ -10,6 +10,6 @@
 #ifndef __I915_OA_KBLGT2_H__
 #define __I915_OA_KBLGT2_H__
 
-extern void i915_perf_load_test_config_kblgt2(struct drm_i915_private *dev_priv);
+void i915_perf_load_test_config_kblgt2(struct drm_i915_private *dev_priv);
 
 #endif
drivers/gpu/drm/i915/oa/i915_oa_kblgt3.h +1 -1
index 3ddd3483b7cc..5926992b735a 100644
@@ -10,6 +10,6 @@
 #ifndef __I915_OA_KBLGT3_H__
 #define __I915_OA_KBLGT3_H__
 
-extern void i915_perf_load_test_config_kblgt3(struct drm_i915_private *dev_priv);
+void i915_perf_load_test_config_kblgt3(struct drm_i915_private *dev_priv);
 
 #endif
drivers/gpu/drm/i915/oa/i915_oa_sklgt2.h +1 -1
index be6256037239..353db35b36c1 100644
@@ -10,6 +10,6 @@
 #ifndef __I915_OA_SKLGT2_H__
 #define __I915_OA_SKLGT2_H__
 
-extern void i915_perf_load_test_config_sklgt2(struct drm_i915_private *dev_priv);
+void i915_perf_load_test_config_sklgt2(struct drm_i915_private *dev_priv);
 
 #endif
drivers/gpu/drm/i915/oa/i915_oa_sklgt3.h +1 -1
index 650beb068e56..52f94c674b62 100644
@@ -10,6 +10,6 @@
 #ifndef __I915_OA_SKLGT3_H__
 #define __I915_OA_SKLGT3_H__
 
-extern void i915_perf_load_test_config_sklgt3(struct drm_i915_private *dev_priv);
+void i915_perf_load_test_config_sklgt3(struct drm_i915_private *dev_priv);
 
 #endif
drivers/gpu/drm/i915/oa/i915_oa_sklgt4.h +1 -1
index 8dcf849d131e..8e364820cc63 100644
@@ -10,6 +10,6 @@
 #ifndef __I915_OA_SKLGT4_H__
 #define __I915_OA_SKLGT4_H__
 
-extern void i915_perf_load_test_config_sklgt4(struct drm_i915_private *dev_priv);
+void i915_perf_load_test_config_sklgt4(struct drm_i915_private *dev_priv);
 
 #endif
include/drm/i915_drm.h +5 -5
index 7523e9a7b6e2..26f392fa85a3 100644
@@ -30,11 +30,11 @@
 #include <uapi/drm/i915_drm.h>
 
 /* For use by IPS driver */
-extern unsigned long i915_read_mch_val(void);
-extern bool i915_gpu_raise(void);
-extern bool i915_gpu_lower(void);
-extern bool i915_gpu_busy(void);
-extern bool i915_gpu_turbo_disable(void);
+unsigned long i915_read_mch_val(void);
+bool i915_gpu_raise(void);
+bool i915_gpu_lower(void);
+bool i915_gpu_busy(void);
+bool i915_gpu_turbo_disable(void);
 
 /* Exported from arch/x86/kernel/early-quirks.c */
 extern struct resource intel_graphics_stolen_res;
Signature · 6 lines
2.21.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

Quoting Janusz Krzysztofik (2019-07-10 15:52:39)

Quoted 9 lines

Follow dim checkpatch recommendation so it doesn't complain on that now and again on header file modifications.

drivers/gpu/drm/i915/i915_drv.h +0 -0
@@ -2388,19 +2388,18 @@ __i915_printk(struct drm_i915_private *dev_priv, const char *level,
        __i915_printk(dev_priv, KERN_ERR, fmt, ##__VA_ARGS__)

drivers/gpu/drm/i915/i915_drv.h __i915_printk(struct drm_i915_private *dev_priv, const char *level, · line 2396

Quoted 10 lines
drivers/gpu/drm/i915/i915_drv.h +2 -2
 
 #ifdef CONFIG_COMPAT
-extern long i915_compat_ioctl(struct file *filp, unsigned int cmd,
-                             unsigned long arg);
+long i915_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
 #else
 #define i915_compat_ioctl NULL
 #endif
 extern const struct dev_pm_ops i915_pm_ops;
+extern const struct dev_pm_ops i915_pm_ops_1;

That's novel.
-Chris

#2 lore raw

Hi Chris,

Quoted 9 lines · CEST Chris Wilson

Quoting Janusz Krzysztofik (2019-07-10 15:52:39)

drivers/gpu/drm/i915/i915_drv.h __i915_printk(struct drm_i915_private *dev_priv,

Quoted 8 lines

Follow dim checkpatch recommendation so it doesn't complain on that now and again on header file modifications.

drivers/gpu/drm/i915/i915_drv.h +0 -0
@@ -2388,19 +2388,18 @@ __i915_printk(struct drm_i915_private *dev_priv, 

const char *level,

Quoted 6 lines

drivers/gpu/drm/i915/i915_drv.h __i915_printk(struct drm_i915_private *dev_priv, const char *level,

Quoted 6 lines
drivers/gpu/drm/i915/i915_drv.h +1 -2
        __i915_printk(dev_priv, KERN_ERR, fmt, ##__VA_ARGS__)
 
 #ifdef CONFIG_COMPAT
-extern long i915_compat_ioctl(struct file *filp, unsigned int cmd,
-                             unsigned long arg);
+long i915_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long 

arg);

Quoted 7 lines

drivers/gpu/drm/i915/i915_drv.h __i915_printk(struct drm_i915_private *dev_priv, const char *level, · line 2396

Quoted 5 lines
drivers/gpu/drm/i915/i915_drv.h +1 -0
 #else
 #define i915_compat_ioctl NULL
 #endif
 extern const struct dev_pm_ops i915_pm_ops;
+extern const struct dev_pm_ops i915_pm_ops_1;

That's novel.

Oh, sorry, that was my testing of how dim checkpatch reacts on extern qualifiers on variables. Thanks for catching this.

Janusz

Quoted 2 lines
Quoted 1 line
drivers/gpu/drm/i915/i915_drv.h +0 -1
-Chris
#3 lore raw

✓ Fi.CI.BAT: success for drm/i915: Drop extern qualifiers from header function prototypes

In reply to Janusz Krzysztofik
== Series Details ==

== Series Details ==

Series: drm/i915: Drop extern qualifiers from header function prototypes
URL : https://patchwork.freedesktop.org/series/63508/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6449 -> Patchwork_13604
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13604/

Known issues
------------

Here are the changes found in Patchwork_13604 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_flink_basic@basic:
- fi-icl-u3: [PASS][1] -> [DMESG-WARN][2] ([fdo#107724])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6449/fi-icl-u3/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13604/fi-icl-u3/igt@[email protected]

* igt@i915_selftest@live_contexts:
- fi-skl-iommu: [PASS][3] -> [INCOMPLETE][4] ([fdo#111050])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6449/fi-skl-iommu/igt@i915_selftest@live_contexts.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13604/fi-skl-iommu/igt@i915_selftest@live_contexts.html

* igt@kms_frontbuffer_tracking@basic:
- fi-icl-u2: [PASS][5] -> [FAIL][6] ([fdo#103167])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6449/fi-icl-u2/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13604/fi-icl-u2/igt@[email protected]

#### Possible fixes ####

* igt@i915_selftest@live_sanitycheck:
- fi-icl-u3: [DMESG-WARN][7] ([fdo#107724]) -> [PASS][8] +1 similar issue
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6449/fi-icl-u3/igt@i915_selftest@live_sanitycheck.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13604/fi-icl-u3/igt@i915_selftest@live_sanitycheck.html

[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#111050]: https://bugs.freedesktop.org/show_bug.cgi?id=111050

Participating hosts (53 -> 46)
------------------------------

Missing (7): fi-kbl-soraka fi-byt-squawks fi-bsw-cyan fi-ilk-650 fi-icl-y fi-byt-clapper fi-bdw-samus

Build changes
-------------

* Linux: CI_DRM_6449 -> Patchwork_13604

CI_DRM_6449: 4551186d429beb8c04df695e4fae07b2a79f7d47 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5092: 2a66ae6626d5583240509f84117d1345a799b75a @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_13604: 7671f80ccda437788e42fd678a8da9e2ac3f8dcf @ git://anongit.freedesktop.org/gfx-ci/linux

== Kernel 32bit build ==

Warning: Kernel 32bit buildtest failed:
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13604/build_32bit.log

  CALL    scripts/checksyscalls.sh
  CALL    scripts/atomic/check-atomics.sh
  CHK     include/generated/compile.h

Kernel: arch/x86/boot/bzImage is ready (#1)
Building modules, stage 2.
MODPOST 112 modules
ERROR: "__udivdi3" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!
ERROR: "__divdi3" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! scripts/Makefile.modpost:91: recipe for target '__modpost' failed make[1]: *** [__modpost] Error 1
Makefile:1287: recipe for target 'modules' failed
make: *** [modules] Error 2

== Linux commits ==

7671f80ccda4 drm/i915: Drop extern qualifiers from header function prototypes

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13604/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx