From patchwork Wed Jan 13 10:54:42 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Shah X-Patchwork-Id: 42802 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 5EE061007D2 for ; Wed, 13 Jan 2010 22:01:51 +1100 (EST) Received: from localhost ([127.0.0.1]:57191 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NV0yy-0002e8-Nu for incoming@patchwork.ozlabs.org; Wed, 13 Jan 2010 06:01:48 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NV0tR-0001CN-5t for qemu-devel@nongnu.org; Wed, 13 Jan 2010 05:56:05 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NV0tM-0001A5-FN for qemu-devel@nongnu.org; Wed, 13 Jan 2010 05:56:04 -0500 Received: from [199.232.76.173] (port=35077 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NV0tM-00019y-4C for qemu-devel@nongnu.org; Wed, 13 Jan 2010 05:56:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:10374) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NV0tL-0004J3-Hl for qemu-devel@nongnu.org; Wed, 13 Jan 2010 05:55:59 -0500 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o0DAtvVb015847 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 13 Jan 2010 05:55:57 -0500 Received: from localhost (vpn-232-206.phx2.redhat.com [10.3.232.206]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o0DAtt5a001342; Wed, 13 Jan 2010 05:55:56 -0500 From: Amit Shah To: qemu-devel@nongnu.org Date: Wed, 13 Jan 2010 16:24:42 +0530 Message-Id: <1263380087-31821-2-git-send-email-amit.shah@redhat.com> In-Reply-To: <1263380087-31821-1-git-send-email-amit.shah@redhat.com> References: <1263380087-31821-1-git-send-email-amit.shah@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Amit Shah , Andre Przywara Subject: [Qemu-devel] [PATCH 1/6] vl.c: Remove dead assignment X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org clang-analyzer pointed out the value of 'sockets' is never reused. Signed-off-by: Amit Shah CC: Andre Przywara --- vl.c | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/vl.c b/vl.c index b048e89..e49e7bd 100644 --- a/vl.c +++ b/vl.c @@ -2613,17 +2613,13 @@ static void smp_parse(const char *optarg) threads = threads > 0 ? threads : 1; if (smp == 0) { smp = cores * threads * sockets; - } else { - sockets = smp / (cores * threads); } } else { if (cores == 0) { threads = threads > 0 ? threads : 1; cores = smp / (sockets * threads); } else { - if (sockets == 0) { - sockets = smp / (cores * threads); - } else { + if (sockets) { threads = smp / (cores * sockets); } }