xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: xen-devel@lists.xen.org
Cc: Ian Jackson <ian.jackson@eu.citrix.com>,
	Wei Liu <wei.liu2@citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH] libxl: don't print out function name in log twice
Date: Fri, 1 Aug 2014 12:36:41 +0100	[thread overview]
Message-ID: <1406893001-7551-1-git-send-email-wei.liu2@citrix.com> (raw)

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

             reply	other threads:[~2014-08-01 11:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-01 11:36 Wei Liu [this message]
2014-08-01 14:12 ` [PATCH] libxl: don't print out function name in log twice Dario Faggioli
2014-08-21 22:49   ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1406893001-7551-1-git-send-email-wei.liu2@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).