From patchwork Wed Feb 28 12:53:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 207852 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp3330037dyb; Wed, 28 Feb 2024 05:04:57 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVGE8KUnqc8Ppn8Cl5/RLssuo5vwCXXsdAQl+rNVKuTVr7bPR8qCh3vwYYYlfT+sDASizrHQZinfW5gj5VZioCXnz6oFA== X-Google-Smtp-Source: AGHT+IF+ussLPM4dcxpmDkvnLYeCKUbildKGGHnHKsBgiraMvH+z7itD8WDmX+RdZCQTSpcZymcD X-Received: by 2002:a05:6a00:2d02:b0:6e5:4956:998 with SMTP id fa2-20020a056a002d0200b006e549560998mr5790603pfb.2.1709125497273; Wed, 28 Feb 2024 05:04:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709125497; cv=pass; d=google.com; s=arc-20160816; b=eEtUYkveNLJBI8tfJX3RJP32fFjwR2KkJibIFlN6StgXDZf/jn7adgOa4AUu9fq279 hnsrHGJaUVCe+pR48qvYZasheGK3cH6Y0nbH5Sh1E2UwjJRLUcrh28+b2pDHPFMmn3vi M7U5b3C11dAjIqCx8iJP1lPjZE7xxW42U8VZDv/g17j9dTAAchD5EpnJ+FSMMWKqyUgy MpPcW3hgd1WgkKegGy1Kx+sVZiFdvaeztZNklb7SbGkIWQ3l1hNSkzulvFWwZIgdBxli mPgbxvv6ckTlV82ZUmdFd5X3QMF48f2PEDh6xGemUhCYqDq0XPhIXgAjVkHSt3Zn+qnA PtMw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=4zx4JZGkklQTdrU2XSkaUDyw5tTHTirZv7mYq6dRHUI=; fh=eJffXdLhGAx2sH4NyosmxBFSuBTpAz4/9NwqJRpB6kg=; b=a8ytXsg3sgdqSmZzsEgv1yw5yXKYLLQ7kiY3uKq0aRZPRA0j1cjRSFoTS4JgL3vIa5 P2Zwm6wa1yQy+fWVAimL3lMR4cCU1SCPh+24YTRGtCpO5e4JKtHYF9cuZWoTwFNvqcmM tStJkhBd1/3a0xata6geQSOflQVy3gBVGAuoOikudIDska+goaF2e5XzRXc0bQzFvv5g ci/7k3jYpRTBoONH5LL78XYu2SfbP6IsTEDAshpeyYea3JHDFTCXxUjvyIP3NacL6MQe ZXiZGf5cxHimBbBAOYV2wKImzV3FzWK8Gtzfoxny0yc9zbwJOtJHHGAgA0eb+BqsuPTD eMZg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=jL2HWUs5; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-85042-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85042-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id m10-20020a056a00080a00b006e50d5486f6si5948740pfk.94.2024.02.28.05.04.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 05:04:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85042-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=jL2HWUs5; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-85042-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85042-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id CD97DB20D64 for ; Wed, 28 Feb 2024 12:54:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 85462151CED; Wed, 28 Feb 2024 12:53:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="jL2HWUs5"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="eypl/HHr" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 50D07149E01; Wed, 28 Feb 2024 12:53:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709124807; cv=none; b=rJjKNI52mXJ3RBfqiXmnc4B8t+KfD0X0J9yhL+SJAeGiz+FoJsFZscng9yrdt31H+sHRAdbXaIt0xsot8Ml6Vn5T4yazcrabo3EEadglcgi7mFii8MI3nqZENrLijiP9i+tbl7ihGX47KDFRGmIR71QpbAa1cvksMmV1M3FKsuA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709124807; c=relaxed/simple; bh=unfqZidumn24iXVPy4auOrLTeuT97RoLN9DRHqzjL9c=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=XzrTNyF6IcFFcnUlFAwkZuKOOvNk7j0I+FBvNs14mk7vQH/bUdEWHViuOWy+nNHnsEWfX0Lkf0vgwDn7anUloUGpUv7apU4WK9XFHxgO4N45qXMA8Q+h98+jF1k+LlLLMTp0JbJMq1wBoIFGgrq2T408idrJKIfhbU7H2+rGamw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=jL2HWUs5; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=eypl/HHr; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Wed, 28 Feb 2024 12:53:23 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1709124804; h=from:from:sender:sender:reply-to: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=4zx4JZGkklQTdrU2XSkaUDyw5tTHTirZv7mYq6dRHUI=; b=jL2HWUs5ijgUGFqYIavQ/ekelFWFTRDjE4gvsH56h3yothgcrIofjKFlyEf0JjPrE3OV4i mx4b7ch0dEbT1Ah9tOGNZk1O72TYqBmkGFm6x74ir4D/izyz+xyFDj0Ml8gCQDuX7Fon0a NlFY/zZa5hy/2RRoFqgUqSJBvwvWNv4F+GYQBcUcweEKCgCKTtX5RaJCeLRONDc/QlBF78 ubH0Z1KAUeK5zIdBxfva1i4aJrJRmdlRg/Qz6kxPvB5NVGKbvCfkYFWTWJfS2K7q1yKyQ4 YoIUH/R/3UdOpoogCdjgwNaCdsdHSMxVuZKWuA4hEpOJznrnKgrVx3WpSt1pyw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1709124804; h=from:from:sender:sender:reply-to: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=4zx4JZGkklQTdrU2XSkaUDyw5tTHTirZv7mYq6dRHUI=; b=eypl/HHrp9IBmlcd80AcazRYuvW4Y5LadDMazyBcPZy5Za9eN5Z8BggF2Rp+kIhDRXuWAB 9WrcQQZbJqjAfODA== From: "tip-bot2 for Waiman Long" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: locking/core] locking/qspinlock: Fix 'wait_early' set but not used warning Cc: kernel test robot , Waiman Long , Ingo Molnar , Boqun Feng , Linus Torvalds , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240222150540.79981-2-longman@redhat.com> References: <20240222150540.79981-2-longman@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <170912480380.398.9234775487451824502.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791612701242470925 X-GMAIL-MSGID: 1792147977440313406 The following commit has been merged into the locking/core branch of tip: Commit-ID: ca4bc2e07b716509fd279d2b449bb42f4263a9c8 Gitweb: https://git.kernel.org/tip/ca4bc2e07b716509fd279d2b449bb42f4263a9c8 Author: Waiman Long AuthorDate: Thu, 22 Feb 2024 10:05:37 -05:00 Committer: Ingo Molnar CommitterDate: Wed, 28 Feb 2024 13:08:37 +01:00 locking/qspinlock: Fix 'wait_early' set but not used warning When CONFIG_LOCK_EVENT_COUNTS is off, the wait_early variable will be set but not used. This is expected. Recent compilers will not generate wait_early code in this case. Add the __maybe_unused attribute to wait_early for suppressing this W=1 warning. Reported-by: kernel test robot Signed-off-by: Waiman Long Signed-off-by: Ingo Molnar Reviewed-by: Boqun Feng Cc: Linus Torvalds Link: https://lore.kernel.org/r/20240222150540.79981-2-longman@redhat.com Closes: https://lore.kernel.org/oe-kbuild-all/202312260422.f4pK3f9m-lkp@intel.com/ --- kernel/locking/qspinlock_paravirt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/locking/qspinlock_paravirt.h b/kernel/locking/qspinlock_paravirt.h index 6a0184e..ae2b12f 100644 --- a/kernel/locking/qspinlock_paravirt.h +++ b/kernel/locking/qspinlock_paravirt.h @@ -294,8 +294,8 @@ static void pv_wait_node(struct mcs_spinlock *node, struct mcs_spinlock *prev) { struct pv_node *pn = (struct pv_node *)node; struct pv_node *pp = (struct pv_node *)prev; + bool __maybe_unused wait_early; int loop; - bool wait_early; for (;;) { for (wait_early = false, loop = SPIN_THRESHOLD; loop; loop--) {