drm: drop extern from function decls
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 22 Mar 2017 08:36:02 +0000 (09:36 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 24 Mar 2017 08:36:06 +0000 (09:36 +0100)
It's the default storage class for functions, entirely redundant. And
a lot of these headers are a bit inconsistent due to organically
grown.

Reviewed-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20170322083617.13361-2-daniel.vetter@ffwll.ch
include/drm/drm_crtc_helper.h
include/drm/drm_drv.h
include/drm/drm_global.h
include/drm/drm_hashtab.h
include/drm/drm_of.h
include/drm/drm_pci.h
include/drm/drm_plane.h
include/drm/drm_prime.h
include/drm/drm_sysfs.h

index d026f5017c33cea2c9766b28b5ccb67d635fbe85..7506a60df8b12155471341e9b4840aa69454cf3c 100644 (file)
 #include <drm/drm_modeset_helper_vtables.h>
 #include <drm/drm_modeset_helper.h>
 
-extern void drm_helper_disable_unused_functions(struct drm_device *dev);
-extern int drm_crtc_helper_set_config(struct drm_mode_set *set);
-extern bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
-                                    struct drm_display_mode *mode,
-                                    int x, int y,
-                                    struct drm_framebuffer *old_fb);
-extern bool drm_helper_crtc_in_use(struct drm_crtc *crtc);
-extern bool drm_helper_encoder_in_use(struct drm_encoder *encoder);
+void drm_helper_disable_unused_functions(struct drm_device *dev);
+int drm_crtc_helper_set_config(struct drm_mode_set *set);
+bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
+                             struct drm_display_mode *mode,
+                             int x, int y,
+                             struct drm_framebuffer *old_fb);
+bool drm_helper_crtc_in_use(struct drm_crtc *crtc);
+bool drm_helper_encoder_in_use(struct drm_encoder *encoder);
 
-extern int drm_helper_connector_dpms(struct drm_connector *connector, int mode);
+int drm_helper_connector_dpms(struct drm_connector *connector, int mode);
 
-extern void drm_helper_resume_force_mode(struct drm_device *dev);
+void drm_helper_resume_force_mode(struct drm_device *dev);
 
 int drm_helper_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode,
                             struct drm_display_mode *adjusted_mode, int x, int y,
@@ -63,15 +63,15 @@ int drm_helper_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
                                  struct drm_framebuffer *old_fb);
 
 /* drm_probe_helper.c */
-extern int drm_helper_probe_single_connector_modes(struct drm_connector
-                                                  *connector, uint32_t maxX,
-                                                  uint32_t maxY);
-extern void drm_kms_helper_poll_init(struct drm_device *dev);
-extern void drm_kms_helper_poll_fini(struct drm_device *dev);
-extern bool drm_helper_hpd_irq_event(struct drm_device *dev);
-extern void drm_kms_helper_hotplug_event(struct drm_device *dev);
+int drm_helper_probe_single_connector_modes(struct drm_connector
+                                           *connector, uint32_t maxX,
+                                           uint32_t maxY);
+void drm_kms_helper_poll_init(struct drm_device *dev);
+void drm_kms_helper_poll_fini(struct drm_device *dev);
+bool drm_helper_hpd_irq_event(struct drm_device *dev);
+void drm_kms_helper_hotplug_event(struct drm_device *dev);
 
-extern void drm_kms_helper_poll_disable(struct drm_device *dev);
-extern void drm_kms_helper_poll_enable(struct drm_device *dev);
+void drm_kms_helper_poll_disable(struct drm_device *dev);
+void drm_kms_helper_poll_enable(struct drm_device *dev);
 
 #endif
index 8f900fb30275564ab1708bc5c1b4256d5a7c96ac..53b98321df9b2d6497b5d84afaef0d2b9d91c0e0 100644 (file)
@@ -522,11 +522,11 @@ struct drm_driver {
        int dev_priv_size;
 };
 
-extern __printf(6, 7)
+__printf(6, 7)
 void drm_dev_printk(const struct device *dev, const char *level,
                    unsigned int category, const char *function_name,
                    const char *prefix, const char *format, ...);
