LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] extcon: Remove unneeded extern keyword from extcon.h
       [not found] <CGME20200116043228epcas1p11a74c5935b015ec85fc61da8cf12681f@epcas1p1.samsung.com>
@ 2020-01-16  4:39 ` Chanwoo Choi
  2020-01-17  1:04   ` Chanwoo Choi
  0 siblings, 1 reply; 2+ messages in thread
From: Chanwoo Choi @ 2020-01-16  4:39 UTC (permalink / raw)
  To: linux-kernel; +Cc: cw00.choi, chanwoo, myungjoo.ham

'extern' keyword is unneeded in extcon.h because public header file
of extcon defines the function prototype.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
 include/linux/extcon.h | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/include/linux/extcon.h b/include/linux/extcon.h
index 2bdf643d8593..1b1d77ec2114 100644
--- a/include/linux/extcon.h
+++ b/include/linux/extcon.h
@@ -170,7 +170,7 @@ struct extcon_dev;
  * Following APIs get the connected state of each external connector.
  * The 'id' argument indicates the defined external connector.
  */
-extern int extcon_get_state(struct extcon_dev *edev, unsigned int id);
+int extcon_get_state(struct extcon_dev *edev, unsigned int id);
 
 /*
  * Following APIs get the property of each external connector.
@@ -181,10 +181,10 @@ extern int extcon_get_state(struct extcon_dev *edev, unsigned int id);
  * for each external connector. They are used to get the capability of the
  * property of each external connector based on the id and property.
  */
