Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp548712lqr; Wed, 5 Jun 2024 13:39:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWuCVISU1ztPIj4qlci1LYqaLNvGMb7HAimbCliSLUgW9UTNSDt/YLWFYvCYVFJQhfDBj2gw/7huHe365sgI2yMrjPigE1exhO11zRl6Q== X-Google-Smtp-Source: AGHT+IH659M1NPVNatM35T/NzuXXGQDFRij0jBO7Doy54SOcQe4/HtwKqZh3yvkyiGUJ1U9z+a4J X-Received: by 2002:a05:6a00:1911:b0:6ea:ed70:46b4 with SMTP id d2e1a72fcca58-703e5a5cff5mr3926587b3a.29.1717619957391; Wed, 05 Jun 2024 13:39:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717619957; cv=pass; d=google.com; s=arc-20160816; b=qFcFb6IZGHi3wIMhsX1FSk06m+sZ0Wynht6ZRMN3LfxWAWsItWhrLzpLgWplv1tOtu X8uw4of9yL2kFnyg2LPvva34gv12x/hJZHQfJrF6e8akx3y87I9mBrAcradABbpLRG7A RPqHKByq2nrpG7QviPrP/sQc0pw0GbfvLwvqlL7bZZ+8kQ+UOTEMrybqOH9lV0vKJ757 HAKLaEuqUrmiLoL9u9+7GsvZ4piFjAaRmK7XlBm7fnjmjlAM4i/qXY/jcVaLiIW2IEf7 NVwDOT4eFSOp/a3sBHgur+gP3gKkCUyHpnOyuy7ikm+4F73Hr+GUrnWRLlZnIm7X0Ppi ORWQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:subject:cc:to:from:date:user-agent:message-id; bh=mv4drlPvychG0RHp4jS6ujPc6BhnYGhncYd5lAfg0hM=; fh=mjDKelfe6UwtrbrQsWTm6mHxXqJJm1yC7XMGoQRRIY8=; b=AEWmViSByE2nb+MEQF/Lgos830BlfdjxuC+IgIiiGrRSXubXwS4wbfkxmpomJBF/3f QhzfMuitiFv2LlAS2jBwVabvqlCWZ5XJ/wAPN93/6OcZ4BVaGJ8ZWGQBAjJPWhpCcziU M5QR+U+9ircjZvVZxoqLVSaj9Nwo9KqC82g+/Dv+4ixvfpjm9LOe2uF6eqGid+6nwqdB hFYmCvcpPUaA/fo8e3+uoMKC0H5bW6dST+SxRu7/tdNz4uNYRH8bik7R/JFwLHu2OA/s wpaZsN9e1eKiXUiXNSklGyVCvpaY6KK71tMcfOgtuV3WvxAGHcktrSjFiRAhE3jSPDyZ jggQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-203172-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203172-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d2e1a72fcca58-70242e65f5esi3949b3a.400.2024.06.05.13.39.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 13:39:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-203172-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-203172-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203172-linux.lists.archive=gmail.com@vger.kernel.org" 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 0229FB22850 for ; Wed, 5 Jun 2024 20:27:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 75E4515EFA0; Wed, 5 Jun 2024 20:27:06 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 E5BFF15ECCB; Wed, 5 Jun 2024 20:27:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717619225; cv=none; b=gLg3bT4IrpJihB1/YlbeFpkeEdfbkp41HONSy6MnKO3CAYntN5LkBX8Gu4I9TPyh/Q7dkEazsHDR+ROTdI8xCoZuythZ/WOFhlJ9tOSO1nF0QryFWMNPHq0TLbJ7mAwLy3n9iLFcECbp/2fAIyZjvIiqVMUIgpS3603uK8u8AIA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717619225; c=relaxed/simple; bh=j7IAs0iqnm589HLRMIPJ8FP0EVvPqQDV6iAvK8Vv5HI=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=eb4ya+3IplsWxLIEpPscCk31UowZpcPnVQDlMUVLnodBHIH91vvqH1wDBvJXCD1ZwKmb+mymJCZmueFJo+yqS/FGmK9eII03CzUHFqle1OizIoUzQ/ClMMm5pOiLTQlBN8EinYbW4mHOBW3jt42fkmK8+3qdMs7fwYPCBIYBXWw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8F6FDC4AF09; Wed, 5 Jun 2024 20:27:05 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.97) (envelope-from ) id 1sExDw-00000000i7Q-2U08; Wed, 05 Jun 2024 16:27:08 -0400 Message-ID: <20240605202708.450784356@goodmis.org> User-Agent: quilt/0.68 Date: Wed, 05 Jun 2024 16:26:46 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton Subject: [PATCH 2/6] ftrace: Assign ftrace_list_end to ftrace_ops_list type cast to RCU References: <20240605202644.293295925@goodmis.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 From: "Steven Rostedt (Google)" Use a type cast to convert ftrace_list_end to RCU when assigning ftrace_ops_list. This will quiet the sparse warning: kernel/trace/ftrace.c:125:59: warning: incorrect type in initializer (different address spaces) kernel/trace/ftrace.c:125:59: expected struct ftrace_ops [noderef] __rcu *[addressable] [toplevel] ftrace_ops_list kernel/trace/ftrace.c:125:59: got struct ftrace_ops * Signed-off-by: Steven Rostedt (Google) --- kernel/trace/ftrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index da7e6abf48b4..3af0b1feb873 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -122,7 +122,7 @@ static int ftrace_disabled __read_mostly; DEFINE_MUTEX(ftrace_lock); -struct ftrace_ops __rcu *ftrace_ops_list __read_mostly = &ftrace_list_end; +struct ftrace_ops __rcu *ftrace_ops_list __read_mostly = (struct ftrace_ops __rcu *)&ftrace_list_end; ftrace_func_t ftrace_trace_function __read_mostly = ftrace_stub; struct ftrace_ops global_ops; -- 2.43.0