-extern __printf(3, 4)
+__printf(3, 4)
 void drm_printk(const char *level, unsigned int category,
                const char *format, ...);
 extern unsigned int drm_debug;
index a06805eaf649ae1ab97740ca735af00b574b93e0..3a830602a2e461e264e7cb39f6f68d66de84084f 100644 (file)
@@ -45,9 +45,9 @@ struct drm_global_reference {
        void (*release) (struct drm_global_reference *);
 };
 
-extern void drm_global_init(void);
-extern void drm_global_release(void);
-extern int drm_global_item_ref(struct drm_global_reference *ref);
-extern void drm_global_item_unref(struct drm_global_reference *ref);
+void drm_global_init(void);
+void drm_global_release(void);
+int drm_global_item_ref(struct drm_global_reference *ref);
+void drm_global_item_unref(struct drm_global_reference *ref);
 
 #endif
index fce2ef3fdfffecabdd23ece757ce539ef7619bfe..bb95ff011bafa290043852554507c4d2848f4ec2 100644 (file)
@@ -49,17 +49,17 @@ struct drm_open_hash {
        u8 order;
 };
 
-extern int drm_ht_create(struct drm_open_hash *ht, unsigned int order);
-extern int drm_ht_insert_item(struct drm_open_hash *ht, struct drm_hash_item *item);
-extern int drm_ht_just_insert_please(struct drm_open_hash *ht, struct drm_hash_item *item,
-                                    unsigned long seed, int bits, int shift,
-                                    unsigned long add);
-extern int drm_ht_find_item(struct drm_open_hash *ht, unsigned long key, struct drm_hash_item **item);
+int drm_ht_create(struct drm_open_hash *ht, unsigned int order);
+int drm_ht_insert_item(struct drm_open_hash *ht, struct drm_hash_item *item);
+int drm_ht_just_insert_please(struct drm_open_hash *ht, struct drm_hash_item *item,
+                             unsigned long seed, int bits, int shift,
+                             unsigned long add);
+int drm_ht_find_item(struct drm_open_hash *ht, unsigned long key, struct drm_hash_item **item);
 
