Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp3092723lqo; Tue, 14 May 2024 22:01:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVqAJaUCFu9+NDU28IYqMeBPpIyLmdv6AUvqO9qPhEkIJyT8ZWur3sobfkqQ7JitYjnu1EsfKjcCzeIhsim8i3Bcg7fg/l6Acrju0lNrA== X-Google-Smtp-Source: AGHT+IFe35Efxg4yKAREPKaJrkPb4FzQLiOf64gF89XO6uHaGS4U+26IVEXwe6B6K79cd/+t8j5+ X-Received: by 2002:a17:906:b081:b0:a5a:5c98:c594 with SMTP id a640c23a62f3a-a5a5c98c636mr579326966b.65.1715749315827; Tue, 14 May 2024 22:01:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715749315; cv=pass; d=google.com; s=arc-20160816; b=xAV+OVufbwyGMBvWQv4n/P4NqYl/m1MS47hwsNe9OyMBXb8QSZ55teEL9MmiP7pMIc XYcNDYI/jKPrC2BOdUgKu5GeSr/hSycWVQp6gyKqMGm5ug5bZfIgK/HHiCsIqlsJvT8H ijd07z93mdp8N/udPXHIUxBir/I6A3OJINyKxDViyrgtgKGHURKllqiYFDj2TExkNmG/ tfv3XhD26DvyF/phQjjdeOUmU0mEAozs2Wm2bW55/j7MeLqgZNO32qcKsPxwxgmkW0l1 dNqx7hZtBbbY+dl8bElEUBXIbIkVdCs8r3aOvYSFGiNVo5z0XVSKBa9+4kkOxMrK50Xv +p1g== 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 :subject:cc:to:from:date; bh=sx8xtyR2hAnBkYaIBiZS6aoNuUY0WWls4+fWaesUAnY=; fh=F6+/l66+2m+gCnjNo6NuWLDUx+7eV5/jkdMfec/PoQw=; b=rEBVMscorHHZ7v9r3hJRwGChutXjJeNiFl0Tm2aP7w9yeOFw7AtjxZEDP736zm1l8M osv1yO1iSToeto1yoz4yBeyDEMJGZrtMjgZae2mrS1YNA28PBEEQkZio194cpfDIrCqI rqvB6cVRnik2hpN9nKLQp4AsC6qEZVd/2PutX4onciTvr4Sg7KQnh/ADxEsaZDMFmIH2 PW71fK7/MweNeo+7n2uTbz6HYLVC033DM9vXFaZTOZJr4xGoFU+hvwFMlF2MaTCN4bGu LyTU1Bd3md5Md0Uj/0NfT4xJpilqvxCsb0u1jOV+WKidmvB+QuZV7z9tzi7tc5hqM5nG PKUg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-179443-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179443-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17946836si662509166b.143.2024.05.14.22.01.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 May 2024 22:01:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-179443-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; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-179443-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179443-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 903D81F26DD0 for ; Wed, 15 May 2024 05:01:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6C69B39FD7; Wed, 15 May 2024 05:01:49 +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 E474738FA3; Wed, 15 May 2024 05:01:48 +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=1715749308; cv=none; b=le+HDXIB3UNYX6YG9GgMZeS297Ko/roVPTJPd/QVcxBjtJzLhu5E6K3wORIl5phv2rDf6bkmNzOaQ/OJRVER1qIRG/Y5NxzA8KbmlEBjr5OKC5f88R/Oe8rPlgE70+TNgvyoLFkXRDksFmZnV6e3BPOoSeRDOkCNqvxzAF+QT2k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715749308; c=relaxed/simple; bh=2JNsWSb6+JXCXc9vlcYXDp7vufJpi+RxAtdqzSy7QzI=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=kuFqWhZxmryxb5omPMWpW1onLCQA1nvFLVm/8iRKhtTFRKotelGdGUZmLJCH5C+2BMYi/bs11j/SZfP7sbXO5ou8h11O2HBmvbdjQl3ikH9vfRCF6WXQfqPKo5lyoCeXlsmSFypeguvNIjvzcMPNIpEOXAjY/khWS86/Va47JyQ= 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 1FF38C116B1; Wed, 15 May 2024 05:01:48 +0000 (UTC) Date: Wed, 15 May 2024 01:01:41 -0400 From: Steven Rostedt To: Stephen Rothwell Cc: Masami Hiramatsu , Vincent Donnefort , Linux Kernel Mailing List , Linux Next Mailing List Subject: Re: linux-next: build warning after merge of the ftrace tree Message-ID: <20240515010141.6457d409@rorschach.local.home> In-Reply-To: <20240515004931.0d2e7af3@rorschach.local.home> References: <20240515124808.06279d04@canb.auug.org.au> <20240515004931.0d2e7af3@rorschach.local.home> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 15 May 2024 00:49:31 -0400 Steven Rostedt wrote: > > kernel/trace/ring_buffer.c:6286:72: warning: passing argument 1 of 'virt_to_pfn' makes pointer from integer without a cast [-Wint-conversion] > > 6286 | struct page *page = virt_to_page(cpu_buffer->subbuf_ids[s]); > > | ~~~~~~~~~~~~~~~~~~~~~~^~~ > > | | > > | long unsigned int > > include/asm-generic/memory_model.h:37:45: note: in definition of macro '__pfn_to_page' > > 37 | #define __pfn_to_page(pfn) (vmemmap + (pfn)) > > | ^~~ > > kernel/trace/ring_buffer.c:6286:37: note: in expansion of macro 'virt_to_page' > > 6286 | struct page *page = virt_to_page(cpu_buffer->subbuf_ids[s]); > > | ^~~~~~~~~~~~ > > arch/powerpc/include/asm/page.h:228:53: note: expected 'const void *' but argument is of type 'long unsigned int' > > 228 | static inline unsigned long virt_to_pfn(const void *kaddr) > > | ~~~~~~~~~~~~^~~~~ > > > > Introduced by commit > > > > 117c39200d9d ("ring-buffer: Introducing ring-buffer mapping functions") > > > > My arm multi_v7_defconfig build produced a similar warning. > > > > Is this really intended for v6.10? It seems a bit late. > > > > Well, I submitted this for the v6.9 merge window, and Linus had issues > with it. So we've been tweaking it for the entire time and it was ready > a bit earlier, but due to my vacation and traveling I missed pushing it > to next. :-p > > Most the code has been well tested, but because it is late, I kept it > as a separate topic branch in case Linus still isn't happy with it. And it looks like one of the "tweaks" dropped a (void *) cast. This should fixed it: diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index a02c7a52a0f5..7345a8b625fb 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c @@ -6283,7 +6283,7 @@ static int __rb_map_vma(struct ring_buffer_per_cpu *cpu_buffer, } while (p < nr_pages) { - struct page *page = virt_to_page(cpu_buffer->subbuf_ids[s]); + struct page *page = virt_to_page((void *)cpu_buffer->subbuf_ids[s]); int off = 0; if (WARN_ON_ONCE(s >= nr_subbufs)) { -- Steve