All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen/common: Replace __FUNCTION__ with __func__
@ 2017-02-03 20:52 Andrew Cooper
  2017-02-03 21:03 ` Stefano Stabellini
  2017-02-03 21:07 ` Konrad Rzeszutek Wilk
  0 siblings, 2 replies; 3+ messages in thread
From: Andrew Cooper @ 2017-02-03 20:52 UTC (permalink / raw)
  To: Xen-devel
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Tim Deegan, Jan Beulich

__func__ is standard C99, whereas __FUNCTION__ is a GCCism.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: George Dunlap <George.Dunlap@eu.citrix.com>
CC: Jan Beulich <JBeulich@suse.com>
CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Tim Deegan <tim@xen.org>
CC: Wei Liu <wei.liu2@citrix.com>
---
 xen/common/grant_table.c          | 4 ++--
 xen/common/libelf/libelf-loader.c | 4 ++--
 xen/common/wait.c                 | 2 +-
 xen/include/acpi/platform/acgcc.h | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c
index a425a9e..04058dd 100644
--- a/xen/common/grant_table.c
+++ b/xen/common/grant_table.c
@@ -3547,10 +3547,10 @@ static void gnttab_usage_print(struct domain *rd)
 static void gnttab_usage_print_all(unsigned char key)
 {
     struct domain *d;
-    printk("%s [ key '%c' pressed\n", __FUNCTION__, key);
+    printk("%s [ key '%c' pressed\n", __func__, key);
     for_each_domain ( d )
         gnttab_usage_print(d);
-    printk("%s ] done\n", __FUNCTION__);
+    printk("%s ] done\n", __func__);
 }
 
 static int __init gnttab_usage_init(void)
diff --git a/xen/common/libelf/libelf-loader.c b/xen/common/libelf/libelf-loader.c
index a72cd8a..1644f16 100644
--- a/xen/common/libelf/libelf-loader.c
+++ b/xen/common/libelf/libelf-loader.c
@@ -536,12 +536,12 @@ uint64_t elf_lookup_addr(struct elf_binary * elf, const char *symbol)
     sym = elf_sym_by_name(elf, symbol);
     if ( !ELF_HANDLE_VALID(sym) )
     {
-        elf_err(elf, "%s: not found: %s\n", __FUNCTION__, symbol);
+        elf_err(elf, "%s: not found: %s\n", __func__, symbol);
         return -1;
     }
 
     value = elf_uval(elf, sym, st_value);
-    elf_msg(elf, "%s: symbol \"%s\" at 0x%" PRIx64 "\n", __FUNCTION__,
+    elf_msg(elf, "%s: symbol \"%s\" at 0x%" PRIx64 "\n", __func__,
             symbol, value);
     return value;
 }
diff --git a/xen/common/wait.c b/xen/common/wait.c
index 4ac98c0..89cfc06 100644
--- a/xen/common/wait.c
+++ b/xen/common/wait.c
@@ -155,7 +155,7 @@ static void __prepare_to_wait(struct waitqueue_vcpu *wqv)
 
     if ( unlikely(wqv->esp == 0) )
     {
-        gdprintk(XENLOG_ERR, "Stack too large in %s\n", __FUNCTION__);
+        gdprintk(XENLOG_ERR, "Stack too large in %s\n", __func__);
         domain_crash_synchronous();
     }
 
diff --git a/xen/include/acpi/platform/acgcc.h b/xen/include/acpi/platform/acgcc.h
index 3bb5049..b355e98 100644
--- a/xen/include/acpi/platform/acgcc.h
+++ b/xen/include/acpi/platform/acgcc.h
@@ -46,7 +46,7 @@
 
 /* Function name is used for debug output. Non-ANSI, compiler-dependent */
 
