Skip to content

Commit e6e6b69

Browse files
james-c-linaroSuzuki K Poulose
authored andcommitted
coresight: Remove extern from function declarations
Function declarations are extern by default so remove the extra noise and inconsistency. Reviewed-by: Leo Yan <[email protected]> Reviewed-by: Yeoreum Yun <[email protected]> Signed-off-by: James Clark <[email protected]> Signed-off-by: Suzuki K Poulose <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 48a5126 commit e6e6b69

File tree

2 files changed

+23
-26
lines changed

2 files changed

+23
-26
lines changed

drivers/hwtracing/coresight/coresight-priv.h

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,8 @@ struct cs_off_attribute {
6060
u32 off;
6161
};
6262

63-
extern ssize_t coresight_simple_show32(struct device *_dev,
64-
struct device_attribute *attr, char *buf);
65-
extern ssize_t coresight_simple_show_pair(struct device *_dev,
66-
struct device_attribute *attr, char *buf);
63+
ssize_t coresight_simple_show32(struct device *_dev, struct device_attribute *attr, char *buf);
64+
ssize_t coresight_simple_show_pair(struct device *_dev, struct device_attribute *attr, char *buf);
6765

6866
#define coresight_simple_reg32(name, offset) \
6967
(&((struct cs_off_attribute[]) { \
@@ -160,8 +158,8 @@ void coresight_path_assign_trace_id(struct coresight_path *path,
160158
enum cs_mode mode);
161159

162160
#if IS_ENABLED(CONFIG_CORESIGHT_SOURCE_ETM3X)
163-
extern int etm_readl_cp14(u32 off, unsigned int *val);
164-
extern int etm_writel_cp14(u32 off, u32 val);
161+
int etm_readl_cp14(u32 off, unsigned int *val);
162+
int etm_writel_cp14(u32 off, u32 val);
165163
#else
166164
static inline int etm_readl_cp14(u32 off, unsigned int *val) { return 0; }
167165
static inline int etm_writel_cp14(u32 off, u32 val) { return 0; }
@@ -172,8 +170,8 @@ struct cti_assoc_op {
172170
void (*remove)(struct coresight_device *csdev);
173171
};
174172

175-
extern void coresight_set_cti_ops(const struct cti_assoc_op *cti_op);
176-
extern void coresight_remove_cti_ops(void);
173+
void coresight_set_cti_ops(const struct cti_assoc_op *cti_op);
174+
void coresight_remove_cti_ops(void);
177175

178176
/*
179177
* Macros and inline functions to handle CoreSight UCI data and driver

include/linux/coresight.h

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -671,28 +671,27 @@ static inline void coresight_set_mode(struct coresight_device *csdev,
671671
local_set(&csdev->mode, new_mode);
672672
}
673673

674-
extern struct coresight_device *
675-
coresight_register(struct coresight_desc *desc);
676-
extern void coresight_unregister(struct coresight_device *csdev);
677-
extern int coresight_enable_sysfs(struct coresight_device *csdev);
678-
extern void coresight_disable_sysfs(struct coresight_device *csdev);
679-
extern int coresight_timeout(struct csdev_access *csa, u32 offset,
680-
int position, int value);
674+
struct coresight_device *coresight_register(struct coresight_desc *desc);
675+
void coresight_unregister(struct coresight_device *csdev);
676+
int coresight_enable_sysfs(struct coresight_device *csdev);
677+
void coresight_disable_sysfs(struct coresight_device *csdev);
678+
int coresight_timeout(struct csdev_access *csa, u32 offset, int position, int value);
681679
typedef void (*coresight_timeout_cb_t) (struct csdev_access *, u32, int, int);
682-
extern int coresight_timeout_action(struct csdev_access *csa, u32 offset,
683-
int position, int value,
684-
coresight_timeout_cb_t cb);
680+
int coresight_timeout_action(struct csdev_access *csa, u32 offset, int position, int value,
681+
coresight_timeout_cb_t cb);
682+
int coresight_claim_device(struct coresight_device *csdev);
683+
int coresight_claim_device_unlocked(struct coresight_device *csdev);
685684

686-
extern int coresight_claim_device(struct coresight_device *csdev);
687-
extern int coresight_claim_device_unlocked(struct coresight_device *csdev);
685+
int coresight_claim_device(struct coresight_device *csdev);
686+
int coresight_claim_device_unlocked(struct coresight_device *csdev);
688687
void coresight_clear_self_claim_tag(struct csdev_access *csa);
689688
void coresight_clear_self_claim_tag_unlocked(struct csdev_access *csa);
690-
extern void coresight_disclaim_device(struct coresight_device *csdev);
691-
extern void coresight_disclaim_device_unlocked(struct coresight_device *csdev);
692-
extern char *coresight_alloc_device_name(struct coresight_dev_list *devs,
689+
void coresight_disclaim_device(struct coresight_device *csdev);
690+
void coresight_disclaim_device_unlocked(struct coresight_device *csdev);
691+
char *coresight_alloc_device_name(struct coresight_dev_list *devs,
693692
struct device *dev);
694693

695-
extern bool coresight_loses_context_with_cpu(struct device *dev);
694+
bool coresight_loses_context_with_cpu(struct device *dev);
696695

697696
u32 coresight_relaxed_read32(struct coresight_device *csdev, u32 offset);
698697
u32 coresight_read32(struct coresight_device *csdev, u32 offset);
@@ -705,8 +704,8 @@ void coresight_relaxed_write64(struct coresight_device *csdev,
705704
u64 val, u32 offset);
706705
void coresight_write64(struct coresight_device *csdev, u64 val, u32 offset);
707706

708-
extern int coresight_get_cpu(struct device *dev);
709-
extern int coresight_get_static_trace_id(struct device *dev, u32 *id);
707+
int coresight_get_cpu(struct device *dev);
708+
int coresight_get_static_trace_id(struct device *dev, u32 *id);
710709

711710
struct coresight_platform_data *coresight_get_platform_data(struct device *dev);
712711
struct coresight_connection *

0 commit comments

Comments
 (0)