linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: Paul Mackerras <paulus@ozlabs.org>,
	kvm@vger.kernel.org, kvm-ppc@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org
Cc: "Alexander Graf" <agraf@suse.com>,
	"Benjamin Herrenschmidt" <benh@kernel.crashing.org>,
	"Michael Ellerman" <mpe@ellerman.id.au>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>,
	kernel-janitors@vger.kernel.org,
	"Julia Lawall" <julia.lawall@lip6.fr>
Subject: [PATCH] KVM: PPC: e500: Rename jump labels in kvmppc_e500_tlb_init()
Date: Mon, 12 Sep 2016 23:00:08 +0200	[thread overview]
Message-ID: <b3d10e3b-79f9-b52c-c013-fe33f87cbd08@users.sourceforge.net> (raw)
In-Reply-To: <20160911232547.GA9873@fergus.ozlabs.ibm.com>

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 12 Sep 2016 22:33:53 +0200

Adjust jump labels according to the current Linux coding style convention.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---

Thanks that five update steps could be integrated into the branch "kvm-ppc-next"
of another source code repository.


> With this I get a compile error:
> 
>   CC      arch/powerpc/kvm/e500_mmu.o
> /home/paulus/kernel/kvm/arch/powerpc/kvm/e500_mmu.c: In function ‘kvmppc_e500_tlb_init’:
> /home/paulus/kernel/kvm/arch/powerpc/kvm/e500_mmu.c:910:3: error: label ‘err’ used but not defined
>    goto err;
>    ^
> /home/paulus/kernel/kvm/scripts/Makefile.build:289: recipe for target 'arch/powerpc/kvm/e500_mmu.o' failed
> make[2]: *** [arch/powerpc/kvm/e500_mmu.o] Error 1

I overlooked a single goto statement there somehow.

I hope that you like my second approach for this function implementation better.


 arch/powerpc/kvm/e500_mmu.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/kvm/e500_mmu.c b/arch/powerpc/kvm/e500_mmu.c
index 0a2eeb1..ddbf8f0 100644
--- a/arch/powerpc/kvm/e500_mmu.c
+++ b/arch/powerpc/kvm/e500_mmu.c
@@ -907,7 +907,7 @@ int kvmppc_e500_tlb_init(struct kvmppc_vcpu_e500 *vcpu_e500)
 	struct kvm_vcpu *vcpu = &vcpu_e500->vcpu;
 
 	if (e500_mmu_host_init(vcpu_e500))
-		goto err;
+		goto free_vcpu;
 
 	vcpu_e500->gtlb_params[0].entries = KVM_E500_TLB0_SIZE;
 	vcpu_e500->gtlb_params[1].entries = KVM_E500_TLB1_SIZE;
@@ -933,26 +933,25 @@ int kvmppc_e500_tlb_init(struct kvmppc_vcpu_e500 *vcpu_e500)
 					  sizeof(struct tlbe_ref),
 					  GFP_KERNEL);
 	if (!vcpu_e500->gtlb_priv[0])
-		goto err;
+		goto free_vcpu;
 
 	vcpu_e500->gtlb_priv[1] = kcalloc(vcpu_e500->gtlb_params[1].entries,
 					  sizeof(struct tlbe_ref),
 					  GFP_KERNEL);
 	if (!vcpu_e500->gtlb_priv[1])
-		goto err;
+		goto free_vcpu;
 
 	vcpu_e500->g2h_tlb1_map = kcalloc(vcpu_e500->gtlb_params[1].entries,
 					  sizeof(*vcpu_e500->g2h_tlb1_map),
 					  GFP_KERNEL);
 	if (!vcpu_e500->g2h_tlb1_map)
-		goto err;
+		goto free_vcpu;
 
 	vcpu_mmu_init(vcpu, vcpu_e500->gtlb_params);
 
 	kvmppc_recalc_tlb1map_range(vcpu_e500);
 	return 0;
-
-err:
+ free_vcpu:
 	free_gtlb(vcpu_e500);
 	return -1;
 }
-- 
2.10.0

  reply	other threads:[~2016-09-12 21:14 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <566ABCD9.1060404@users.sourceforge.net>
2015-12-14 22:10 ` [POWERPC] bootwrapper: One check less in fsl_get_immr() after error detection SF Markus Elfring
2015-12-14 22:20   ` Scott Wood
2016-08-28 17:09 ` [PATCH 0/6] KVM: PPC: e500: Fine-tuning for two function implementations SF Markus Elfring
2016-08-28 17:12   ` [PATCH 1/6] KVM: PPC: e500: Use kmalloc_array() in kvm_vcpu_ioctl_config_tlb() SF Markus Elfring
2016-08-28 17:14   ` [PATCH 2/6] KVM: PPC: e500: Less function calls in kvm_vcpu_ioctl_config_tlb() after error detection SF Markus Elfring
2016-08-28 17:15   ` [PATCH 3/6] KVM: PPC: e500: Delete an unnecessary initialisation in kvm_vcpu_ioctl_config_tlb() SF Markus Elfring
2016-08-28 17:16   ` [PATCH 4/6] KVM: PPC: e500: Replace kzalloc() calls by kcalloc() in two functions SF Markus Elfring
2016-08-28 17:18   ` [PATCH 5/6] KVM: PPC: e500: Use kmalloc_array() in kvmppc_e500_tlb_init() SF Markus Elfring
2016-08-28 17:46     ` Julia Lawall
2016-08-28 17:19   ` [PATCH 6/6] KVM: PPC: e500: Rename jump labels " SF Markus Elfring
2016-08-28 17:48     ` Julia Lawall
2016-09-11 23:25     ` Paul Mackerras
2016-09-12 21:00       ` SF Markus Elfring [this message]
2016-09-12  0:54   ` [PATCH 0/6] KVM: PPC: e500: Fine-tuning for two function implementations Paul Mackerras
2016-08-29 11:00 ` [PATCH 0/5] PowerPC: Fine-tuning for three " SF Markus Elfring
2016-08-29 11:00 ` SF Markus Elfring
2016-08-29 11:07   ` [PATCH 1/5] powerpc-mpic: Use kmalloc_array() in mpic_init() SF Markus Elfring
2016-08-29 11:09   ` [PATCH 2/5] powerpc-MSI: Use kmalloc_array() in ppc4xx_setup_msi_irqs() SF Markus Elfring
2016-08-29 11:10   ` [PATCH 3/5] powerpc-MSI-HSTA: Use kmalloc_array() in hsta_msi_probe() SF Markus Elfring
2016-08-29 11:12   ` [PATCH 4/5] powerpc-MSI-HSTA: Rename jump labels " SF Markus Elfring
2016-08-29 11:13   ` [PATCH 5/5] powerpc-MSI-HSTA: Move three assignments " SF Markus Elfring

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=b3d10e3b-79f9-b52c-c013-fe33f87cbd08@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=agraf@suse.com \
    --cc=benh@kernel.crashing.org \
    --cc=julia.lawall@lip6.fr \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@ozlabs.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    /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).