Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp413657pxf; Thu, 8 Apr 2021 05:54:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxjwmeFTI2rKk8B4ZPVGjOkM3OwAALPG3P0j24xye2OJitut1+NM4BOajj+0RLmCFE0VW69 X-Received: by 2002:aa7:c952:: with SMTP id h18mr11308303edt.269.1617886472263; Thu, 08 Apr 2021 05:54:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617886472; cv=none; d=google.com; s=arc-20160816; b=CHgcvaaDeRmLeblPQtvpwcZpqcXQ0O8psWk4iyg0Lu7O7K3FI5JnkzGY4DB0NZupLk KtrlHN+qiYRBdo5VZ1/ndOJzgJtMxvqeLJDkqSvlWE8qpmawNKCGhQlo2tDAXP8VMy0V dRPIfeBFei1AV0sDe37+soGJ+FzgENNjgA/qdxSJFTdS9RRpzD3NSfgY6EvLVjOaOYdJ lcQT3VYZQuYjTsmAx7pw3HrwsElWsh9gwdoE8Y30wWeKY7G+SmDDZJ4h9JGGmCq5UGIX 7zZf8Ltn+gnnXM2W51hOQwyn/YbKxGsif76XY7g9E0v2znntFdgoed1O1h/Bho4I0hWX fXVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3GchDwWgtwTnJ48OKTcoNfcgw1ChzXlJXwqst5GzH8w=; b=TB8TIDofBmq7R7s1TBdj4liKcqdujgedICBw4D7c3uiPV6MhVBrzKFG78UDBnlNEuM ESDfe/TSfxlMd/RIxyj9fxebA7e14XX1zD4hJrLIN2YRcV0AX9QLpKB53Cr0EZUjjAhA 6Nfdk7YkxBhgHrdirLtWfHctKtyKrsQ/fbz94KGUgD3WRR6y0qkbfOa3yFQubWgJb18Y xHxQOb9nHMDTEsoRnwrMrHs/fDc05ONSI4GWR2QaGRia6CbaYmhEQUMd2gedkD6Mjv2F L5ouPUEpDfifvl2oRA4qpQyiejrFX1qpOkxOR1agtl8aALAlVlJF1xI31id2qTVMX+/w 7QCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fzo9wx00; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m4si10565014ejx.536.2021.04.08.05.54.09; Thu, 08 Apr 2021 05:54:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fzo9wx00; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231839AbhDHMwl (ORCPT + 99 others); Thu, 8 Apr 2021 08:52:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:58210 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231742AbhDHMw0 (ORCPT ); Thu, 8 Apr 2021 08:52:26 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E067B61131; Thu, 8 Apr 2021 12:52:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1617886335; bh=pZSqE4+whOteuHfgzSuKcLta40U8VGf9iWhNxjiyTNk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fzo9wx00cfCvx5PU2Lm6zBqQBJ6McJCV4IW+nGz9NLEt5dCafF9f/UjieKf8Z2/Sn c1d18b5AM7RT2IxsiqKk2YrfxgaVM3Jg+p9OAWy615he8FDgxVPt5XJn6YfwaESf9z kkQg9tnIbSHL8iyuvVk7KLFDODvp4LGqRWynJT/M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , Jiri Slaby Subject: [PATCH 08/13] tty: audit: move some local functions out of tty.h Date: Thu, 8 Apr 2021 14:51:29 +0200 Message-Id: <20210408125134.3016837-9-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210408125134.3016837-1-gregkh@linuxfoundation.org> References: <20210408125134.3016837-1-gregkh@linuxfoundation.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The functions tty_audit_add_data() and tty_audit_tiocsti() are local to the tty core code, and do not need to be in a "kernel-wide" header file so move them to drivers/tty/tty.h Cc: Jiri Slaby Signed-off-by: Greg Kroah-Hartman --- drivers/tty/tty.h | 14 ++++++++++++++ drivers/tty/tty_audit.c | 1 + include/linux/tty.h | 10 ---------- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/drivers/tty/tty.h b/drivers/tty/tty.h index e9cb918348cf..a8a7abe5d635 100644 --- a/drivers/tty/tty.h +++ b/drivers/tty/tty.h @@ -6,4 +6,18 @@ #ifndef _TTY_INTERNAL_H #define _TTY_INTERNAL_H +/* tty_audit.c */ +#ifdef CONFIG_AUDIT +void tty_audit_add_data(struct tty_struct *tty, const void *data, size_t size); +void tty_audit_tiocsti(struct tty_struct *tty, char ch); +#else +static inline void tty_audit_add_data(struct tty_struct *tty, const void *data, + size_t size) +{ +} +static inline void tty_audit_tiocsti(struct tty_struct *tty, char ch) +{ +} +#endif + #endif diff --git a/drivers/tty/tty_audit.c b/drivers/tty/tty_audit.c index 32898aabcd06..ca7afd7b2716 100644 --- a/drivers/tty/tty_audit.c +++ b/drivers/tty/tty_audit.c @@ -10,6 +10,7 @@ #include #include #include +#include "tty.h" struct tty_audit_buf { struct mutex mutex; /* Protects all data below */ diff --git a/include/linux/tty.h b/include/linux/tty.h index fd8308a1f37e..981ee31c58e1 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h @@ -717,20 +717,10 @@ static inline void n_tty_init(void) { } /* tty_audit.c */ #ifdef CONFIG_AUDIT -extern void tty_audit_add_data(struct tty_struct *tty, const void *data, - size_t size); extern void tty_audit_exit(void); extern void tty_audit_fork(struct signal_struct *sig); -extern void tty_audit_tiocsti(struct tty_struct *tty, char ch); extern int tty_audit_push(void); #else -static inline void tty_audit_add_data(struct tty_struct *tty, const void *data, - size_t size) -{ -} -static inline void tty_audit_tiocsti(struct tty_struct *tty, char ch) -{ -} static inline void tty_audit_exit(void) { } -- 2.31.1