From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 47E03C27C79 for ; Thu, 13 Jun 2024 19:34:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C5EA46B00CB; Thu, 13 Jun 2024 15:34:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C0E756B00CC; Thu, 13 Jun 2024 15:34:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AB9FC6B00D4; Thu, 13 Jun 2024 15:34:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 849456B00CB for ; Thu, 13 Jun 2024 15:34:08 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 2AE851A01E9 for ; Thu, 13 Jun 2024 19:34:08 +0000 (UTC) X-FDA: 82226866176.21.4FCDF80 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf16.hostedemail.com (Postfix) with ESMTP id 525F0180002 for ; Thu, 13 Jun 2024 19:34:06 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=none; spf=pass (imf16.hostedemail.com: domain of "SRS0=ySKb=NP=goodmis.org=rostedt@kernel.org" designates 139.178.84.217 as permitted sender) smtp.mailfrom="SRS0=ySKb=NP=goodmis.org=rostedt@kernel.org"; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1718307245; a=rsa-sha256; cv=none; b=uePZP8XBKtjlUjrTwijafy1OaSjgZ/k/vAYvSA+KCC9kuhPn0xJKXCNMi53nb0c0N+Cp3c WWbQIrbFya8yY9zWbgUluEA8PLBF6z1eZBZQO6sVGk0yopsmSv6s9rq28Fbk5L99QoS9PR VmAyk3GwYLI0WqY56RbiJFsrafGniF0= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=none; spf=pass (imf16.hostedemail.com: domain of "SRS0=ySKb=NP=goodmis.org=rostedt@kernel.org" designates 139.178.84.217 as permitted sender) smtp.mailfrom="SRS0=ySKb=NP=goodmis.org=rostedt@kernel.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1718307245; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=quikRK6j01AaJwMRXfmM35Q2pp+TB1hY5hgIdF74D/4=; b=f8eb0Dk06qSxq/8Ulm8vRdxpZ6S47w0HCCc9rPk6lp+cSseqwCZ1rGyjLrFdfg4QdDFGgK ZGnN1J7JX19SHhC0hEZohBzDlsf1IGJ63V7jEsS3I0enlkHMPrRFVszPMvOyI/KWqhII77 UMY6qIpxM31oyxtSIZpp0Ei/0mFKdGE= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 6A5F861B1C; Thu, 13 Jun 2024 19:34:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 13E94C2BBFC; Thu, 13 Jun 2024 19:34:03 +0000 (UTC) Date: Thu, 13 Jun 2024 15:34:02 -0400 From: Steven Rostedt To: Alexey Dobriyan Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-security-module@vger.kernel.org, linux-trace-kernel@vger.kernel.org Subject: Re: [PATCH] linux++: delete some forward declarations Message-ID: <20240613153402.3b067d4b@rorschach.local.home> In-Reply-To: <5ad5556c-7c32-45b7-89cf-f723c9d7332b@p183> References: <5ad5556c-7c32-45b7-89cf-f723c9d7332b@p183> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Stat-Signature: zh7pqfrpsizhk1a71e4mq465r77f4fsi X-Rspamd-Queue-Id: 525F0180002 X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1718307246-405744 X-HE-Meta: U2FsdGVkX19z5F6237oKbB5qB4Xe7FahNYxtBKqUbxMy0M2oAzDpyNniicsUwr8Mkkoa1yqyh7Y5WElZg8wK6OY7sbfcoF8aU+HuzPyTz7nLMirrqRo/UWwa2qs75eyITlyvyAXf7WOxzlEIiM3hd9orm7RB8vIdUfO7w3uB5pD8xjd3FSqTIMu46qSA9TGMGGavxrZDoJpLDb66PhrXYRupjDhpu8/d+9mwtnAXg+Xvarf4bQoxDVh8+ui3tJiZPxBitIy5lM1J7MQ+hjesv4Kq6uHhjgFrFOQY9G4sH2A5fpbj2vMRHjCUHJO/1/7lvOBgCvnbwibL/mrJgsD/NVdNdSOlG2f0WyI7ZSkgUu1H1lZzkgs3hI4AwqEwL6NstPyGlT61zZkiyGOjYsGlotiAQck/Ab70C1gTiw5HQt0QoHeJSldfngAmVD/uv0yEMH9yrKHjn6MHq/1zc/kzVGT48P9Fr2mBJI8Q0CGZ7MXrbfVzQOkTAaSG0iLTfcxAJlDMqabXLBGX4PVE+0FhaeXmW2/8S5g5I+CWbHZQCCqBtzktsmzGaWJ0bp+i9FTrJZGKqMnjcnx584uQRcOt+cKXcuRafAsobRu/lNteb6hNBJSg8l6BjizDZEnTM9PAEXn9MNuyYH1HJ7oWGxXcu/R6UWGw18ptldlkkaTFyBxqT3YIPNp6iXRlzmwdPdbw2h2UlY59W7wkuYSfjO6QNU7WrraZGQdxLsKIl6AyLJ2uCdo6ocx5eAnMGlcszQTEbWZ3niAeOg5l9bLgzFY6lquJWslzjtOiuIaOIIvGa99GMnomEOIKzTNI8w22qIefJXtDXomlD+tQIRGWyf7/eLbEI0dldkNvfbT8LMhOfuUeGSzxXe9zeJ/b58BPsSqFw+YpVh0NbhSJv67BGOzdZMHUXVefPY5kQvlTGI3JalC0A0Ckoy+jNODvvvxMGBmZjBn6m1gkN1FVCDWQJPh 4HbT2jgs wJJ/G2LY4OHL49Dc4jjWeOKTlCNapidQE2WxE98lKJDj1Mms0owk4NXXTv3ZSxUy+dDPp0oKcr+ExOQYo/LP1LWLZWEJ3ofrF21d61i5mus8jKMIfvKfE7yvgVjkOjxOb0Z1RDlGk334uQ5EbubnpnaimhRwVv48ttdD1Nl/6Aaai4AydRdqaXuZ73JRvA6sLMyOF7q5C9AejrP73JcHVsk8Sg88A9vM0Fu/Y2GTS/4SdSFXHMSrxuM/cTjvEhdjnWMKSkFhtbFXXoncev8/wFPqzMzTZmVloAaO1MavSvRqq3FTMIJMsCDRekA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Thu, 13 Jun 2024 22:22:18 +0300 Alexey Dobriyan wrote: > g++ doesn't like forward enum declarations: >=20 > error: use of enum =E2=80=98E=E2=80=99 without previous declaration > 64 | enum E; But we don't care about g++. Do we? I would make that a separate patch. >=20 > Delete those which aren't used. >=20 > Delete some unused/unnecessary forward struct declarations for a change. This is a clean up, but should have a better change log. Just something simple like: Delete unnecessary forward struct declarations. Thanks, -- Steve >=20 > Signed-off-by: Alexey Dobriyan > --- >=20 > fs/ramfs/inode.c | 1 - > include/linux/console.h | 2 -- > include/linux/device.h | 3 --- > include/linux/ftrace.h | 4 ---- > include/linux/security.h | 6 ------ > include/linux/signal.h | 2 -- > include/linux/syscalls.h | 7 ------- > include/linux/sysfs.h | 2 -- > mm/internal.h | 4 ---- > mm/shmem.c | 1 - > 10 files changed, 32 deletions(-) >=20 > --- a/fs/ramfs/inode.c > +++ b/fs/ramfs/inode.c > @@ -51,7 +51,6 @@ struct ramfs_fs_info { > =20 > #define RAMFS_DEFAULT_MODE 0755 > =20 > -static const struct super_operations ramfs_ops; > static const struct inode_operations ramfs_dir_inode_operations; > =20 > struct inode *ramfs_get_inode(struct super_block *sb, > --- a/include/linux/console.h > +++ b/include/linux/console.h > @@ -21,10 +21,8 @@ > #include > =20 > struct vc_data; > -struct console_font_op; > struct console_font; > struct module; > -struct tty_struct; > struct notifier_block; > =20 > enum con_scroll { > --- a/include/linux/device.h > +++ b/include/linux/device.h > @@ -36,10 +36,7 @@ > struct device; > struct device_private; > struct device_driver; > -struct driver_private; > struct module; > -struct class; > -struct subsys_private; > struct device_node; > struct fwnode_handle; > struct iommu_group; > --- a/include/linux/ftrace.h > +++ b/include/linux/ftrace.h > @@ -531,8 +531,6 @@ extern const void *ftrace_expected; > =20 > void ftrace_bug(int err, struct dyn_ftrace *rec); > =20 > -struct seq_file; > - > extern int ftrace_text_reserved(const void *start, const void *end); > =20 > struct ftrace_ops *ftrace_ops_trampoline(unsigned long addr); > @@ -1147,8 +1145,6 @@ static inline void unpause_graph_tracing(void) { } > #endif /* CONFIG_FUNCTION_GRAPH_TRACER */ > =20 > #ifdef CONFIG_TRACING > -enum ftrace_dump_mode; > - > #define MAX_TRACER_SIZE 100 > extern char ftrace_dump_on_oops[]; > extern int ftrace_dump_on_oops_enabled(void); > --- a/include/linux/security.h > +++ b/include/linux/security.h > @@ -41,7 +41,6 @@ struct rlimit; > struct kernel_siginfo; > struct sembuf; > struct kern_ipc_perm; > -struct audit_context; > struct super_block; > struct inode; > struct dentry; > @@ -59,8 +58,6 @@ struct xfrm_sec_ctx; > struct mm_struct; > struct fs_context; > struct fs_parameter; > -enum fs_value_type; > -struct watch; > struct watch_notification; > struct lsm_ctx; > =20 > @@ -183,8 +180,6 @@ struct sock; > struct sockaddr; > struct socket; > struct flowi_common; > -struct dst_entry; > -struct xfrm_selector; > struct xfrm_policy; > struct xfrm_state; > struct xfrm_user_sec_ctx; > @@ -219,7 +214,6 @@ extern unsigned long dac_mmap_min_addr; > #define LSM_PRLIMIT_WRITE 2 > =20 > /* forward declares to avoid warnings */ > -struct sched_param; > struct request_sock; > =20 > /* bprm->unsafe reasons */ > --- a/include/linux/signal.h > +++ b/include/linux/signal.h > @@ -274,8 +274,6 @@ static inline int valid_signal(unsigned long sig) > return sig <=3D _NSIG ? 1 : 0; > } > =20 > -struct timespec; > -struct pt_regs; > enum pid_type; > =20 > extern int next_signal(struct sigpending *pending, sigset_t *mask); > --- a/include/linux/syscalls.h > +++ b/include/linux/syscalls.h > @@ -11,8 +11,6 @@ > =20 > struct __aio_sigset; > struct epoll_event; > -struct iattr; > -struct inode; > struct iocb; > struct io_event; > struct iovec; > @@ -20,14 +18,12 @@ struct __kernel_old_itimerval; > struct kexec_segment; > struct linux_dirent; > struct linux_dirent64; > -struct list_head; > struct mmap_arg_struct; > struct msgbuf; > struct user_msghdr; > struct mmsghdr; > struct msqid_ds; > struct new_utsname; > -struct nfsctl_arg; > struct __old_kernel_stat; > struct oldold_utsname; > struct old_utsname; > @@ -38,7 +34,6 @@ struct rusage; > struct sched_param; > struct sched_attr; > struct sel_arg_struct; > -struct semaphore; > struct sembuf; > struct shmid_ds; > struct sockaddr; > @@ -48,14 +43,12 @@ struct statfs; > struct statfs64; > struct statx; > struct sysinfo; > -struct timespec; > struct __kernel_old_timeval; > struct __kernel_timex; > struct timezone; > struct tms; > struct utimbuf; > struct mq_attr; > -struct compat_stat; > struct old_timeval32; > struct robust_list_head; > struct futex_waitv; > --- a/include/linux/sysfs.h > +++ b/include/linux/sysfs.h > @@ -23,9 +23,7 @@ > #include > =20 > struct kobject; > -struct module; > struct bin_attribute; > -enum kobj_ns_type; > =20 > struct attribute { > const char *name; > --- a/mm/internal.h > +++ b/mm/internal.h > @@ -1095,10 +1095,6 @@ unsigned int reclaim_clean_pages_from_list(struct = zone *zone, > /* Flags that allow allocations below the min watermark. */ > #define ALLOC_RESERVES (ALLOC_NON_BLOCK|ALLOC_MIN_RESERVE|ALLOC_HIGHATOM= IC|ALLOC_OOM) > =20 > -enum ttu_flags; > -struct tlbflush_unmap_batch; > - > - > /* > * only for MM internal work items which do not depend on > * any allocations or locks which might depend on allocations > --- a/mm/shmem.c > +++ b/mm/shmem.c > @@ -261,7 +261,6 @@ static const struct inode_operations shmem_dir_inode_= operations; > static const struct inode_operations shmem_special_inode_operations; > static const struct vm_operations_struct shmem_vm_ops; > static const struct vm_operations_struct shmem_anon_vm_ops; > -static struct file_system_type shmem_fs_type; > =20 > bool shmem_mapping(struct address_space *mapping) > {