qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Amit Shah <amit.shah@redhat.com>
Cc: Andre Przywara <andre.przywara@amd.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/6] vl.c: Remove dead assignment
Date: Wed, 13 Jan 2010 17:27:24 -0600	[thread overview]
Message-ID: <4B4E56DC.1050609@codemonkey.ws> (raw)
In-Reply-To: <1263380087-31821-2-git-send-email-amit.shah@redhat.com>

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<amit.shah@redhat.com>
> CC: Andre Przywara<andre.przywara@amd.com>
>    

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);
>               }
>           }
>    

      parent reply	other threads:[~2010-01-13 23:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-13 10:54 [Qemu-devel] [PATCH 0/6] Remove some dead assignments from clang analyzer report Amit Shah
2010-01-13 10:54 ` [Qemu-devel] [PATCH 1/6] vl.c: Remove dead assignment Amit Shah
2010-01-13 10:54   ` [Qemu-devel] [PATCH 2/6] virtio: net: remove " Amit Shah
2010-01-13 10:54     ` [Qemu-devel] [PATCH 3/6] x86: translate.c: " Amit Shah
2010-01-13 10:54       ` [Qemu-devel] [PATCH 4/6] hw/vga.c: " Amit Shah
2010-01-13 10:54         ` [Qemu-devel] [PATCH 5/6] qcow2-refcount: " Amit Shah
2010-01-13 10:54           ` [Qemu-devel] [PATCH 6/6] json-parser: remove dead increment Amit Shah
2010-01-13 11:46           ` [Qemu-devel] Re: [PATCH 5/6] qcow2-refcount: remove dead assignment Paolo Bonzini
2010-01-13 11:51             ` Amit Shah
2010-01-13 20:51     ` [Qemu-devel] Re: [PATCH 2/6] virtio: net: " Michael S. Tsirkin
2010-01-13 23:27   ` Anthony Liguori [this message]

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=4B4E56DC.1050609@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=amit.shah@redhat.com \
    --cc=andre.przywara@amd.com \
    --cc=qemu-devel@nongnu.org \
    /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).