From nobody Mon Apr 29 11:49:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.47 as permitted sender) client-ip=209.85.128.47; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f47.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.47 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com; dmarc=fail(p=none dis=none) header.from=amsat.org ARC-Seal: i=1; a=rsa-sha256; t=1641301341; cv=none; d=zohomail.com; s=zohoarc; b=OmY5xu4geb3TI3F4cVEau1mXKEbjexK3HlU07rFU4N7aZcX4zmwDiTQ34hs/6+slEYt0xAXOPP4xwjV6Gm9j/s84e5op+0irj/KiwPAZkefB+ykl1Dx2CVAj1IG5hAMaDHjf6VtKw0w4kUrtSj7oLLhuKQ86uNJra++wsPQtwB0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1641301341; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Sender:Subject:To; bh=Q7ES0GF02cXzslgykTZ9t4FabduIAKBz+ch9l0nNhZQ=; b=AbQs6Imrzpb+IzU4y6ErV+u7hwJhFk47iRlhfMFlV6oTwMcBZPY/YI+cpcjSLh2XQQ7o2Ql4YGMReWJQ7o7ITkOCHE4dgWh71LPDOK38087wdMkg3IYqTvxx0nDd7KOLhp7QQ7oW/OOelSzGGj8/ahhm4zQmkaM4n82UuzGeyvU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.47 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com; dmarc=fail header.from= (p=none dis=none) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by mx.zohomail.com with SMTPS id 1641301341197175.25984407949238; Tue, 4 Jan 2022 05:02:21 -0800 (PST) Received: by mail-wm1-f47.google.com with SMTP id n19-20020a7bc5d3000000b003466ef16375so555403wmk.1 for ; Tue, 04 Jan 2022 05:02:20 -0800 (PST) Return-Path: Return-Path: Received: from x1w.. (83.red-83-50-87.dynamicip.rima-tde.net. [83.50.87.83]) by smtp.gmail.com with ESMTPSA id p15sm35685916wmj.46.2022.01.04.05.02.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jan 2022 05:02:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Q7ES0GF02cXzslgykTZ9t4FabduIAKBz+ch9l0nNhZQ=; b=NSO/s+bxDzTWvPPsjlZ+YB+b7WNjFufOHyZR1aKS+EW7FfmIv0mPsVAdWnujvgV4DQ zbC7MCdPTSgc9cLD3rRyUdFoU7lOOXytHrHbAtSzT9dTFGkxNTcjb1HBAoooeBDHazVh DARs1bqAFQP2mTNEdKqeDUXL7fbuy0BI9nrXSqcd/YcGKMAdjy5WcVUJlK7cJYPr+7zO seMWUEoli17l0CUOvhvzTA6j3HbCTDQMZsYkXm0VfjWKvzDdXnO9I+Wu37Ymy1Y8ph6R 6QwKN5s3CvIWtUhDzZkYlMOKDDkNGDYjV9ctdR+G710YLI8/H5K/52xyb0D9L+TvR2p3 aTYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=Q7ES0GF02cXzslgykTZ9t4FabduIAKBz+ch9l0nNhZQ=; b=J7NaQBQEdT9iq9vBmXFGdWQia2dxYCJcHSbkvt+ZK5OPfJydj5jxHQqqNL9SdFP6h3 ifBDfH3/8NwgP65t8ghw+MZBxY/RCrpY/8tm/rCPuannn98COPIWCtHf0OXoQ3N51Ku9 MhjxKBuJpA+hhqm1l3tcdayrg1Ahos2y0Su4HC1CH26enYiq7ia/cB48+yGbmgUG1V4d bg637FG+o5ZPxmwaIjxLYLZNVYxdYgMLzM8s9ZQux2dpiKz+DXGttih2fIlAP1CuT7U5 ynwACz8RFmWxGERqM6L2guYqjE5xA/cMC5NWzbC/X+NzTmTQLF19Kk14pA/WLUrUIm2k 0G1w== X-Gm-Message-State: AOAM533IpHuRNgxF57MOhKuRY/DZt/T2K+rdACY3mqkcSJMfqNttZlVF TBtmBKs05CEILTquy5t0zG0= X-Google-Smtp-Source: ABdhPJxsEKjdqFJTiT/nXDncszfyzuHfYvUUoneVi4O9kULm0dJaesf/ER3NUo8d9PnlN5yjXTfnHQ== X-Received: by 2002:a05:600c:4f46:: with SMTP id m6mr35883542wmq.19.1641301339383; Tue, 04 Jan 2022 05:02:19 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Laurent Vivier , WANG Xuerui , qemu-trivial@nongnu.org, Michael Tokarev , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Song Gao Subject: [PATCH] linux-user: Fix trivial build error on loongarch64 Date: Tue, 4 Jan 2022 14:02:17 +0100 Message-Id: <20220104130217.2144929-1-f4bug@amsat.org> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1641301348035100001 When building using GCC 8.3.0 on loongarch64 (Loongnix) we get: In file included from ../linux-user/signal.c:33: ../linux-user/host/loongarch64/host-signal.h: In function =E2=80=98host_s= ignal_write=E2=80=99: ../linux-user/host/loongarch64/host-signal.h:57:9: error: a label can onl= y be part of a statement and a declaration is not a statement uint32_t sel =3D (insn >> 15) & 0b11111111111; ^~~~~~~~ We don't use the 'sel' variable more than once, so drop it. Meson output for the record: Host machine cpu family: loongarch64 Host machine cpu: loongarch64 C compiler for the host machine: cc (gcc 8.3.0 "cc (Loongnix 8.3.0-6.lnd.= vec.27) 8.3.0") C linker for the host machine: cc ld.bfd 2.31.1-system Fixes: ad812c3bd65 ("linux-user: Implement CPU-specific signal handler for = loongarch64 hosts") Reported-by: Song Gao Suggested-by: Song Gao Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: WANG Xuerui --- linux-user/host/loongarch64/host-signal.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/linux-user/host/loongarch64/host-signal.h b/linux-user/host/lo= ongarch64/host-signal.h index 05e2c823717..7effa242515 100644 --- a/linux-user/host/loongarch64/host-signal.h +++ b/linux-user/host/loongarch64/host-signal.h @@ -54,9 +54,7 @@ static inline bool host_signal_write(siginfo_t *info, uco= ntext_t *uc) } break; case 0b001110: /* indexed, atomic, bounds-checking memory operations */ - uint32_t sel =3D (insn >> 15) & 0b11111111111; - - switch (sel) { + switch ((insn >> 15) & 0b11111111111) { case 0b00000100000: /* stx.b */ case 0b00000101000: /* stx.h */ case 0b00000110000: /* stx.w */ --=20 2.33.1