-extern void drm_ht_verbose_list(struct drm_open_hash *ht, unsigned long key);
-extern int drm_ht_remove_key(struct drm_open_hash *ht, unsigned long key);
-extern int drm_ht_remove_item(struct drm_open_hash *ht, struct drm_hash_item *item);
-extern void drm_ht_remove(struct drm_open_hash *ht);
+void drm_ht_verbose_list(struct drm_open_hash *ht, unsigned long key);
+int drm_ht_remove_key(struct drm_open_hash *ht, unsigned long key);
+int drm_ht_remove_item(struct drm_open_hash *ht, struct drm_hash_item *item);
+void drm_ht_remove(struct drm_open_hash *ht);
 
 /*
  * RCU-safe interface
index 26a64805cc15eefb2958478bc2831fa43cbc8684..d1fc563f068a556a8ddce2443c10ba1f1d3d55c9 100644 (file)
@@ -11,18 +11,18 @@ struct drm_encoder;
 struct device_node;
 
 #ifdef CONFIG_OF
-extern uint32_t drm_of_find_possible_crtcs(struct drm_device *dev,
-                                          struct device_node *port);
-extern void drm_of_component_match_add(struct device *master,
-                                      struct component_match **matchptr,
-                                      int (*compare)(struct device *, void *),
-                                      struct device_node *node);
-extern int drm_of_component_probe(struct device *dev,
-                                 int (*compare_of)(struct device *, void *),
-                                 const struct component_master_ops *m_ops);
-extern int drm_of_encoder_active_endpoint(struct device_node *node,
-                                         struct drm_encoder *encoder,
-                                         struct of_endpoint *endpoint);
+uint32_t drm_of_find_possible_crtcs(struct drm_device *dev,
+                                   struct device_node *port);
+void drm_of_component_match_add(struct device *master,
+                               struct component_match **matchptr,
+                               int (*compare)(struct device *, void *),
+                               struct device_node *node);
+int drm_of_component_probe(struct device *dev,
+                          int (*compare_of)(struct device *, void *),
+                          const struct component_master_ops *m_ops);
+int drm_of_encoder_active_endpoint(struct device_node *node,
+                                  struct drm_encoder *encoder,
+                                  struct of_endpoint *endpoint);
 #else
 static inline uint32_t drm_of_find_possible_crtcs(struct drm_device *dev,
                                                  struct device_node *port)
index f5ebfcaf69e01ea752155598054bc82ccff7a902..4579fac1080c665b49b9fb3572768072f17228cd 100644 (file)
@@ -39,17 +39,17 @@ struct drm_device;
 struct drm_driver;
 struct drm_master;
 
-extern struct drm_dma_handle *drm_pci_alloc(struct drm_device *dev, size_t size,
-                                           size_t align);
-extern void drm_pci_free(struct drm_device *dev, struct drm_dma_handle * dmah);
+struct drm_dma_handle *drm_pci_alloc(struct drm_device *dev, size_t size,
+                                    size_t align);
+void drm_pci_free(struct drm_device *dev, struct drm_dma_handle * dmah);
 
-extern int drm_pci_init(struct drm_driver *driver, struct pci_driver *pdriver);
-extern void drm_pci_exit(struct drm_driver *driver, struct pci_driver *pdriver);
+int drm_pci_init(struct drm_driver *driver, struct pci_driver *pdriver);
+void drm_pci_exit(struct drm_driver *driver, struct pci_driver *pdriver);
 #ifdef CONFIG_PCI
-extern int drm_get_pci_dev(struct pci_dev *pdev,
-                          const struct pci_device_id *ent,
-                          struct drm_driver *driver);
-extern int drm_pci_set_busid(struct drm_device *dev, struct drm_master *master);
+int drm_get_pci_dev(struct pci_dev *pdev,
+                   const struct pci_device_id *ent,
+                   struct drm_driver *driver);
+int drm_pci_set_busid(struct drm_device *dev, struct drm_master *master);
 #else
 static inline int drm_get_pci_dev(struct pci_dev *pdev,
                                  const struct pci_device_id *ent,
@@ -69,7 +69,7 @@ static inline int drm_pci_set_busid(struct drm_device *dev,
 #define DRM_PCIE_SPEED_50 2
 #define DRM_PCIE_SPEED_80 4
 
-extern int drm_pcie_get_speed_cap_mask(struct drm_device *dev, u32 *speed_mask);
-extern int drm_pcie_get_max_link_width(struct drm_device *dev, u32 *mlw);
+int drm_pcie_get_speed_cap_mask(struct drm_device *dev, u32 *speed_mask);
+int drm_pcie_get_max_link_width(struct drm_device *dev, u32 *mlw);
 
 #endif /* _DRM_PCI_H_ */
