* [PATCH] libxl: don't print out function name in log twice
@ 2014-08-01 11:36 Wei Liu
2014-08-01 14:12 ` Dario Faggioli
0 siblings, 1 reply; 3+ messages in thread
From: Wei Liu @ 2014-08-01 11:36 UTC (permalink / raw
To: xen-devel; +Cc: Ian Jackson, Wei Liu, Ian Campbell
The LOG macro already prints out function names. No need to explictly
use "__func__" in log message.
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
---
tools/libxl/libxl_dm.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index addacdb..69e4d00 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -230,8 +230,7 @@ static char ** libxl__build_device_model_args_old(libxl__gc *gc,
|| b_info->u.hvm.usbdevice_list) {
if ( b_info->u.hvm.usbdevice && b_info->u.hvm.usbdevice_list )
{
- LOG(ERROR, "%s: Both usbdevice and usbdevice_list set",
- __func__);
+ LOG(ERROR, "Both usbdevice and usbdevice_list set");
return NULL;
}
flexarray_append(dm_args, "-usb");
@@ -527,8 +526,7 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
|| b_info->u.hvm.usbdevice_list) {
if ( b_info->u.hvm.usbdevice && b_info->u.hvm.usbdevice_list )
{
- LOG(ERROR, "%s: Both usbdevice and usbdevice_list set",
- __func__);
+ LOG(ERROR, "Both usbdevice and usbdevice_list set");
return NULL;
}
flexarray_append(dm_args, "-usb");
@@ -565,8 +563,8 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
"-device", "nec-usb-xhci,id=usb", NULL);
break;
default:
- LOG(ERROR, "%s: usbversion parameter is invalid, "
- "must be between 1 and 3", __func__);
+ LOG(ERROR, "usbversion parameter is invalid, "
+ "must be between 1 and 3");
return NULL;
}
if (b_info->u.hvm.spice.usbredirection >= 0 &&
@@ -577,8 +575,8 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
libxl__sprintf(gc, "usb-redir,chardev=usbrc%d,"
"id=usbrc%d", i, i), NULL);
} else {
- LOG(ERROR, "%s: usbredirection parameter is invalid, "
- "it must be between 1 and 4", __func__);
+ LOG(ERROR, "usbredirection parameter is invalid, "
+ "it must be between 1 and 4");
return NULL;
}
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] libxl: don't print out function name in log twice
2014-08-01 11:36 [PATCH] libxl: don't print out function name in log twice Wei Liu
@ 2014-08-01 14:12 ` Dario Faggioli
2014-08-21 22:49 ` Ian Campbell
0 siblings, 1 reply; 3+ messages in thread
From: Dario Faggioli @ 2014-08-01 14:12 UTC (permalink / raw
To: Wei Liu; +Cc: Ian Jackson, Ian Campbell, xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 646 bytes --]
On ven, 2014-08-01 at 12:36 +0100, Wei Liu wrote:
> The LOG macro already prints out function names. No need to explictly
> use "__func__" in log message.
>
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> Cc: Ian Campbell <ian.campbell@citrix.com>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
>
Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com>
Regards,
Dario
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] libxl: don't print out function name in log twice
2014-08-01 14:12 ` Dario Faggioli
@ 2014-08-21 22:49 ` Ian Campbell
0 siblings, 0 replies; 3+ messages in thread
From: Ian Campbell @ 2014-08-21 22:49 UTC (permalink / raw
To: Dario Faggioli; +Cc: Ian Jackson, Wei Liu, xen-devel
On Fri, 2014-08-01 at 16:12 +0200, Dario Faggioli wrote:
> On ven, 2014-08-01 at 12:36 +0100, Wei Liu wrote:
> > The LOG macro already prints out function names. No need to explictly
> > use "__func__" in log message.
> >
> > Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> > Cc: Ian Campbell <ian.campbell@citrix.com>
> > Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> >
> Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-08-21 22:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-01 11:36 [PATCH] libxl: don't print out function name in log twice Wei Liu
2014-08-01 14:12 ` Dario Faggioli
2014-08-21 22:49 ` Ian Campbell
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.