From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8BE0DC432BE for ; Thu, 2 Sep 2021 16:01:30 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 41B11610A4 for ; Thu, 2 Sep 2021 16:01:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 41B11610A4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:47432 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mLp9a-0000db-MJ for qemu-devel@archiver.kernel.org; Thu, 02 Sep 2021 12:01:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55830) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mLp0F-0004N5-S6 for qemu-devel@nongnu.org; Thu, 02 Sep 2021 11:51:47 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:51267) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mLp0D-00052A-Um for qemu-devel@nongnu.org; Thu, 02 Sep 2021 11:51:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1630597905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zzmyjxl2fURor1msLQ2OsJ9gkwOPAMYczafXgfPcr+E=; b=Bm4+z7pjdMmjOi7JQMvMmi8jcUgqROhzXK7XRjd2jl7uVKbpeZFYs5I+jI715c4nDeHyUb Wz4aJkn/NFFWK2rSdFBnhAZyRZcw6V3i56jKiYLqgdvVYaxd4jQ6OhKwa8hNat/1xdpERJ /gfKNQ30+fs4E3ex4tAe8OI5BPrBB30= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-526-0qiD3VpbMRuiVaJjrh5gGA-1; Thu, 02 Sep 2021 11:51:42 -0400 X-MC-Unique: 0qiD3VpbMRuiVaJjrh5gGA-1 Received: by mail-wr1-f71.google.com with SMTP id h15-20020adff18f000000b001574654fbc2so698263wro.10 for ; Thu, 02 Sep 2021 08:51:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=zzmyjxl2fURor1msLQ2OsJ9gkwOPAMYczafXgfPcr+E=; b=TypN6rnaFiPcMuaOPkL+2NUHUGshHLVjnIhnL5wWgK80nO7HWPCiEtykzg9i6dxsFj JrJN3bonkEGQb6mqeqvMpl7RADk0o/kt+9cIWTL0FVyDkEF5dwtM3qW6Vgia4gGXcSsX ympwEbKA5nIhzkSWJNdwcdKQWz+XIKoaFjc6smmNIaHNBbvB3/OGlGJDtDwB3TDtzlND YZszDLT9dGEJQWIAzTxw97PrEHQ2byrs2ygGzMzucgHIenrDfI8+WSQKdBPvGtKarMO7 13Y+daQ4hNecP0rQj6jyX4ZdkH6dPrzGgKu1ceQEc711rjtHdJpVqQf4DGe7osmH2Q2V id3g== X-Gm-Message-State: AOAM530GJqFMVZX9B+1W7f0E2hY10sZUqZ10zEoYw8QsfpzilJizP9Bv 3tTQUmMBtVQ9ay+7GWjfQSTgX3x/TYL9CSx3n1jlebrT8H5LMD65KuHi2W2pG23o8OW7rleWZs7 m8LbuIoZ6rIXxyOg= X-Received: by 2002:adf:d4ce:: with SMTP id w14mr4583282wrk.407.1630597901076; Thu, 02 Sep 2021 08:51:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJys8v7lD0Py6s4ACJkv9hd7Cc3yKJOOZMWpdj4Ko09f+7/HRKJyaNFlHTBgT8dsUyFs5seeyg== X-Received: by 2002:adf:d4ce:: with SMTP id w14mr4583265wrk.407.1630597900913; Thu, 02 Sep 2021 08:51:40 -0700 (PDT) Received: from ?IPv6:2a01:e0a:59e:9d80:527b:9dff:feef:3874? ([2a01:e0a:59e:9d80:527b:9dff:feef:3874]) by smtp.gmail.com with ESMTPSA id e2sm2068791wra.40.2021.09.02.08.51.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Sep 2021 08:51:40 -0700 (PDT) Subject: Re: [PATCH v2 30/35] acpi: arm/virt: build_spcr: fix invalid cast To: Igor Mammedov , qemu-devel@nongnu.org References: <20210708154617.1538485-1-imammedo@redhat.com> <20210708154617.1538485-31-imammedo@redhat.com> From: Eric Auger Message-ID: Date: Thu, 2 Sep 2021 17:51:39 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210708154617.1538485-31-imammedo@redhat.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=eauger@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=170.10.133.124; envelope-from=eauger@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -53 X-Spam_score: -5.4 X-Spam_bar: ----- X-Spam_report: (-5.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.39, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-2.225, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, drjones@redhat.com, qemu-arm@nongnu.org, mst@redhat.com, shannon.zhaosl@gmail.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 7/8/21 5:46 PM, Igor Mammedov wrote: > implicit cast to structure uint8_t member didn't raise error when > assigning value from incorrect enum, but when using build_append_gas() > (next patch) it will error out with (clang): > implicit conversion from enumeration type 'AmlRegionSpace' > to different enumeration type 'AmlAddressSpace' > fix cast error by using correct AML_AS_SYSTEM_MEMORY enum > > Signed-off-by: Igor Mammedov Reviewed-by: Eric Auger > --- > CC: drjones@redhat.com > CC: peter.maydell@linaro.org > CC: shannon.zhaosl@gmail.com > CC: qemu-arm@nongnu.org > --- > hw/arm/virt-acpi-build.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c > index b88ea4b70a..a07540affb 100644 > --- a/hw/arm/virt-acpi-build.c > +++ b/hw/arm/virt-acpi-build.c > @@ -361,7 +361,7 @@ build_spcr(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) > > spcr->interface_type = 0x3; /* ARM PL011 UART */ > > - spcr->base_address.space_id = AML_SYSTEM_MEMORY; > + spcr->base_address.space_id = AML_AS_SYSTEM_MEMORY; > spcr->base_address.bit_width = 8; > spcr->base_address.bit_offset = 0; > spcr->base_address.access_width = 1; >