[{"id":1770494,"web_url":"http://patchwork.ozlabs.org/comment/1770494/","msgid":"<d49d661e-3663-988f-cba4-78878ef7b5b3@redhat.com>","list_archive_url":null,"date":"2017-09-18T21:01:29","subject":"Re: [Qemu-devel] [PATCH] default-configs: Replace $(and ...) with\n\t$(call land, ...)","submitter":{"id":2701,"url":"http://patchwork.ozlabs.org/api/people/2701/","name":"Paolo Bonzini","email":"pbonzini@redhat.com"},"content":"On 18/09/2017 20:32, Thomas Huth wrote:\n> Using $(and ...) is dangerous here: It only works as long as the first \n> argument is set to 'y' or completely unset. It does not work if the\n> first argument is set to 'n' for example. Let's use the \"land\" make\n> function instead which has been written explicitely for this purpose.\n> \n> Signed-off-by: Thomas Huth <thuth@redhat.com>\n> ---\n>  default-configs/pci.mak           | 2 +-\n>  default-configs/ppc-softmmu.mak   | 2 +-\n>  default-configs/ppc64-softmmu.mak | 4 ++--\n>  default-configs/s390x-softmmu.mak | 2 +-\n>  4 files changed, 5 insertions(+), 5 deletions(-)\n> \n> diff --git a/default-configs/pci.mak b/default-configs/pci.mak\n> index a758630..187e438 100644\n> --- a/default-configs/pci.mak\n> +++ b/default-configs/pci.mak\n> @@ -43,4 +43,4 @@ CONFIG_VGA=y\n>  CONFIG_VGA_PCI=y\n>  CONFIG_IVSHMEM_DEVICE=$(CONFIG_IVSHMEM)\n>  CONFIG_ROCKER=y\n> -CONFIG_VHOST_USER_SCSI=$(and $(CONFIG_VHOST_USER),$(CONFIG_LINUX))\n> +CONFIG_VHOST_USER_SCSI=$(call land,$(CONFIG_VHOST_USER),$(CONFIG_LINUX))\n> diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak\n> index a3972c5..d7a3755 100644\n> --- a/default-configs/ppc-softmmu.mak\n> +++ b/default-configs/ppc-softmmu.mak\n> @@ -43,7 +43,7 @@ CONFIG_XILINX_ETHLITE=y\n>  CONFIG_PREP=y\n>  CONFIG_MAC=y\n>  CONFIG_E500=y\n> -CONFIG_OPENPIC_KVM=$(and $(CONFIG_E500),$(CONFIG_KVM))\n> +CONFIG_OPENPIC_KVM=$(call land,$(CONFIG_E500),$(CONFIG_KVM))\n>  CONFIG_PLATFORM_BUS=y\n>  CONFIG_ETSEC=y\n>  CONFIG_LIBDECNUMBER=y\n> diff --git a/default-configs/ppc64-softmmu.mak b/default-configs/ppc64-softmmu.mak\n> index af32589..9086475 100644\n> --- a/default-configs/ppc64-softmmu.mak\n> +++ b/default-configs/ppc64-softmmu.mak\n> @@ -48,7 +48,7 @@ CONFIG_POWERNV=y\n>  CONFIG_PREP=y\n>  CONFIG_MAC=y\n>  CONFIG_E500=y\n> -CONFIG_OPENPIC_KVM=$(and $(CONFIG_E500),$(CONFIG_KVM))\n> +CONFIG_OPENPIC_KVM=$(call land,$(CONFIG_E500),$(CONFIG_KVM))\n>  CONFIG_PLATFORM_BUS=y\n>  CONFIG_ETSEC=y\n>  CONFIG_LIBDECNUMBER=y\n> @@ -56,7 +56,7 @@ CONFIG_SM501=y\n>  # For pSeries\n>  CONFIG_XICS=$(CONFIG_PSERIES)\n>  CONFIG_XICS_SPAPR=$(CONFIG_PSERIES)\n> -CONFIG_XICS_KVM=$(and $(CONFIG_PSERIES),$(CONFIG_KVM))\n> +CONFIG_XICS_KVM=$(call land,$(CONFIG_PSERIES),$(CONFIG_KVM))\n>  # For PReP\n>  CONFIG_SERIAL_ISA=y\n>  CONFIG_MC146818RTC=y\n> diff --git a/default-configs/s390x-softmmu.mak b/default-configs/s390x-softmmu.mak\n> index 6ab2bc6..444bf16 100644\n> --- a/default-configs/s390x-softmmu.mak\n> +++ b/default-configs/s390x-softmmu.mak\n> @@ -1,6 +1,6 @@\n>  CONFIG_PCI=y\n>  CONFIG_VIRTIO_PCI=$(CONFIG_PCI)\n> -CONFIG_VHOST_USER_SCSI=$(and $(CONFIG_VHOST_USER),$(CONFIG_LINUX))\n> +CONFIG_VHOST_USER_SCSI=$(call land,$(CONFIG_VHOST_USER),$(CONFIG_LINUX))\n>  CONFIG_VIRTIO=y\n>  CONFIG_SCLPCONSOLE=y\n>  CONFIG_TERMINAL3270=y\n> \n\nQueued, thanks.\n\nPaolo","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xwz3C3TzJz9s81\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 19 Sep 2017 07:02:15 +1000 (AEST)","from localhost ([::1]:38909 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1du3BE-0004EH-T4\n\tfor incoming@patchwork.ozlabs.org; Mon, 18 Sep 2017 17:02:12 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:40102)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <pbonzini@redhat.com>) id 1du3Ah-0004Cg-QK\n\tfor qemu-devel@nongnu.org; Mon, 18 Sep 2017 17:01:40 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <pbonzini@redhat.com>) id 1du3Af-0002qf-8N\n\tfor qemu-devel@nongnu.org; Mon, 18 Sep 2017 17:01:39 -0400","from mail-wr0-f174.google.com ([209.85.128.174]:52609)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <pbonzini@redhat.com>) id 1du3Af-0002qA-1h\n\tfor qemu-devel@nongnu.org; Mon, 18 Sep 2017 17:01:37 -0400","by mail-wr0-f174.google.com with SMTP id c23so1515126wrg.9\n\tfor <qemu-devel@nongnu.org>; Mon, 18 Sep 2017 14:01:36 -0700 (PDT)","from [192.168.6.6] (net-93-146-44-143.cust.vodafonedsl.it.\n\t[93.146.44.143]) by smtp.gmail.com with ESMTPSA id\n\tm138sm12435wmd.29.2017.09.18.14.01.33\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 18 Sep 2017 14:01:34 -0700 (PDT)"],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:to:cc:references:from:message-id:date\n\t:user-agent:mime-version:in-reply-to:content-language\n\t:content-transfer-encoding;\n\tbh=0gctEJv8BRa/88Rqz2wgiu4QBXipfWzBEQLPf9v9o1g=;\n\tb=l7ptCeazJK7mGaU0patOmhbBSdsS3k/UhKu/ndKAYjanoe2PPGlICoNOOr3gk1onQd\n\tTdJZp4rN8aZlDHwTZO20jdJ7mop+XR89Rhiy4UyabRfVr0xfnamDbbDilu7naW6HcEDx\n\th8Xgvk/uoZMjWPXHxpJQTQSLlRw3AH+zkiEgeTXdLksEAjR02YbQWHain+DnFL8JDDz/\n\tyEjvLeKi35nb0LgpoGyDh5/yV15vkSPW9CLrY1JqOCfnQ61hsrjBwOCZoKDDmNVHY3/B\n\th0P3O8RUzeOL5NUvHDiC3H9iJiBmxrYHM4xrtHshG3jiMrY0WOdX0g6Vw/t4rFOWf8Z3\n\tdORQ==","X-Gm-Message-State":"AHPjjUgBsxqejUvYxnRP20X0fV1o562D3gpvYq+QB9RxZH3DtbGrTMRn\n\tc15igkz4uccVyS7i","X-Google-Smtp-Source":"ADKCNb4OVMIa5ulO5Z6vglefGkqmwnUWTa1bXu4Kd/5D0tLWIdO7vB/CgOQ2dfWbqWEDG51S1fxTNQ==","X-Received":"by 10.223.186.6 with SMTP id o6mr27139023wrg.263.1505768495791; \n\tMon, 18 Sep 2017 14:01:35 -0700 (PDT)","To":"Thomas Huth <thuth@redhat.com>, qemu-devel@nongnu.org","References":"<1505759538-15365-1-git-send-email-thuth@redhat.com>","From":"Paolo Bonzini <pbonzini@redhat.com>","Message-ID":"<d49d661e-3663-988f-cba4-78878ef7b5b3@redhat.com>","Date":"Mon, 18 Sep 2017 23:01:29 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<1505759538-15365-1-git-send-email-thuth@redhat.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.85.128.174","Subject":"Re: [Qemu-devel] [PATCH] default-configs: Replace $(and ...) with\n\t$(call land, ...)","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Michael S Tsirkin <mst@redhat.com>, Cornelia Huck <cohuck@redhat.com>,\n\tChristian Borntraeger <borntraeger@de.ibm.com>, =?utf-8?q?Marc-Andr?=\n\t=?utf-8?b?w6kgTHVyZWF1?= <marcandre.lureau@gmail.com>,\n\tMarcel Apfelbaum <marcel@redhat.com>, David Gibson\n\t<david@gibson.dropbear.id.au>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}}]