From patchwork Mon Apr 3 11:56:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Bugaev X-Patchwork-Id: 67210 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A8BFC3858439 for ; Mon, 3 Apr 2023 11:57:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A8BFC3858439 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1680523064; bh=Tx6inOHfTWCI1Kr/rUzW8HUxHKhHHBl+7tXH0jpmF3g=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=u5PEBFDBPw3wxLn3IxQAHx5we6jqZlgZ/YFpNMSEjAqS5L2ZNsomh7SuzSzQ8jlQn CczyKayzYcUz1ARK/JiXxMrS4heNPyInsXR+InDhQfIVhZ8yH5xGV9aLZYx4choGrY Bi2AN7njnIJXgUagDKQo5cbglouzHbrXsOEcTrQM= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by sourceware.org (Postfix) with ESMTPS id E5E283858D39 for ; Mon, 3 Apr 2023 11:56:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E5E283858D39 Received: by mail-lf1-x135.google.com with SMTP id g19so24612497lfr.9 for ; Mon, 03 Apr 2023 04:56:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680522997; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Tx6inOHfTWCI1Kr/rUzW8HUxHKhHHBl+7tXH0jpmF3g=; b=SbFrSWI23dhb/QyVQ8+3k6KXBZThzcp55RLuyPkEZyBAsqh+z48FIlgLq8EAMtlNby rCWdEQHq/ZnatbRyZlIt6VTsFYqVMskwNYuvRpUV4nfQUnkzB17PX5znUJWq8sfbGY4V T9VqfmfsNbI+cDBnLEED4Oa3q+msxmv5Vh0DCV4A5NsJKVWmWHmr3AA1g0m04o+nUXxG cfXG8J0V0rMF6S4UIxXQBNRn4qxEwHb7pxxd+FxtCJBnLBF9sc9ACH85a3OqYIfCBRj+ IizIe9sxONvYDeMvdw4yIghgq4YLDI6lkIVVdKZt+IOypeO2nd/zvcDAjSllDPK03hIk ZlfQ== X-Gm-Message-State: AAQBX9dWcUgRFycxKndMuEWs3KvMXAEcsxg9EUdy1MZI6VF/0r60JJYD Rkl5E6Vz8uIPUhLsLlNTzpD4wNW1SP0= X-Google-Smtp-Source: AKy350aHebqpO6kCWNVjTQF1fhUhJryc+E1yfyV0LYTJzt1E9KlDwWB/gNPYmrw+BXWAdZ6dCTTrbQ== X-Received: by 2002:ac2:5287:0:b0:4cc:a107:82f4 with SMTP id q7-20020ac25287000000b004cca10782f4mr10311223lfm.64.1680522997257; Mon, 03 Apr 2023 04:56:37 -0700 (PDT) Received: from surface-pro-6.. ([194.190.106.50]) by smtp.gmail.com with ESMTPSA id q7-20020ac25147000000b0048a9e899693sm1752524lfd.16.2023.04.03.04.56.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Apr 2023 04:56:36 -0700 (PDT) To: bug-hurd@gnu.org, libc-alpha@sourceware.org Cc: Samuel Thibault , Sergey Bugaev Subject: [PATCH v2 18.1/34] hurd: Do not declare local variables volatile Date: Mon, 3 Apr 2023 14:56:20 +0300 Message-Id: <20230403115621.258636-2-bugaevc@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230403115621.258636-1-bugaevc@gmail.com> References: <20230319151017.531737-19-bugaevc@gmail.com> <20230403115621.258636-1-bugaevc@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Sergey Bugaev via Libc-alpha From: Sergey Bugaev Reply-To: Sergey Bugaev Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" These are just regular local variables that are not accessed in any funny ways, not even though a pointer. There's absolutely no reason to declare them volatile. It only ends up hurting the quality of the generated machine code. If anything, it would make sense to decalre sigsp as *pointing* to volatile memory (volatile void *sigsp), but evidently that's not needed either. Signed-off-by: Sergey Bugaev --- hurd/trampoline.c | 2 +- sysdeps/mach/hurd/i386/trampoline.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hurd/trampoline.c b/hurd/trampoline.c index 5bd8dec9..1447b13f 100644 --- a/hurd/trampoline.c +++ b/hurd/trampoline.c @@ -29,7 +29,7 @@ struct sigcontext * _hurd_setup_sighandler (struct hurd_sigstate *ss, const struct sigaction *action, __sighandler_t handler, int signo, struct hurd_signal_detail *detail, - volatile int rpc_wait, + int rpc_wait, struct machine_thread_all_state *state) { #error "Need to write sysdeps/mach/hurd/MACHINE/trampoline.c" diff --git a/sysdeps/mach/hurd/i386/trampoline.c b/sysdeps/mach/hurd/i386/trampoline.c index ab67fb9c..9cd60b9c 100644 --- a/sysdeps/mach/hurd/i386/trampoline.c +++ b/sysdeps/mach/hurd/i386/trampoline.c @@ -83,13 +83,13 @@ struct sigcontext * _hurd_setup_sighandler (struct hurd_sigstate *ss, const struct sigaction *action, __sighandler_t handler, int signo, struct hurd_signal_detail *detail, - volatile int rpc_wait, + int rpc_wait, struct machine_thread_all_state *state) { void trampoline (void); void rpc_wait_trampoline (void); void firewall (void); - void *volatile sigsp; + void *sigsp; struct sigcontext *scp; struct {