Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1609920lqa; Mon, 29 Apr 2024 13:35:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW/Jzj0xBG9XHKQdWjD/G2eT7pn4dsOwK/rrgIJu1P5BhnPGtNQ8VQqkv8OImhgeSSkmPNHbSgizj/ijWTK115EunsEw2eIhbJhCxP5XQ== X-Google-Smtp-Source: AGHT+IEOvZ0sa5ewBOpf0bWFGXCPN8zCYHWVev8Ef1D9rmwcV1AYaMta5ozth8L7zis8dopHkCt/ X-Received: by 2002:a05:6a20:6a1e:b0:1ac:efd3:4d87 with SMTP id p30-20020a056a206a1e00b001acefd34d87mr1141051pzk.19.1714422904139; Mon, 29 Apr 2024 13:35:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714422904; cv=pass; d=google.com; s=arc-20160816; b=VEcWb7QaLoLpHExeNPEto2kXmVF/RUwxriwZiNUTrJgAN8Tzj3Om9WIum3hGZbN93i iARx9f4df//xjklTa3iMCMTH3licN42h3CBW2t0PE9obmap4XC8f8cmR0a3YSGdCWy3f iULB4hHVOXwrc2sD6vrsGUZZk8u+pmHpjOvYeoLvYNOOEEcjsr5+QAj+BCvPnCeMsGOk T+jkqziXE4t0TAbEaPZE0hC/eaVhhxwt6YXdusn/r9DP5hkyNr+66+6FjoyEdhinvHiZ elRyFXOdBS9icotX1gKXDkXbTY98163/179YlRCtnlojJkla7CSMAKaJZqeYgLiyuynF +kFw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature; bh=9mL2eooEb/7s/U1rMU577fBDSrTqCDNk48ffx+zYIGY=; fh=HA7CCNCzS43dKHluxvCFPTyHW3yqZp/obTjpjC++fo0=; b=cWJYfq8dH+u0l+1yqickTa77liKMu2nuU6cm1Ghuw98YeZtOkfK0v/CxPMGvZBHyHk 11wPNq9ERCoHY3p/glUotkHhMgbft53sE0VQ8ohL1d7jOTZwFMbE83wtL3FY0swBmMKz JuZdADK+u8oOIVsG02rig+MTHKO/5YGm6OPKdqZICjE+pPoBcW/d9VMsw/YMPuD9RwiK U4dcRJAZOjdMgl2rRKoxhDy9G97CPKYoTT4EcgOadEHRB43Fy0u7mWP+5gGwejt8bHfp cTRlm7YmaT7104fxn+YUZON0Rh0gWlXv3itpUDagAAOIPH8dflGkGDw4w45KBR0Jy7Sy /eaw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=rRHtzS5D; arc=pass (i=1 spf=pass spfdomain=flex--edliaw.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-163019-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163019-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d1-20020a656201000000b005e456ae53cfsi20926117pgv.178.2024.04.29.13.35.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 13:35:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-163019-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=rRHtzS5D; arc=pass (i=1 spf=pass spfdomain=flex--edliaw.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-163019-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163019-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5FFEF283C31 for ; Mon, 29 Apr 2024 20:35:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B942317799F; Mon, 29 Apr 2024 20:34:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="rRHtzS5D" Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A6777177981 for ; Mon, 29 Apr 2024 20:34:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714422898; cv=none; b=o9SjbAWuuwC0s/6dDfaXpRxlTfPA4uDUC6cXX7hNnnirLHtHEeGifXw4Om1nTVF2hpcINKSI3s944M8gFodYiHZl3tGV2kJioddo+HeG/MwRr+oxJ/nVSqnlkmTDqPpaBq/N4ZREyrJH0qVDK1nYJTJmPgRxbv+nGNZLQBFjVoE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714422898; c=relaxed/simple; bh=FJgJcexbKP8Vs2qsQoifsZ/CG9oPAv6wyYJlV8ROmx8=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=sVsCwHqcV+LDQzaNMUUBy3R3stts1roqagDAfXsfzPtEfZF1/WS76fbgy60dppxbyM+i1kBWLpnioF2Uv3NFUpDzImzRa9DL4LokVsvIifDBwyesLW5lFEBv20zLEOZ2F1H9Rueb5wKdoLqCbmUt9kwjT/kYTPvA+GpvnG8HxhU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--edliaw.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=rRHtzS5D; arc=none smtp.client-ip=209.85.128.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--edliaw.bounces.google.com Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-61be621bd84so7438407b3.1 for ; Mon, 29 Apr 2024 13:34:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1714422896; x=1715027696; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=9mL2eooEb/7s/U1rMU577fBDSrTqCDNk48ffx+zYIGY=; b=rRHtzS5DKoAvUBeyaR31mxITXw3nPvaA9s/KkfoY+1nmJxgVjCho2A7gtn054OzBls kLVLeDfurj0Sd/csvARq7ngl5VIOZM3uMKMqePHjrfQWPAyyOE4FOmkYZybFvyp2KOHP 2WqwUblr73UPLq8s1t+TH52Ayves+cfnKK/NEoOFuU8ctzpF8/+cRS+TVYZCSwW7chE+ tUvO73/RwCtz9qOoquC1hWIND2mgnj6/48KuALuOWZC+yrqbGJZgtyF5i7yM3ZUNjTc3 9u2dQyQ0z/Cc5oPDzsuw//2kcjGp+lly/OtslHf2bX/7802wQMr8vlr2J8/JFiY71mir hL2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714422896; x=1715027696; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=9mL2eooEb/7s/U1rMU577fBDSrTqCDNk48ffx+zYIGY=; b=KsAOxMe2Q67xpazySXgalW1X4dfNSrvherIjxnjp2U//KVfmAxI5ovzu0P522m8vKT nG6o6+hYEL7xFaLfVRTTlDad6uEIqa7dwhgX8fmB+7JOEqZH5RLb/gJHRC/nNvAY15g2 eZoRX597Td4F4DhL56OHwN9uVIHbqeZSj5BULDCdw9CHOSiyIv8YAhr8ZmrkKAJOELL/ Cb/xK/5Fxnd/3MjHxpRiAzScq+0OAuFUepNqoOJK7plk5awifKbsokDykx2/fpB8+qfW lHRiZc24pBhgdc5bHOiX54Nziqmv+xI4z4+32yd+l25jIx/LKejcEhL5x7/217TU+of0 wQuw== X-Gm-Message-State: AOJu0YxMWnUAZaMZLj47aiksZHjuYI7MoEb91rVlA0AyOHB3Ac9r5jaj 4J7YNUarsDA5Y0WB27m3MXUn38P0NGGXYdMahmj8HzUrljUcHD6NIM2ZNoswtLZswfA/kx+KD69 CMSEUEmrDljPsk4SBN9FenNzBcb/xnpp6j8t3QjVZTbHzsSQ/G6emOKx6XcP83OoxLZvro80D0i gYB8prhSBVGrKfQCXXugCvPiMhHqtmHyYFT4CXr/Ba X-Received: from edliaw.c.googlers.com ([fda3:e722:ac3:cc00:24:72f4:c0a8:305d]) (user=edliaw job=sendgmr) by 2002:a81:a142:0:b0:61b:a123:1c53 with SMTP id y63-20020a81a142000000b0061ba1231c53mr168083ywg.4.1714422895519; Mon, 29 Apr 2024 13:34:55 -0700 (PDT) Date: Mon, 29 Apr 2024 20:34:36 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.44.0.769.g3c40516874-goog Message-ID: <20240429203441.143607-1-edliaw@google.com> Subject: [PATCH] selftests/vDSO: Fix assignment in condition without parentheses From: Edward Liaw To: linux-kernel@vger.kernel.org, Shuah Khan , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , "H. Peter Anvin" , Andy Lutomirski Cc: linux-kselftest@vger.kernel.org, kernel-team@android.com, Edward Liaw , llvm@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Fixes clang compiler warnings by adding parentheses: parse_vdso.c:65:9: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if (g = h & 0xf0000000) ~~^~~~~~~~~~~~~~~~ parse_vdso.c:65:9: note: place parentheses around the assignment to silence this warning if (g = h & 0xf0000000) ^ ( ) parse_vdso.c:65:9: note: use '==' to turn this assignment into an equality comparison if (g = h & 0xf0000000) ^ == Fixes: 98eedc3a9dbf ("Document the vDSO and add a reference parser") Signed-off-by: Edward Liaw --- tools/testing/selftests/vDSO/parse_vdso.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/vDSO/parse_vdso.c b/tools/testing/selftests/vDSO/parse_vdso.c index 413f75620a35..b9cf771006da 100644 --- a/tools/testing/selftests/vDSO/parse_vdso.c +++ b/tools/testing/selftests/vDSO/parse_vdso.c @@ -62,7 +62,7 @@ static unsigned long elf_hash(const unsigned char *name) while (*name) { h = (h << 4) + *name++; - if (g = h & 0xf0000000) + if ((g = h & 0xf0000000)) h ^= g >> 24; h &= ~g; } -- 2.44.0.769.g3c40516874-goog