From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NVCce-0001IM-MZ for qemu-devel@nongnu.org; Wed, 13 Jan 2010 18:27:32 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NVCca-0001IA-BE for qemu-devel@nongnu.org; Wed, 13 Jan 2010 18:27:32 -0500 Received: from [199.232.76.173] (port=46288 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NVCca-0001I7-3G for qemu-devel@nongnu.org; Wed, 13 Jan 2010 18:27:28 -0500 Received: from mail-qy0-f194.google.com ([209.85.221.194]:34668) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NVCcZ-0001J3-Rt for qemu-devel@nongnu.org; Wed, 13 Jan 2010 18:27:27 -0500 Received: by mail-qy0-f194.google.com with SMTP id 32so3454591qyk.4 for ; Wed, 13 Jan 2010 15:27:27 -0800 (PST) Message-ID: <4B4E56DC.1050609@codemonkey.ws> Date: Wed, 13 Jan 2010 17:27:24 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 1/6] vl.c: Remove dead assignment References: <1263380087-31821-1-git-send-email-amit.shah@redhat.com> <1263380087-31821-2-git-send-email-amit.shah@redhat.com> In-Reply-To: <1263380087-31821-2-git-send-email-amit.shah@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amit Shah Cc: Andre Przywara , qemu-devel@nongnu.org On 01/13/2010 04:54 AM, Amit Shah wrote: > clang-analyzer pointed out the value of 'sockets' is never reused. > > Signed-off-by: Amit Shah > CC: Andre Przywara > Applied. Thanks. Regards, Anthony Liguori > --- > 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); > } > } >