index 20867b4371abded8276b99f1a9236ac571f4c2f7..31da9f0c4ad252bfcf89c8516aa8ffbc4d39a4e6 100644 (file)
@@ -510,7 +510,7 @@ struct drm_plane {
 
 #define obj_to_plane(x) container_of(x, struct drm_plane, base)
 
-extern __printf(8, 9)
+__printf(8, 9)
 int drm_universal_plane_init(struct drm_device *dev,
                             struct drm_plane *plane,
                             uint32_t possible_crtcs,
@@ -519,13 +519,13 @@ int drm_universal_plane_init(struct drm_device *dev,
                             unsigned int format_count,
                             enum drm_plane_type type,
                             const char *name, ...);
-extern int drm_plane_init(struct drm_device *dev,
-                         struct drm_plane *plane,
-                         uint32_t possible_crtcs,
-                         const struct drm_plane_funcs *funcs,
-                         const uint32_t *formats, unsigned int format_count,
-                         bool is_primary);
-extern void drm_plane_cleanup(struct drm_plane *plane);
+int drm_plane_init(struct drm_device *dev,
+                  struct drm_plane *plane,
+                  uint32_t possible_crtcs,
+                  const struct drm_plane_funcs *funcs,
+                  const uint32_t *formats, unsigned int format_count,
+                  bool is_primary);
+void drm_plane_cleanup(struct drm_plane *plane);
 
 /**
  * drm_plane_index - find the index of a registered plane
@@ -538,8 +538,8 @@ static inline unsigned int drm_plane_index(struct drm_plane *plane)
 {
        return plane->index;
 }
-extern struct drm_plane * drm_plane_from_index(struct drm_device *dev, int idx);
-extern void drm_plane_force_disable(struct drm_plane *plane);
+struct drm_plane * drm_plane_from_index(struct drm_device *dev, int idx);
+void drm_plane_force_disable(struct drm_plane *plane);
 
 int drm_mode_plane_set_obj_prop(struct drm_plane *plane,
                                       struct drm_property *property,
index d09563ecc4b769ad14018a5683dacfc25a92794f..0b2a235c4be052d539a8e90af56f79caf0b33124 100644 (file)
@@ -57,24 +57,24 @@ struct drm_device;
 struct drm_gem_object;
 struct drm_file;
 
-extern struct dma_buf *drm_gem_prime_export(struct drm_device *dev,
-                                           struct drm_gem_object *obj,
-                                           int flags);
-extern int drm_gem_prime_handle_to_fd(struct drm_device *dev,
-               struct drm_file *file_priv, uint32_t handle, uint32_t flags,
-               int *prime_fd);
-extern struct drm_gem_object *drm_gem_prime_import(struct drm_device *dev,
-               struct dma_buf *dma_buf);
-extern int drm_gem_prime_fd_to_handle(struct drm_device *dev,
-               struct drm_file *file_priv, int prime_fd, uint32_t *handle);
+struct dma_buf *drm_gem_prime_export(struct drm_device *dev,
+                                    struct drm_gem_object *obj,
+                                    int flags);
+int drm_gem_prime_handle_to_fd(struct drm_device *dev,
+                              struct drm_file *file_priv, uint32_t handle, uint32_t flags,
+                              int *prime_fd);
+struct drm_gem_object *drm_gem_prime_import(struct drm_device *dev,
+                                           struct dma_buf *dma_buf);
+int drm_gem_prime_fd_to_handle(struct drm_device *dev,
+                              struct drm_file *file_priv, int prime_fd, uint32_t *handle);
 struct dma_buf *drm_gem_dmabuf_export(struct drm_device *dev,
                                      struct dma_buf_export_info *exp_info);
-extern void drm_gem_dmabuf_release(struct dma_buf *dma_buf);
+void drm_gem_dmabuf_release(struct dma_buf *dma_buf);
 
-extern int drm_prime_sg_to_page_addr_arrays(struct sg_table *sgt, struct page **pages,
-                                           dma_addr_t *addrs, int max_pages);
-extern struct sg_table *drm_prime_pages_to_sg(struct page **pages, unsigned int nr_pages);
-extern void drm_prime_gem_destroy(struct drm_gem_object *obj, struct sg_table *sg);
+int drm_prime_sg_to_page_addr_arrays(struct sg_table *sgt, struct page **pages,
+                                    dma_addr_t *addrs, int max_pages);
+struct sg_table *drm_prime_pages_to_sg(struct page **pages, unsigned int nr_pages);
+void drm_prime_gem_destroy(struct drm_gem_object *obj, struct sg_table *sg);
 
 
 #endif /* __DRM_PRIME_H__ */
index 1d8e033fde6739baff8e227774dd7f290fe16fb2..23418c1f10d1d71f5ebafb66e283f983a3e7bf6f 100644 (file)
@@ -6,7 +6,7 @@
  * don't want to include the full drmP.h file.
  */
 
-extern int drm_class_device_register(struct device *dev);
-extern void drm_class_device_unregister(struct device *dev);
+int drm_class_device_register(struct device *dev);
+void drm_class_device_unregister(struct device *dev);
 
 #endif