Message ID | 20240408174929.862917-7-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:adf:fb4d:0:b0:346:15ad:a2a with SMTP id c13csp162wrs; Mon, 8 Apr 2024 10:51:18 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWKxhXtz5NdMQB0LUtVtjAC9hyWAiqyEPfRYLhHCkgvNNYvkGxI1LLMLzZFy/dVwHR4qgaiH+wS6mr31xkcE59n X-Google-Smtp-Source: AGHT+IH5LsfvDRtPzWZ4nmsbiaqGdBE7PYET0KVSgRIrw+4YQLGw/5N0wnDsS94Mv3js9ewXS10w X-Received: by 2002:a05:6214:2465:b0:699:d07:cf22 with SMTP id im5-20020a056214246500b006990d07cf22mr701771qvb.31.1712598678698; Mon, 08 Apr 2024 10:51:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712598678; cv=none; d=google.com; s=arc-20160816; b=iHs2ySvgLy96WdIZcT0N6X76XN75yMeoGtHqnspCD1ZdgE27D0qTdeJIK47WG4O9Zo QGxu5bXi+Wg7GvzW8G6CyuFIWaRuNi+Y5bLhr/Z6Z2acnUtfqFouDNmvtqQ/z9Nebcpq 1NmyL1tD8fqUpvvdk+6x1WrBQ1GSa3tODWPV/yHx6Eoy2kC3i/0IT/WPjgZY9WvWXYIl 1b3M5tyMSV1aTc9rNjSh18V74h0cpx51DnoysGSMb/K/Rphv8SdSZzBSU6qxUDMy3/qz Mh0Kiu5mbi+ue/8JqksUqNd4rG66ytKj4UdQqkSukVPGM0IkgtOcLiilVybkY+RNg+07 QXOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/Qew14nZN1wX0iqwNUmvetvShYAajmyZbQ1f420VzBg=; fh=stWDERV0X+fGADjSDb+zJwQg8mFVbbU8pKGYcikE+Mc=; b=REuOwPwlDd+SF76bVM+4nVp1fqonY5DNl7ZcwQAvuem/QDK9P5LiMdJUQFT/JE53/K H3En/S1fsbVyW97wjYEeGo1X9kfroHrFez1T082CGVmLm/NhMvQ0bZFHnUz9ETGrhJL7 51M6RiO81ik46P71I6ULhsltYw9N+taif3obr3Fo7vrVvYjtUVKl9KLMpVV+mK/Xq/9H L2QbDo6PmesCCz/dJMNCLzE44WuR8/9/xDC4ibXg5cnwzl19sW4A1lj6m/ykDiAkjKnw OO0ZQ2PspmlhyIzed4leeS3X/U3ooE4WO9UE6phnM8Jkfio8O0v8xXRX6dbd+BQWM0MS pWkg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iwHzkw4p; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id df4-20020a056214080400b006993cf9f188si8470004qvb.486.2024.04.08.10.51.18 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 08 Apr 2024 10:51:18 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iwHzkw4p; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1rtt7u-0001y5-9h; Mon, 08 Apr 2024 13:49:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1rtt7o-0001vF-LP for qemu-devel@nongnu.org; Mon, 08 Apr 2024 13:49:47 -0400 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1rtt7m-0003cX-3N for qemu-devel@nongnu.org; Mon, 08 Apr 2024 13:49:43 -0400 Received: by mail-pj1-x1036.google.com with SMTP id 98e67ed59e1d1-2a2e5d86254so2843431a91.1 for <qemu-devel@nongnu.org>; Mon, 08 Apr 2024 10:49:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712598581; x=1713203381; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/Qew14nZN1wX0iqwNUmvetvShYAajmyZbQ1f420VzBg=; b=iwHzkw4pzzQ7c3GDiaxYPb5tT+v8uc9OVBQ7450iPDqc5vrBueaIdzuFRCV3pz7Mmo 9eyAUXretJDJXn425r8/rBpbc6bC2VGpK0awp/C+CgyhYSdZOQXVStdWIX5qk2cxJmEi 5QHeWqD83XXWfuLoRYpDVeOp90D6d5PWpXD/lmJzJmnPWzj6XPW5id430+oHAD1stZ/j EKewZuYz0tUADq58rcC2qapdZHhjkOkQ9k384r/wtY5P/bIbFWa4Jnpp5LxUL1IB6V6D 9xUcV9vgDJ164jaw40lRqG6RbOkIhfzOOAm+1sD4FrBBfUuQloaGYkxmiORqSuXTY6Yy VPdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712598581; x=1713203381; 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=/Qew14nZN1wX0iqwNUmvetvShYAajmyZbQ1f420VzBg=; b=kqLtlnznakzJFhpETOZwSHsTavMhVKAES743hxRa3bjEoLV579o8n+HQUh3vO0nrxd PpECH9LyXdsktLe21qcvaZeldCjJrpVsrHmJ6t8UjHMi9kYDFAm1PpEtZ2csHtq45225 Xs8xemO3lRl89UzRU8rMRSq6OVSrYAJqD1VqH4OeMQwq+0o/z0RVIz+DNAukKh1FCmAo IiVAdpWhobyVRgr8xFZEV0djI8hYvjE9rZM7YmU0g/KL+OXa4PxVb6I64WTbpRjE5+88 7oLaabyOUxBpuZRCOs6SllZcw44GWs6razDbFM3Sdnp9Ctq29k3UCuKbRdoHYrIhu5/E a6eA== X-Gm-Message-State: AOJu0YzA0ygR2lyIRRTuSj0cYVbxDLgdGBc/hEBNfG4uVlJi9MvWzNQt FOtkSgUlWWr1C0R2QKcZAoLXmurI10DlGoHmCKl8iE0GMsWcibq8KC91b+TTvUFxNxFaWMNQkFo 1 X-Received: by 2002:a17:90b:4c12:b0:2a5:242:6761 with SMTP id na18-20020a17090b4c1200b002a502426761mr487799pjb.23.1712598580721; Mon, 08 Apr 2024 10:49:40 -0700 (PDT) Received: from stoup.. (098-147-007-212.res.spectrum.com. [98.147.7.212]) by smtp.gmail.com with ESMTPSA id ga15-20020a17090b038f00b0029c3bac0aa8sm8658432pjb.4.2024.04.08.10.49.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 10:49:40 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Cc: Michael Tokarev <mjt@tls.msk.ru>, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org> Subject: [PULL 06/35] linux-user: do_setsockopt: eliminate goto in switch for SO_SNDTIMEO Date: Mon, 8 Apr 2024 07:49:00 -1000 Message-Id: <20240408174929.862917-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240408174929.862917-1-richard.henderson@linaro.org> References: <20240408174929.862917-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::1036; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1036.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://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>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
[PULL,01/35] tcg/optimize: Do not attempt to constant fold neg_vec
|
expand
|
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 1fedf16650..41659b63f5 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -2301,12 +2301,10 @@ static abi_long do_setsockopt(int sockfd, int level, int optname, case TARGET_SOL_SOCKET: switch (optname) { case TARGET_SO_RCVTIMEO: + case TARGET_SO_SNDTIMEO: { struct timeval tv; - optname = SO_RCVTIMEO; - -set_timeout: if (optlen != sizeof(struct target_timeval)) { return -TARGET_EINVAL; } @@ -2315,13 +2313,12 @@ set_timeout: return -TARGET_EFAULT; } - ret = get_errno(setsockopt(sockfd, SOL_SOCKET, optname, + ret = get_errno(setsockopt(sockfd, SOL_SOCKET, + optname == TARGET_SO_RCVTIMEO ? + SO_RCVTIMEO : SO_SNDTIMEO, &tv, sizeof(tv))); return ret; } - case TARGET_SO_SNDTIMEO: - optname = SO_SNDTIMEO; - goto set_timeout; case TARGET_SO_ATTACH_FILTER: { struct target_sock_fprog *tfprog;