[PATCH] qemu: fix code format problem

There are some code format problems in src/libvirt-domain.c. This patch fixes these problems.
From 55cd85345b2dc50f44c1e382563482d40142382b Mon Sep 17 00:00:00 2001 From: yubihong <yubihong@huawei.com> Date: Fri, 24 Apr 2020 17:44:43 +0800 Subject: [PATCH] qemu: fix code format problem
Signed-off-by:Yu Bihong <yubihong@huawei.com> --- src/libvirt-domain.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index a12809c..d659f1b 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -8194,11 +8194,11 @@ virDomainAttachDevice(virDomainPtr domain, const char *xml) virCheckReadOnlyGoto(conn->flags, error); if (conn->driver->domainAttachDevice) { - int ret; - ret = conn->driver->domainAttachDevice(domain, xml); - if (ret < 0) - goto error; - return ret; + int ret; + ret = conn->driver->domainAttachDevice(domain, xml); + if (ret < 0) + goto error; + return ret; } virReportUnsupportedError(); @@ -8299,9 +8299,9 @@ virDomainDetachDevice(virDomainPtr domain, const char *xml) if (conn->driver->domainDetachDevice) { int ret; ret = conn->driver->domainDetachDevice(domain, xml); - if (ret < 0) - goto error; - return ret; + if (ret < 0) + goto error; + return ret; } virReportUnsupportedError(); -- 1.8.3.1

On 4/26/20 1:56 PM, yubihong wrote:
There are some code format problems in src/libvirt-domain.c. This patch fixes these problems.
From 55cd85345b2dc50f44c1e382563482d40142382b Mon Sep 17 00:00:00 2001 From: yubihong <yubihong@huawei.com> Date: Fri, 24 Apr 2020 17:44:43 +0800 Subject: [PATCH] qemu: fix code format problem
Signed-off-by:Yu Bihong <yubihong@huawei.com> --- src/libvirt-domain.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index a12809c..d659f1b 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -8194,11 +8194,11 @@ virDomainAttachDevice(virDomainPtr domain, const char *xml) virCheckReadOnlyGoto(conn->flags, error);
if (conn->driver->domainAttachDevice) { - int ret; - ret = conn->driver->domainAttachDevice(domain, xml); - if (ret < 0) - goto error; - return ret; + int ret; + ret = conn->driver->domainAttachDevice(domain, xml); + if (ret < 0) + goto error; + return ret; }
virReportUnsupportedError(); @@ -8299,9 +8299,9 @@ virDomainDetachDevice(virDomainPtr domain, const char *xml) if (conn->driver->domainDetachDevice) { int ret; ret = conn->driver->domainDetachDevice(domain, xml); - if (ret < 0) - goto error; - return ret; + if (ret < 0) + goto error; + return ret; }
virReportUnsupportedError(); -- 1.8.3.1
This patch doesn't apply cleanly. Can you please resend using git-send-email as our documentation suggest? https://libvirt.org/submitting-patches.html The idea looks good, but I guess there are more places in the file that are misaligned. Might be worth extending your patch and include them. Michal

On Sun, 2020-04-26 at 11:56 +0000, yubihong wrote:
There are some code format problems in src/libvirt-domain.c. This patch fixes these problems.
This patch does not apply: Applying: qemu: fix code format problem error: git diff header lacks filename information when removing 1 leading pathname component (line 6) Patch failed at 0001 qemu: fix code format problem hint: Use 'git am --show-current-patch' to see the failed patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". I think the issue is caused by the comments that you added at the very top. If you want to add some information at the time of posting that doesn't need to be retained in the git history, it should go...
From 55cd85345b2dc50f44c1e382563482d40142382b Mon Sep 17 00:00:00 2001 From: yubihong <yubihong@huawei.com> Date: Fri, 24 Apr 2020 17:44:43 +0800 Subject: [PATCH] qemu: fix code format problem
Signed-off-by:Yu Bihong <yubihong@huawei.com> ---
... right here.
src/libvirt-domain.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
Please resend the patch in a form that can be applied. See https://libvirt.org/submitting-patches.html for hints on how to achieve that. While you're at it, please also fix your Signed-off-by so that it looks like Signed-off-by: Yu Bihong <yubihong@huawei.com> (notice the additional whitespace) and configure your git client so that authorship information (name and last name) match those in the Signed-off-by. -- Andrea Bolognani / Red Hat / Virtualization
participants (3)
-
Andrea Bolognani
-
Michal Privoznik
-
yubihong