Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8398580imu; Fri, 28 Dec 2018 17:32:06 -0800 (PST) X-Google-Smtp-Source: ALg8bN7xyh9D6Uvru12y7KYs+aWWRQ3it5Z7pMPG4JezwLSR9lNNGwUFQRF62ri624fCi3OWLzut X-Received: by 2002:a63:89c2:: with SMTP id v185mr175018pgd.97.1546047126349; Fri, 28 Dec 2018 17:32:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546047126; cv=none; d=google.com; s=arc-20160816; b=S8G+Ot7o3maOU9HuFcsaPeZGsUpfgkh/gNeV3EY/aVN1GiQhizRZwNSZItPxVS5siE qCR/baKYB+ruCaEcbKttOrL44IhDc5IOYl0Dlzxp+zKL63rZ0RCps4yfUGTJ0EFQqW4c yX2ZJn/39YyPZNscXROKDQq3NqMHP6Gphbl2xyDlszGggf6NImjBhAhpTuszuOZLjkxT x1/XJKw3zSWGVD3Lx6VeeSPRN4N2OohprR8Xx2jovP0fjXuEqh8xbszNKuNN+8HfacXU 2oVlCLDV2OH/xPp2eSQTDL/gedJmE5yn/3EO7nIaAb1oAOfdARwgNZlzxlr0EHJa6HsO Y8XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=bT1cdrptoMRzI5QbWXxEfyRONs+WJDOjA4Co9zWR7Oc=; b=Fw7GU14rEre9HeJLtvQZeGd5JU0g2JXm7+i7ZggYrRxtBtDM+P/637QWCWlL64J9EP UG9MQE1pEqYBeKCEEdKT3eAD8ShRMVf5bFEN5h4W2Yi65wdT564Dk8mca6TsBOVxjjNJ PweWlTu0i0AMRTt/+2j4a6QA0sYGY4gM2KTGae7/SPEBbaiGHq0c+oZJMmZ1TQRjW4vW 7lbMX31BHZeGzSdbCvzrMCTEy7sIM6l8RANl9orp1im1/PaLfMQgFDT4CtdLfkEUCGQR f23WfDC2YjDz6lI3gixypVarbwUfCSnxwRcN4RVpnV3AYycMN+hW9jMSOo+8Kxtfk1WR eH6g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o3si38665530pgi.388.2018.12.28.17.31.51; Fri, 28 Dec 2018 17:32:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730600AbeL1Niz (ORCPT + 99 others); Fri, 28 Dec 2018 08:38:55 -0500 Received: from mx2.suse.de ([195.135.220.15]:55616 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730444AbeL1Niy (ORCPT ); Fri, 28 Dec 2018 08:38:54 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 3D40FABE7; Fri, 28 Dec 2018 13:38:53 +0000 (UTC) From: Miroslav Benes To: rostedt@goodmis.org, mingo@redhat.com Cc: tom.zanussi@linux.intel.com, mhiramat@kernel.org, linux-kernel@vger.kernel.org, Miroslav Benes Subject: [PATCH] ring-buffer: Remove unused function ring_buffer_page_len() Date: Fri, 28 Dec 2018 14:38:47 +0100 Message-Id: <20181228133847.106177-1-mbenes@suse.cz> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 6b7e633fe9c2 ("tracing: Remove extra zeroing out of the ring buffer page") removed the only caller of ring_buffer_page_len(). The function is now unused and may be removed. Signed-off-by: Miroslav Benes --- I am sorry if you received the patch more than once (hopefully not). For some strange reasons git send-email segfaulted, I tried to send from a different machine and made a mistake. Holiday mode *sigh*. include/linux/ring_buffer.h | 3 --- kernel/trace/ring_buffer.c | 14 -------------- 2 files changed, 17 deletions(-) diff --git a/include/linux/ring_buffer.h b/include/linux/ring_buffer.h index 0940fda59872..2351aa46dbc7 100644 --- a/include/linux/ring_buffer.h +++ b/include/linux/ring_buffer.h @@ -187,9 +187,6 @@ void ring_buffer_set_clock(struct ring_buffer *buffer, void ring_buffer_set_time_stamp_abs(struct ring_buffer *buffer, bool abs); bool ring_buffer_time_stamp_abs(struct ring_buffer *buffer); -size_t ring_buffer_page_len(void *page); - - void *ring_buffer_alloc_read_page(struct ring_buffer *buffer, int cpu); void ring_buffer_free_read_page(struct ring_buffer *buffer, int cpu, void *data); int ring_buffer_read_page(struct ring_buffer *buffer, void **data_page, diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 4f3247a53259..ca1308eec4a4 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c @@ -353,20 +353,6 @@ static void rb_init_page(struct buffer_data_page *bpage) local_set(&bpage->commit, 0); } -/** - * ring_buffer_page_len - the size of data on the page. - * @page: The page to read - * - * Returns the amount of data on the page, including buffer page header. - */ -size_t ring_buffer_page_len(void *page) -{ - struct buffer_data_page *bpage = page; - - return (local_read(&bpage->commit) & ~RB_MISSED_FLAGS) - + BUF_PAGE_HDR_SIZE; -} - /* * Also stolen from mm/slob.c. Thanks to Mathieu Desnoyers for pointing * this issue out. -- 2.20.1