From patchwork Tue Jul 17 05:00:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Ellerman X-Patchwork-Id: 1203101 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 553CC3FD9C for ; Tue, 17 Jul 2012 05:02:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754380Ab2GQFCX (ORCPT ); Tue, 17 Jul 2012 01:02:23 -0400 Received: from ozlabs.org ([203.10.76.45]:54596 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754332Ab2GQFAy (ORCPT ); Tue, 17 Jul 2012 01:00:54 -0400 Received: by ozlabs.org (Postfix, from userid 1034) id 4E6092C0163; Tue, 17 Jul 2012 15:00:53 +1000 (EST) From: Michael Ellerman To: Cc: , , , , , David Gibson Subject: [PATCH 06/10] kvm tools, powerpc: Reformatting in find_cpu_info() Date: Tue, 17 Jul 2012 15:00:16 +1000 Message-Id: <1342501220-10209-7-git-send-email-michael@ellerman.id.au> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1342501220-10209-1-git-send-email-michael@ellerman.id.au> References: <1342501220-10209-1-git-send-email-michael@ellerman.id.au> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Matt's enter key was broken when he wrote this ;) Signed-off-by: Michael Ellerman --- tools/kvm/powerpc/cpu_info.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/kvm/powerpc/cpu_info.c b/tools/kvm/powerpc/cpu_info.c index 7326f5b..586b232 100644 --- a/tools/kvm/powerpc/cpu_info.c +++ b/tools/kvm/powerpc/cpu_info.c @@ -75,13 +75,15 @@ static struct pvr_info host_pvr_info[] = { struct cpu_info *find_cpu_info(u32 pvr) { unsigned int i; + for (i = 0; i < ARRAY_SIZE(host_pvr_info); i++) { - if ((pvr & host_pvr_info[i].pvr_mask) == - host_pvr_info[i].pvr) { + if ((pvr & host_pvr_info[i].pvr_mask) == host_pvr_info[i].pvr) { return host_pvr_info[i].cpu_info; } } + /* Didn't find anything? Rut-ro. */ pr_warning("Host CPU unsupported by kvmtool\n"); + return &cpu_dummy_info; }