Received: by 2002:ab2:687:0:b0:1f4:6588:b3a7 with SMTP id s7csp96660lqe; Tue, 9 Apr 2024 16:08:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV2dgBhfrjarsX7JU+Yoq4s2fsIMr9/UrgQX/QuYZ5BkIJKF/jeHdfCKL6AMdG2bIVF1CNiZUcXJXpn85btTn7igM4PQhMGRhtYOZx7lA== X-Google-Smtp-Source: AGHT+IFEuZomOkfpX6rMLqL2qTThpt65l06tNMw27rAjogojDD8w+sSMjciZ0spLs7bSITVVsnkQ X-Received: by 2002:a17:906:3697:b0:a51:cdfd:9095 with SMTP id a23-20020a170906369700b00a51cdfd9095mr492855ejc.57.1712704106853; Tue, 09 Apr 2024 16:08:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712704106; cv=pass; d=google.com; s=arc-20160816; b=vuJjkG75MI+uc1vj8eh/s4F42CYjh9RIUMOyFj6fR8rN7AlYmyGNhxoBPLYlrU+uvL HlZJp8nGhg8U0M4ZQO42CO9fMv4PHmBFDF3WJJikt2zBBzspjBBbXcGl44U6smW9lEuO WI7IXTiu2vFnCHkreHv0WELM0PVlIa5P/y3bby5a9yV6B/+kuV4oxqcdaQHfUofrdesi SKEupGgfDp/4DJVdLvHAxYy0z/3PrAiJvlUj9BReT8d7O9oaB6xWsDJaNfbQ2MWgdfzF 9FGTkZxzb5+W19OoQOpBjStPyfiQYLv9b1D/lBGSeuOHpWwk8LDh59YJ7Cd6Oo65W7GA +sPQ== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=OCKMZbpyysR0s5ZnuewAXrHcTWVllwsy+uL/OC/rjCc=; fh=VGaaCw7I4hZ3tNVGJotTZKrCJ+RjtB3aMq6k/agrt38=; b=WLoXALeaORj+x0E/Wg3gD6K3GyBfAslsqQDKRK72h5xU9DrhZtDqMhAUS0276hXoTw a1ULgqJs2kGcUKV5q2rl54yEqKj9WGQIdVsPUBVga6wCLhSns2TnUXkkA5TboME54ncf V09uvCrzVU62gyWaK86C+i43Z0G5+Vso3kXKp+WiHFgK+u30ORv+4wZfstP+kFxYodOL ZETEBUoXkoLW0srS5V4gwDChfQXslTFVHFWA+n8CF1H7avQTavAN84roRijnFvqar/hz 84GlDiMi5cvDn7ha7jNRjdeeIbOEfYCKEbyY3r1mOKskT5OoqTxulbicA05wxmoTtq4s kJxQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=kSRMeQoU; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-137683-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137683-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id l17-20020a1709062a9100b00a51e455bd5asi1688370eje.354.2024.04.09.16.08.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 16:08:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-137683-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=kSRMeQoU; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-137683-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137683-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 948751F229AB for ; Tue, 9 Apr 2024 23:08:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3B89F158DBA; Tue, 9 Apr 2024 23:08:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="kSRMeQoU" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) (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 E42DA158DB0 for ; Tue, 9 Apr 2024 23:08:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.21 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712704097; cv=none; b=bgsiGMnLbycBJ+V+U8ZnXsaMCP0vRhcYsFztxwLA/caqnnOfUTPJi8JJWPXRK/VlL+p8lijQvki0flwl9KnB1sWdVLjYbv55zncLgDEPFkP2s3X0Us9SeHQ6Ckyk8+MC86KcAN5rIPkDc1c8wBUe57KsUmm2xVsR9th2WHsf8a8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712704097; c=relaxed/simple; bh=bE/hIdyAlZdQeLhR3fmMMG7I2XnJCRfk8VGKhousyJs=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=suSUBu7oit8GkcnzttVVYQ/0ds++YhCTPHCXU6JI41HoT1MVftXCck0GkD+FeQTQZmcMG2KRWw0e0wk+8PZE3FaNMwx/fuCElqEOqp7btT78ZOr/mDunQOe6QyMTITtTjOvVGrxAQEcNSS/inRAXzsvuFvgky0S0QbRjlMQAe9Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=kSRMeQoU; arc=none smtp.client-ip=198.175.65.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712704096; x=1744240096; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=bE/hIdyAlZdQeLhR3fmMMG7I2XnJCRfk8VGKhousyJs=; b=kSRMeQoUrNtDEjJpdY0BFm57uWhO9CkchIr99aRqh4bV3RIFb7JNY9YH /IafvXjFq25g+bLS3xtLPlW7I9gAG0fWjDVVCXmRBNk4aJIrXimdcuptA G7U6ioyLUePN13UeOQKBGbHxvhmS6W+XVc04qp4uZ2MmsAhOP0yuLlD/p 0f/1kaU9Kc8vC63CrI8olp5ca0ta8PQCHNfrvnNvO8SvD/enfA6AAVgMa 2/6sHnZ1N0IKkf87wzhGRN3RR/YJ4/tm8rMwdom67ZDT/2+3MLNbusupK 7aZp7z08bpJG12wccdkjrHHTGDME8u/P63O4p2qCcHwkDBK+9Bk2m1ulu w==; X-CSE-ConnectionGUID: Ft1LuY6SQx6JTZAfePmouw== X-CSE-MsgGUID: O7iNs5mfThayExjgJMtPAw== X-IronPort-AV: E=McAfee;i="6600,9927,11039"; a="7959626" X-IronPort-AV: E=Sophos;i="6.07,190,1708416000"; d="scan'208";a="7959626" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Apr 2024 16:08:16 -0700 X-CSE-ConnectionGUID: JN2XrYyxRSCJYvtz9sLdLw== X-CSE-MsgGUID: 6KLXRYpxQkCBWi3qq7uD7g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,190,1708416000"; d="scan'208";a="51345967" Received: from kmarkley-mobl1.amr.corp.intel.com (HELO dsneddon-desk.sneddon.lan) ([10.125.17.174]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Apr 2024 16:08:15 -0700 From: Daniel Sneddon To: Thomas Gleixner , Borislav Petkov , Peter Zijlstra , Josh Poimboeuf , Ingo Molnar , Dave Hansen , x86@kernel.org (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)), Pawan Gupta , Daniel Sneddon , Alexandre Chartre Cc: Sean Christopherson , "H. Peter Anvin" , linux-kernel@vger.kernel.org (open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)) Subject: [PATCH] x86/bugs: Fix return type of spectre_bhi_state() Date: Tue, 9 Apr 2024 16:08:05 -0700 Message-Id: <20240409230806.1545822-1-daniel.sneddon@linux.intel.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The definition of spectre_bhi_state() incorrectly returns a const char * const. This causes the a compiler warning when building with W=1. warning: type qualifiers ignored on function return type [-Wignored-qualifiers] 2812 | static const char * const spectre_bhi_state(void) Remove the const qualifier from the pointer. Fixes: ec9404e40e8f ("x86/bhi: Add BHI mitigation knob") Reported-by: Sean Christopherson Signed-off-by: Daniel Sneddon --- arch/x86/kernel/cpu/bugs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c index e1775debeafe..7e4a706cad80 100644 --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -2809,7 +2809,7 @@ static char *pbrsb_eibrs_state(void) } } -static const char * const spectre_bhi_state(void) +static const char *spectre_bhi_state(void) { if (!boot_cpu_has_bug(X86_BUG_BHI)) return "; BHI: Not affected"; -- 2.25.1