diff mbox

lib: fwts_devicetree.h: minor code formatting cleanups

Message ID 20170315100459.24607-1-colin.king@canonical.com
State Accepted
Headers show

Commit Message

Colin Ian King March 15, 2017, 10:04 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Replace gcc attribute with FWTS_UNUSED() macro, and reformat
function prototypes.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/lib/include/fwts_devicetree.h | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

Comments

Alex Hung March 15, 2017, 1:17 p.m. UTC | #1
On 2017-03-15 06:04 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Replace gcc attribute with FWTS_UNUSED() macro, and reformat
> function prototypes.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/lib/include/fwts_devicetree.h | 13 +++++--------
>  1 file changed, 5 insertions(+), 8 deletions(-)
>
> diff --git a/src/lib/include/fwts_devicetree.h b/src/lib/include/fwts_devicetree.h
> index 372bdda..662f6ec 100644
> --- a/src/lib/include/fwts_devicetree.h
> +++ b/src/lib/include/fwts_devicetree.h
> @@ -44,22 +44,19 @@
>  int fwts_devicetree_read(fwts_framework *fwts);
>
>  #else /* !FWTS_HAS_DEVICETREE */
> -static inline int fwts_devicetree_read(fwts_framework *fwts
> -		__attribute__((unused)))
> +static inline int fwts_devicetree_read(fwts_framework *fwts)
>  {
> +	FWTS_UNUSED(fwts);
> +
>  	return FWTS_OK;
>  }
>  #endif
>
>  bool check_status_property_okay(fwts_framework *fw,
> -				const char *my_path,
> -				const char *my_prop_string,
> -				const char *property);
> +	const char *my_path, const char *my_prop_string, const char *property);
>
>  int check_property_printable(fwts_framework *fw,
> -			const char *name,
> -			const char *buf,
> -			size_t len);
> +	const char *name, const char *buf, size_t len);
>
>  char *hidewhitespace(char *name);
>
>

Acked-by: Alex Hung <alex.hung@canonical.com>
Ivan Hu March 16, 2017, 2:21 a.m. UTC | #2
On 03/15/2017 06:04 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Replace gcc attribute with FWTS_UNUSED() macro, and reformat
> function prototypes.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/lib/include/fwts_devicetree.h | 13 +++++--------
>  1 file changed, 5 insertions(+), 8 deletions(-)
>
> diff --git a/src/lib/include/fwts_devicetree.h b/src/lib/include/fwts_devicetree.h
> index 372bdda..662f6ec 100644
> --- a/src/lib/include/fwts_devicetree.h
> +++ b/src/lib/include/fwts_devicetree.h
> @@ -44,22 +44,19 @@
>  int fwts_devicetree_read(fwts_framework *fwts);
>
>  #else /* !FWTS_HAS_DEVICETREE */
> -static inline int fwts_devicetree_read(fwts_framework *fwts
> -		__attribute__((unused)))
> +static inline int fwts_devicetree_read(fwts_framework *fwts)
>  {
> +	FWTS_UNUSED(fwts);
> +
>  	return FWTS_OK;
>  }
>  #endif
>
>  bool check_status_property_okay(fwts_framework *fw,
> -				const char *my_path,
> -				const char *my_prop_string,
> -				const char *property);
> +	const char *my_path, const char *my_prop_string, const char *property);
>
>  int check_property_printable(fwts_framework *fw,
> -			const char *name,
> -			const char *buf,
> -			size_t len);
> +	const char *name, const char *buf, size_t len);
>
>  char *hidewhitespace(char *name);
>
>


Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff mbox

Patch

diff --git a/src/lib/include/fwts_devicetree.h b/src/lib/include/fwts_devicetree.h
index 372bdda..662f6ec 100644
--- a/src/lib/include/fwts_devicetree.h
+++ b/src/lib/include/fwts_devicetree.h
@@ -44,22 +44,19 @@ 
 int fwts_devicetree_read(fwts_framework *fwts);
 
 #else /* !FWTS_HAS_DEVICETREE */
-static inline int fwts_devicetree_read(fwts_framework *fwts
-		__attribute__((unused)))
+static inline int fwts_devicetree_read(fwts_framework *fwts)
 {
+	FWTS_UNUSED(fwts);
+
 	return FWTS_OK;
 }
 #endif
 
 bool check_status_property_okay(fwts_framework *fw,
-				const char *my_path,
-				const char *my_prop_string,
-				const char *property);
+	const char *my_path, const char *my_prop_string, const char *property);
 
 int check_property_printable(fwts_framework *fw,
-			const char *name,
-			const char *buf,
-			size_t len);
+	const char *name, const char *buf, size_t len);
 
 char *hidewhitespace(char *name);