From patchwork Wed Dec 20 13:10:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 181633 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp2623769dyi; Wed, 20 Dec 2023 05:09:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IGcfZi0WsLII603+B8y77y4QLHObsYVaRnsymhuuuOM8PiIT1+Nwo5bhVwO6QG/Wb7ESwVH X-Received: by 2002:a05:622a:51:b0:425:4043:50c5 with SMTP id y17-20020a05622a005100b00425404350c5mr25032460qtw.84.1703077791255; Wed, 20 Dec 2023 05:09:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703077791; cv=none; d=google.com; s=arc-20160816; b=LIgq2D7GCoWtnCtQVtyQPg/AMV9ZQwKbd2SG4bNZVJLlaVd4V50Y1TUA9XP0DAa3i4 76U/XB4JJeZ5J2LysGlwe5KXybYGQ4U4CpTvNas6CRfAwRwpJZtdBtqqhMA3C/J8ofK9 zdj5Mun20pqQhjCJEy0drCRTkJ6KHiuZV6Xl3oBsM6IOzAgSdoMI74n3aoxbQ6UZqvL0 kDc6RJrSvmxQRBaI++9XvO/hz2nKT2+/xg4/Ehcwb5RkSqCnfqFmdVi5VUVTTpdMuJoh UVkIb8PB1YoGabveCWpHd/XIZyEs92tqritMgdpMpEeS5YeNSAj0ALWGxwHqEtWC89L2 eDDg== ARC-Message-Signature: i=1; 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:subject:cc:to:from :date; bh=Q02LtL5b8ljEvHX7u19z6e1sTcNjuQFJGlPidJFI3kw=; fh=oZb5oK6xK7inkNR0nSbBlsXXirD6+EEBqSAIG3kYNMA=; b=zTDuNW5M7fhXOU/zxIEbri3ABYr9IjlmZAqVh8qUWEmt41e3xJorlIMyJOjsk6Fsy3 O0OfLvYBH1Vd/9a6qAMsfbC3C+amXmhbwOtUBfukIYHtvvXvOevWellj0aFNiB0rR8m9 0p8Luj/QOnz/Z6A8fp5KSikZPLomDefCNeLgpHidswDFw5yzfs0V47zBvwt/xLeiQXPp ++STpselgjmNATCY7PX+CHyZAYyTWLkt0yAKUGj8dygn/SKsOKX2T61i2uo/dx2FF9+o 6FrnWgIefNqym5xUzswjYmKWDEHiAhGbi9ORVP3eVKf+xhtuRZBCtLDO/abMh3kY9R75 tRSg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-6938-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6938-ouuuleilei=gmail.com@vger.kernel.org" Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id j10-20020ac85c4a000000b004257ba56131si1167361qtj.662.2023.12.20.05.09.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 05:09:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-6938-ouuuleilei=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; spf=pass (google.com: domain of linux-kernel+bounces-6938-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6938-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 1C6B81C25811 for ; Wed, 20 Dec 2023 13:09:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3402C2577A; Wed, 20 Dec 2023 13:09:31 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org 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 B96802D628; Wed, 20 Dec 2023 13:09:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6B878C433C8; Wed, 20 Dec 2023 13:09:28 +0000 (UTC) Date: Wed, 20 Dec 2023 08:10:28 -0500 From: Steven Rostedt To: LKML , Linux Trace Kernel Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , David Laight Subject: [PATCH] ring-buffer: Remove stale comment from ring_buffer_size() Message-ID: <20231220081028.7cd7e8e2@gandalf.local.home> X-Mailer: Claws Mail 3.19.1 (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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785806498186696652 X-GMAIL-MSGID: 1785806498186696652 From: "Steven Rostedt (Google)" It's been 11 years since the ring_buffer_size() function was updated to use the nr_pages from the buffer->buffers[cpu] structure instead of using the buffer->nr_pages that no longer exists. The comment in the code is more of what a change log should have and is pretty much useless for development. It's saying how things worked back in 2012 that bares no purpose on today's code. Remove it. Link: https://lore.kernel.org/linux-trace-kernel/84d3b41a72bd43dbb9d44921ef535c92@AcuMS.aculab.com/ Reported-by: David Laight Signed-off-by: Steven Rostedt (Google) Acked-by: Masami Hiramatsu (Google) --- kernel/trace/ring_buffer.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 173d2595ce2d..7887d61d5b56 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c @@ -5122,12 +5122,6 @@ EXPORT_SYMBOL_GPL(ring_buffer_iter_advance); */ unsigned long ring_buffer_size(struct trace_buffer *buffer, int cpu) { - /* - * Earlier, this method returned - * buffer->subbuf_size * buffer->nr_pages - * Since the nr_pages field is now removed, we have converted this to - * return the per cpu buffer value. - */ if (!cpumask_test_cpu(cpu, buffer->cpumask)) return 0;