-extern int extcon_get_property(struct extcon_dev *edev, unsigned int id,
+int extcon_get_property(struct extcon_dev *edev, unsigned int id,
 				unsigned int prop,
 				union extcon_property_value *prop_val);
-extern int extcon_get_property_capability(struct extcon_dev *edev,
+int extcon_get_property_capability(struct extcon_dev *edev,
 				unsigned int id, unsigned int prop);
 
 /*
@@ -196,38 +196,38 @@ extern int extcon_get_property_capability(struct extcon_dev *edev,
  * extcon_register_notifier_all(*edev, *nb) : Register a notifier block
  *			for all supported external connectors of the extcon.
  */
-extern int extcon_register_notifier(struct extcon_dev *edev, unsigned int id,
+int extcon_register_notifier(struct extcon_dev *edev, unsigned int id,
 				struct notifier_block *nb);
-extern int extcon_unregister_notifier(struct extcon_dev *edev, unsigned int id,
+int extcon_unregister_notifier(struct extcon_dev *edev, unsigned int id,
 				struct notifier_block *nb);
-extern int devm_extcon_register_notifier(struct device *dev,
+int devm_extcon_register_notifier(struct device *dev,
 				struct extcon_dev *edev, unsigned int id,
 				struct notifier_block *nb);
-extern void devm_extcon_unregister_notifier(struct device *dev,
+void devm_extcon_unregister_notifier(struct device *dev,
 				struct extcon_dev *edev, unsigned int id,
 				struct notifier_block *nb);
 
-extern int extcon_register_notifier_all(struct extcon_dev *edev,
+int extcon_register_notifier_all(struct extcon_dev *edev,
 				struct notifier_block *nb);
-extern int extcon_unregister_notifier_all(struct extcon_dev *edev,
+int extcon_unregister_notifier_all(struct extcon_dev *edev,
 				struct notifier_block *nb);
-extern int devm_extcon_register_notifier_all(struct device *dev,
+int devm_extcon_register_notifier_all(struct device *dev,
 				struct extcon_dev *edev,
 				struct notifier_block *nb);
-extern void devm_extcon_unregister_notifier_all(struct device *dev,
+void devm_extcon_unregister_notifier_all(struct device *dev,
 				struct extcon_dev *edev,
 				struct notifier_block *nb);
 
 /*
  * Following APIs get the extcon_dev from devicetree or by through extcon name.
  */
-extern struct extcon_dev *extcon_get_extcon_dev(const char *extcon_name);
-extern struct extcon_dev *extcon_find_edev_by_node(struct device_node *node);
-extern struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev,
+struct extcon_dev *extcon_get_extcon_dev(const char *extcon_name);
+struct extcon_dev *extcon_find_edev_by_node(struct device_node *node);
+struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev,
 						     int index);
 
 /* Following API get the name of extcon device. */
-extern const char *extcon_get_edev_name(struct extcon_dev *edev);
+const char *extcon_get_edev_name(struct extcon_dev *edev);
 
 #else /* CONFIG_EXTCON */
 static inline int extcon_get_state(struct extcon_dev *edev, unsigned int id)
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] extcon: Remove unneeded extern keyword from extcon.h
  2020-01-16  4:39 ` [PATCH] extcon: Remove unneeded extern keyword from extcon.h Chanwoo Choi
@ 2020-01-17  1:04   ` Chanwoo Choi
  0 siblings, 0 replies; 2+ messages in thread
From: Chanwoo Choi @ 2020-01-17  1:04 UTC (permalink / raw)
  To: linux-kernel; +Cc: chanwoo, myungjoo.ham

On 1/16/20 1:39 PM, Chanwoo Choi wrote:
> 'extern' keyword is unneeded in extcon.h because public header file
> of extcon defines the function prototype.
> 
> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
> ---
>  include/linux/extcon.h | 30 +++++++++++++++---------------
>  1 file changed, 15 insertions(+), 15 deletions(-)
> 
> diff --git a/include/linux/extcon.h b/include/linux/extcon.h
> index 2bdf643d8593..1b1d77ec2114 100644
> --- a/include/linux/extcon.h
> +++ b/include/linux/extcon.h
> @@ -170,7 +170,7 @@ struct extcon_dev;
>   * Following APIs get the connected state of each external connector.
>   * The 'id' argument indicates the defined external connector.
>   */
> -extern int extcon_get_state(struct extcon_dev *edev, unsigned int id);
> +int extcon_get_state(struct extcon_dev *edev, unsigned int id);
>  
>  /*
>   * Following APIs get the property of each external connector.
> @@ -181,10 +181,10 @@ extern int extcon_get_state(struct extcon_dev *edev, unsigned int id);
>   * for each external connector. They are used to get the capability of the
>   * property of each external connector based on the id and property.
>   */
> -extern int extcon_get_property(struct extcon_dev *edev, unsigned int id,
> +int extcon_get_property(struct extcon_dev *edev, unsigned int id,
>  				unsigned int prop,
>  				union extcon_property_value *prop_val);
> -extern int extcon_get_property_capability(struct extcon_dev *edev,
> +int extcon_get_property_capability(struct extcon_dev *edev,
>  				unsigned int id, unsigned int prop);
>  
>  /*
> @@ -196,38 +196,38 @@ extern int extcon_get_property_capability(struct extcon_dev *edev,
>   * extcon_register_notifier_all(*edev, *nb) : Register a notifier block
>   *			for all supported external connectors of the extcon.
>   */
> -extern int extcon_register_notifier(struct extcon_dev *edev, unsigned int id,
> +int extcon_register_notifier(struct extcon_dev *edev, unsigned int id,
>  				struct notifier_block *nb);
> -extern int extcon_unregister_notifier(struct extcon_dev *edev, unsigned int id,
> +int extcon_unregister_notifier(struct extcon_dev *edev, unsigned int id,
>  				struct notifier_block *nb);
> -extern int devm_extcon_register_notifier(struct device *dev,
> +int devm_extcon_register_notifier(struct device *dev,
>  				struct extcon_dev *edev, unsigned int id,
>  				struct notifier_block *nb);
> -extern void devm_extcon_unregister_notifier(struct device *dev,
> +void devm_extcon_unregister_notifier(struct device *dev,
>  				struct extcon_dev *edev, unsigned int id,
>  				struct notifier_block *nb);
>  
> -extern int extcon_register_notifier_all(struct extcon_dev *edev,
> +int extcon_register_notifier_all(struct extcon_dev *edev,
>  				struct notifier_block *nb);
> -extern int extcon_unregister_notifier_all(struct extcon_dev *edev,
> +int extcon_unregister_notifier_all(struct extcon_dev *edev,
>  				struct notifier_block *nb);
> -extern int devm_extcon_register_notifier_all(struct device *dev,
> +int devm_extcon_register_notifier_all(struct device *dev,
>  				struct extcon_dev *edev,
>  				struct notifier_block *nb);
> -extern void devm_extcon_unregister_notifier_all(struct device *dev,
> +void devm_extcon_unregister_notifier_all(struct device *dev,
>  				struct extcon_dev *edev,
>  				struct notifier_block *nb);
>  
>  /*
>   * Following APIs get the extcon_dev from devicetree or by through extcon name.
>   */
> -extern struct extcon_dev *extcon_get_extcon_dev(const char *extcon_name);
> -extern struct extcon_dev *extcon_find_edev_by_node(struct device_node *node);
> -extern struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev,
> +struct extcon_dev *extcon_get_extcon_dev(const char *extcon_name);
> +struct extcon_dev *extcon_find_edev_by_node(struct device_node *node);
> +struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev,
>  						     int index);
>  
>  /* Following API get the name of extcon device. */
> -extern const char *extcon_get_edev_name(struct extcon_dev *edev);
> +const char *extcon_get_edev_name(struct extcon_dev *edev);
>  
>  #else /* CONFIG_EXTCON */
>  static inline int extcon_get_state(struct extcon_dev *edev, unsigned int id)
> 

Applied it.

-- 
Best Regards,
Chanwoo Choi
Samsung Electronics

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-17  0:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20200116043228epcas1p11a74c5935b015ec85fc61da8cf12681f@epcas1p1.samsung.com>
2020-01-16  4:39 ` [PATCH] extcon: Remove unneeded extern keyword from extcon.h Chanwoo Choi
2020-01-17  1:04   ` Chanwoo Choi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).