From patchwork Wed Mar 22 08:36:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 9638253 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D0EF6602CB for ; Wed, 22 Mar 2017 08:37:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C3C4D2029B for ; Wed, 22 Mar 2017 08:37:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B6E3824603; Wed, 22 Mar 2017 08:37:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 15F1D2029B for ; Wed, 22 Mar 2017 08:37:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 873086E807; Wed, 22 Mar 2017 08:36:36 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr0-x243.google.com (mail-wr0-x243.google.com [IPv6:2a00:1450:400c:c0c::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4D0586E7FF for ; Wed, 22 Mar 2017 08:36:26 +0000 (UTC) Received: by mail-wr0-x243.google.com with SMTP id u108so25696347wrb.2 for ; Wed, 22 Mar 2017 01:36:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=B9MduY8FFyCvWYUKf38cOQxCmg5oLbbG+PvDs0xu7lI=; b=OF6EIDRag6L4yKsn/VxFTiKnTUjma5x3T9PX2uIRseuxN8mOIowNxR8IwWDnajbo00 iHGVc+wgzUDFU/Eg0h7m5ob7VMYhuQ2TDPsMCipURng7e1MKBAxYp3icpIlNZzzuaS3+ fWTbQvoI1v/RTw6pdHQ3T8IN8EazeqFlpsNHo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=B9MduY8FFyCvWYUKf38cOQxCmg5oLbbG+PvDs0xu7lI=; b=SFclSl9VjNFSIlCgtk2awn9CN6QrXnQEQAB3N3EBeMV8bCxJrv30qW2B0zR+jkiTFv M153IIQgSz7Dmjq7AcwDRyCRbffh3fq9nm1TsvKMUyD2K260oYpWQOLZAbfCqRZ1vNgB +t/htgW62S5+itOoKZGRjM3hhq1gkMmbmYtT1O/9z5Z1/1F7BL113IKxjBKOhGP8iiSF 7gfSLGybAPUw999mUW45PbyR2NiejoV78UyBGhEtQWI+NP/z0vE7IwwfSAmbbjH5gIhO JpSOobMJ0/3X5vmRX29qjJMrr0+IUSdGq0XxSpioZCKxo7CVumS1blpOvJvRAKuD7mnb Zalw== X-Gm-Message-State: AFeK/H1z3RfJjadtY6SDUxppeq3MrkdamtXkPJIPsBphmdNtmjWDAqVz+q60pMlPWD8XfQ== X-Received: by 10.223.160.101 with SMTP id l34mr32464899wrl.73.1490171784778; Wed, 22 Mar 2017 01:36:24 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:56c9:0:decc:6e78:7e96:b452]) by smtp.gmail.com with ESMTPSA id g45sm927438wrd.11.2017.03.22.01.36.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Mar 2017 01:36:24 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development Subject: [PATCH 01/16] drm: drop extern from function decls Date: Wed, 22 Mar 2017 09:36:02 +0100 Message-Id: <20170322083617.13361-2-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170322083617.13361-1-daniel.vetter@ffwll.ch> References: <20170322083617.13361-1-daniel.vetter@ffwll.ch> Cc: Daniel Vetter , DRI Development X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP It's the default storage class for functions, entirely redundant. And a lot of these headers are a bit inconsistent due to organically grown. Signed-off-by: Daniel Vetter Reviewed-by: Gabriel Krisman Bertazi --- include/drm/drm_crtc_helper.h | 38 +++++++++++++++++++------------------- include/drm/drm_drv.h | 4 ++-- include/drm/drm_global.h | 8 ++++---- include/drm/drm_hashtab.h | 20 ++++++++++---------- include/drm/drm_of.h | 24 ++++++++++++------------ include/drm/drm_pci.h | 22 +++++++++++----------- include/drm/drm_plane.h | 20 ++++++++++---------- include/drm/drm_prime.h | 30 +++++++++++++++--------------- include/drm/drm_sysfs.h | 4 ++-- 9 files changed, 85 insertions(+), 85 deletions(-) diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h index d026f5017c33..7506a60df8b1 100644 --- a/include/drm/drm_crtc_helper.h +++ b/include/drm/drm_crtc_helper.h @@ -43,18 +43,18 @@ #include #include -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 diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h index fde343e0d581..d0b5f363bfa1 100644 --- a/include/drm/drm_drv.h +++ b/include/drm/drm_drv.h @@ -503,11 +503,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; diff --git a/include/drm/drm_global.h b/include/drm/drm_global.h index a06805eaf649..3a830602a2e4 100644 --- a/include/drm/drm_global.h +++ b/include/drm/drm_global.h @@ -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 diff --git a/include/drm/drm_hashtab.h b/include/drm/drm_hashtab.h index fce2ef3fdfff..bb95ff011baf 100644 --- a/include/drm/drm_hashtab.h +++ b/include/drm/drm_hashtab.h @@ -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 diff --git a/include/drm/drm_of.h b/include/drm/drm_of.h index 26a64805cc15..d1fc563f068a 100644 --- a/include/drm/drm_of.h +++ b/include/drm/drm_of.h @@ -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) diff --git a/include/drm/drm_pci.h b/include/drm/drm_pci.h index f5ebfcaf69e0..4579fac1080c 100644 --- a/include/drm/drm_pci.h +++ b/include/drm/drm_pci.h @@ -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_ */ diff --git a/include/drm/drm_plane.h b/include/drm/drm_plane.h index 20867b4371ab..31da9f0c4ad2 100644 --- a/include/drm/drm_plane.h +++ b/include/drm/drm_plane.h @@ -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, diff --git a/include/drm/drm_prime.h b/include/drm/drm_prime.h index d09563ecc4b7..0b2a235c4be0 100644 --- a/include/drm/drm_prime.h +++ b/include/drm/drm_prime.h @@ -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__ */ diff --git a/include/drm/drm_sysfs.h b/include/drm/drm_sysfs.h index 1d8e033fde67..23418c1f10d1 100644 --- a/include/drm/drm_sysfs.h +++ b/include/drm/drm_sysfs.h @@ -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