-#define ACPI_GET_FUNCTION_NAME          __FUNCTION__
+#define ACPI_GET_FUNCTION_NAME          __func__
 
 /*
  * This macro is used to tag functions as "printf-like" because
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* Re: [PATCH] xen/common: Replace __FUNCTION__ with __func__
  2017-02-03 20:52 [PATCH] xen/common: Replace __FUNCTION__ with __func__ Andrew Cooper
@ 2017-02-03 21:03 ` Stefano Stabellini
  2017-02-03 21:07 ` Konrad Rzeszutek Wilk
  1 sibling, 0 replies; 3+ messages in thread
From: Stefano Stabellini @ 2017-02-03 21:03 UTC (permalink / raw)
  To: Andrew Cooper
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Tim Deegan, Xen-devel,
	Jan Beulich

On Fri, 3 Feb 2017, Andrew Cooper wrote:
> __func__ is standard C99, whereas __FUNCTION__ is a GCCism.
> 
> No functional change.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Acked-by: Stefano Stabellini <sstabellini@kernel.org>


> CC: George Dunlap <George.Dunlap@eu.citrix.com>
> CC: Jan Beulich <JBeulich@suse.com>
> CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> CC: Stefano Stabellini <sstabellini@kernel.org>
> CC: Tim Deegan <tim@xen.org>
> CC: Wei Liu <wei.liu2@citrix.com>
> ---
>  xen/common/grant_table.c          | 4 ++--
>  xen/common/libelf/libelf-loader.c | 4 ++--
>  xen/common/wait.c                 | 2 +-
>  xen/include/acpi/platform/acgcc.h | 2 +-
>  4 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c
> index a425a9e..04058dd 100644
> --- a/xen/common/grant_table.c
> +++ b/xen/common/grant_table.c
> @@ -3547,10 +3547,10 @@ static void gnttab_usage_print(struct domain *rd)
>  static void gnttab_usage_print_all(unsigned char key)
>  {
>      struct domain *d;
> -    printk("%s [ key '%c' pressed\n", __FUNCTION__, key);
> +    printk("%s [ key '%c' pressed\n", __func__, key);
>      for_each_domain ( d )
>          gnttab_usage_print(d);
> -    printk("%s ] done\n", __FUNCTION__);
> +    printk("%s ] done\n", __func__);
>  }
>  
>  static int __init gnttab_usage_init(void)
> diff --git a/xen/common/libelf/libelf-loader.c b/xen/common/libelf/libelf-loader.c
> index a72cd8a..1644f16 100644
> --- a/xen/common/libelf/libelf-loader.c
> +++ b/xen/common/libelf/libelf-loader.c
> @@ -536,12 +536,12 @@ uint64_t elf_lookup_addr(struct elf_binary * elf, const char *symbol)
>      sym = elf_sym_by_name(elf, symbol);
>      if ( !ELF_HANDLE_VALID(sym) )
>      {
> -        elf_err(elf, "%s: not found: %s\n", __FUNCTION__, symbol);
> +        elf_err(elf, "%s: not found: %s\n", __func__, symbol);
>          return -1;
>      }
>  
>      value = elf_uval(elf, sym, st_value);
> -    elf_msg(elf, "%s: symbol \"%s\" at 0x%" PRIx64 "\n", __FUNCTION__,
> +    elf_msg(elf, "%s: symbol \"%s\" at 0x%" PRIx64 "\n", __func__,
>              symbol, value);
>      return value;
>  }
> diff --git a/xen/common/wait.c b/xen/common/wait.c
> index 4ac98c0..89cfc06 100644
> --- a/xen/common/wait.c
> +++ b/xen/common/wait.c
> @@ -155,7 +155,7 @@ static void __prepare_to_wait(struct waitqueue_vcpu *wqv)
>  
>      if ( unlikely(wqv->esp == 0) )
>      {
> -        gdprintk(XENLOG_ERR, "Stack too large in %s\n", __FUNCTION__);
> +        gdprintk(XENLOG_ERR, "Stack too large in %s\n", __func__);
>          domain_crash_synchronous();
>      }
>  
> diff --git a/xen/include/acpi/platform/acgcc.h b/xen/include/acpi/platform/acgcc.h
> index 3bb5049..b355e98 100644
> --- a/xen/include/acpi/platform/acgcc.h
> +++ b/xen/include/acpi/platform/acgcc.h
> @@ -46,7 +46,7 @@
>  
>  /* Function name is used for debug output. Non-ANSI, compiler-dependent */
>  
> -#define ACPI_GET_FUNCTION_NAME          __FUNCTION__
> +#define ACPI_GET_FUNCTION_NAME          __func__
>  
>  /*
>   * This macro is used to tag functions as "printf-like" because
> -- 
> 2.1.4
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* Re: [PATCH] xen/common: Replace __FUNCTION__ with __func__
  2017-02-03 20:52 [PATCH] xen/common: Replace __FUNCTION__ with __func__ Andrew Cooper
  2017-02-03 21:03 ` Stefano Stabellini
@ 2017-02-03 21:07 ` Konrad Rzeszutek Wilk
  1 sibling, 0 replies; 3+ messages in thread
From: Konrad Rzeszutek Wilk @ 2017-02-03 21:07 UTC (permalink / raw)
  To: Andrew Cooper
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Tim Deegan, Xen-devel,
	Jan Beulich

On Fri, Feb 03, 2017 at 08:52:29PM +0000, Andrew Cooper wrote:
> __func__ is standard C99, whereas __FUNCTION__ is a GCCism.
> 
> No functional change.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

end of thread, other threads:[~2017-02-03 21:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-03 20:52 [PATCH] xen/common: Replace __FUNCTION__ with __func__ Andrew Cooper
2017-02-03 21:03 ` Stefano Stabellini
2017-02-03 21:07 ` Konrad Rzeszutek Wilk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.