Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp394269rdb; Thu, 22 Feb 2024 07:06:28 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUBcVjpLXlnBgH3Sm4yyAqaVANmHR7x/jqSgcYlJPNe2pMwS2DWbpHEzSaEq52AWywUDtv67aDgjZjIIesa44YN2B2FdcehWWuE998l/A== X-Google-Smtp-Source: AGHT+IE9xKwRztUYkDQ8Mq71tEY4gYfaEdA8o7TV73RkM2sibLjJtYAgWFK8WND5367z0OmPacHX X-Received: by 2002:a17:902:a383:b0:1db:edb8:35f6 with SMTP id x3-20020a170902a38300b001dbedb835f6mr3560684pla.5.1708614388679; Thu, 22 Feb 2024 07:06:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708614388; cv=pass; d=google.com; s=arc-20160816; b=FDUSr2U+AQCz7EM2/V16kdNxaDxXiMd8pLVs2FhOOq+0ITW8d1lHt3PSwypz50mFP5 9LFGIiE48o22J7cRmu48yi1g5I7UkDidtFeqYaxTBDeI3ebGuF0eHJizAdZBHsdkDKkE Abo7qxszkH7+fRk+hZq3jgvgl5CJcWuQ+9El02o3n8wHo7yG4+YB5nKn0f2MLerCTx6W RvtNGaf2jMWeTUSukE4vfqwEClgqnHrkYRdsR0145dCVB241hakBipO1CEFFPtcMUf96 YGkp1K819m7cGyfhz1GmgMVHNeTWAU0PlysorjmkP8mxeLPUL0s++UYy/Y0/m/0YVPjc Y+hA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=6lp5EbVDsr1293Y0XjQkZX4GDQn3K20EV4dIoRAKwfs=; fh=A6H/wgnb7XDBUMnRrm/PM8AO6ffoqXr8ae9E2Kih3wU=; b=LRzAXAdEodENrtQHF0Ey/J5U2nDGhGiPkdIiXL+KhiK/2rAPPDPNEt5Co5YNk+DzdK GctO76/2WNEyoK4NYdajKPS/FUWczfIFPVX2WxG80pi2dEuMjheNv4HL8oQS0HtEAph9 PMi/W1ZVGr8Zu6vksjkIKUgdC9mV3kQMWAGnYZoMSWxr62OYKOZUk1Im8e5uJOzpD/YS Y1aqGvWG90Z44dx6IjnDNGpihERJlQG51w7puGo03aB/TehUIAFujcnX9+aaQT1vwtov UCgOxpQHJounkfQp/M8zSJ0LEJDHTd3Y1qNOsqUaZdSRFGLokAuTUTAmgYgWyKsNToN7 lE3w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Dy+8yo4f; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-76743-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76743-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id j1-20020a170902c08100b001dbede97219si7808783pld.251.2024.02.22.07.06.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 07:06:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-76743-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Dy+8yo4f; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-76743-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76743-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.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 A18DE287597 for ; Thu, 22 Feb 2024 15:06:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C7B3214C5BC; Thu, 22 Feb 2024 15:06:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Dy+8yo4f" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 7A61F14A4E4 for ; Thu, 22 Feb 2024 15:06:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708614363; cv=none; b=FYrhtBuiiX1TsmiPeWrTPDBhvrxjY7rcqc0TLdKqSQ4UXnifddznC9PSvPDtB2JBxza9I/RhPpJ9SI33Omjd4JzuwlrIdZqrC+hw/A8FuhWTrC1dSdYcT2Q4YL9Xrnx0fC5QYmGNXvQ1Zuu9YIRSCMV1cg9fXGV4fEDputf2mpQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708614363; c=relaxed/simple; bh=aeHOJ9iVML/y8GMo8hBUeh/YCn/T6DMQYpgqNzuH3qU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=cu5lFWwiswhxYB2KK4OEes00z1Oxm2Y6QOTSv1n/QkwdZp9ipihMW2FfT5xV8rmVAfIvzSL7AZ+kIhF1TOgYvpEr8RSITMMuOV+JCzGDROzSRKk6WR7p04X8WAAhpI7P2f/pczrIhSq3kV2EAfRZyto59sCGay0Wjdh2B3ExuQo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Dy+8yo4f; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708614360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6lp5EbVDsr1293Y0XjQkZX4GDQn3K20EV4dIoRAKwfs=; b=Dy+8yo4fq9Rs505jwyrO+V6EdUPqC03+FUV2XJPoxYaa7hJOLNTxbrsbsGb4dpbBe5OO4f 8i8wO+Gw4BXkMifLW88VITSRsj1T7FFjcjZ6lLR+/k/DWvqih/H1hBuh1Sp52AwlOOnP3J KLCEy5VLHwUCN3qL4GaXO6zKBclCO80= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-626-yAZZfy9hOwm0hMk4P6CfWQ-1; Thu, 22 Feb 2024 10:05:56 -0500 X-MC-Unique: yAZZfy9hOwm0hMk4P6CfWQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C6B5E863E83; Thu, 22 Feb 2024 15:05:55 +0000 (UTC) Received: from llong.com (unknown [10.22.33.9]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1F208112131D; Thu, 22 Feb 2024 15:05:55 +0000 (UTC) From: Waiman Long To: Peter Zijlstra , Ingo Molnar , Will Deacon , Boqun Feng , Andrew Morton Cc: linux-kernel@vger.kernel.org, George Stark , Waiman Long , kernel test robot Subject: [PATCH v2 1/4] locking/qspinlock: Fix 'wait_early' set but not used warning Date: Thu, 22 Feb 2024 10:05:37 -0500 Message-Id: <20240222150540.79981-2-longman@redhat.com> In-Reply-To: <20240222150540.79981-1-longman@redhat.com> References: <20240222150540.79981-1-longman@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 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 Closes: https://lore.kernel.org/oe-kbuild-all/202312260422.f4pK3f9m-lkp@intel.com/ Signed-off-by: Waiman Long Reviewed-by: Boqun Feng --- 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 6a0184e9c234..ae2b12f68b90 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--) { -- 2.39.3