Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2818886rdb; Mon, 12 Feb 2024 19:17:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IG6sBGC8e8mVb2vDnDPfqbv3rgG1F0m4oERPJek1wL1wpHoIRx9JfN7a6j612qpVLmT8GxQ X-Received: by 2002:a05:620a:3844:b0:785:b24d:a99a with SMTP id po4-20020a05620a384400b00785b24da99amr9286482qkn.55.1707794258380; Mon, 12 Feb 2024 19:17:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707794258; cv=pass; d=google.com; s=arc-20160816; b=0/19uNofUtMSC0A608IzEx8+KGiSyBkg/lLcyZTKve+n4gPtQOcDt0YBWFTtzCcGSH GMyvv9Bghk6x6o+iqsdIv9SZqwLb2StCzMgexz/kMvlP5Axwnra6+TOaaMbDqTOE6OTV EMmMOtcYMfXEnIy+vBcCX7mvAFSAksHlenAUNhTMsXrYmkwKlahjkB8c7TQYfXtVlxdX meftTewMxbDjM6K5VCzTIVo/RnV0Me+4tYc1J4g6BUY+LG8yfXWQmvVCAq7urNlxaB1X /jVtbs98hwxCqoA9j0Wy5yJRsFWobhkf7fUXNaDwAK7nFMsZ/Dwn90K3DIUuOU/BONmN q7+w== 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=KJtQOCSLbtCyrptuxIvNN7xHcs9vT9tWJNF1nm9qSgs=; fh=+wmsm485WMmIVGK2G9CKIm0mkHh2HWhwD3+30qwHr30=; b=fyOy1PS7s7SgWSUaSZC3wlJBUAs0oW77qaG4iU09YO0/5pHH1aq2jA1ICpivYNsDBe 4bbju4h+MGZgRau3N1B7fg9+Yh8sdrKHH1YWSJ4wameWZBNA+9hs5p9s5S+8wCG18Gtm mfStKu3mdTdIWajZB+Gk50SY7/zkKIDT5/WaCeyru1H/rKpwEt35MeM0tQHbsTTlbf0U ZTVyhMHDfLAdP8Bc7dWs5YPrnZwvaCqPBnqeO/ynuaAWbuKSkFrjW6WzJ5rAJhYqZ+qF 9kHuSmsQ2o5Tc312/DeDWk5l2wkt1fY8vQCFWLoUTkeF7P0542sZcr3w9itu8qf1FxEX Eggg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EEOgOMIV; 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-62900-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62900-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Forwarded-Encrypted: i=2; AJvYcCUXwApRPBnTX9JwQq1ERGILyv95ZDrjRjJT37gXMZ0DtvbY2vREDjLhmTLa8AwLrYgTgyD+pd8xPnJWPtnokeAN0B3cFqHUZnRTWzKimg== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id u24-20020a05620a085800b0078715d43a2esi1793652qku.566.2024.02.12.19.17.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 19:17:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-62900-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EEOgOMIV; 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-62900-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62900-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 27BAA1C2346D for ; Tue, 13 Feb 2024 03:17:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6E734B65E; Tue, 13 Feb 2024 03:17:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="EEOgOMIV" 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 EC19D8C0B for ; Tue, 13 Feb 2024 03:17:14 +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=1707794236; cv=none; b=t9Dvm6ZdVEWLEYVxL0yE49cSHBkY1VCNT87T8Z2sk+JsjOlIcdEpKX9RxOM3dPeqG9rZLRyX+J57QlzDytdznB2TVVJxwBYExuisoz4yMkbiO+yFZyiJkPn8eGErVIPgcj5t9v+kvPCHMDA9Cto62CxFvdP9MdDjhbtg5GBPknk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707794236; c=relaxed/simple; bh=d7iQUrDMIH4V0V8AYVQKlZ+76ZsY0HbBL3eK0bUgED0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=arjzErPQitbKccQ7tgBSbXE+Z5ghCAe740nOGs+2r5UAEyLbUTl6pl233dLqYyplttu6zsYdf7p5AU8dzrRjkNGA8hibl1dmZiHQtrExq28AUy/SitgpMX+JI5XRE6DY1+2SQaHUpr/zsyoSw/ATTOHNdMuZW2RTbkQEUNl9gMw= 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=EEOgOMIV; 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=1707794233; 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=KJtQOCSLbtCyrptuxIvNN7xHcs9vT9tWJNF1nm9qSgs=; b=EEOgOMIVxVXAjvmxIflvZnq8BLWlRXoaLKrItYd0h2QUXPLCY4f35lLzPz2BWb0Oes72s7 u14vc/v+5ZnYWZUlnkL3ljj8klnS8mLndlQ5bJz1bJFDrvO9n90peBiTGwXUWMK/Hk8I1A NgIy1NAdBMb0kjbDjGNvRQVhPBX0brc= 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-482-rjXgcXF4ML-s5EbS2O7hIQ-1; Mon, 12 Feb 2024 22:17:09 -0500 X-MC-Unique: rjXgcXF4ML-s5EbS2O7hIQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (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 25A71811E79; Tue, 13 Feb 2024 03:17:09 +0000 (UTC) Received: from llong.com (unknown [10.22.33.62]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3C9CEAC1C; Tue, 13 Feb 2024 03:17:08 +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 1/4] locking/qspinlock: Fix 'wait_early' set but not used warning Date: Mon, 12 Feb 2024 22:16:53 -0500 Message-Id: <20240213031656.1375951-2-longman@redhat.com> In-Reply-To: <20240213031656.1375951-1-longman@redhat.com> References: <20240213031656.1375951-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.1 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 --- 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