[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2024073042-observer-overflow-cd04@gregkh>
Date: Tue, 30 Jul 2024 10:42:34 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: zhangjiao2 <zhangjiao2@...s.chinamobile.com>
Cc: arnd@...db.de, linux-kernel@...r.kernel.org, trivial@...nel.org
Subject: Re: [PATCH v2] char: misc: add missing #ifdef CONFIG_PROC_FS
On Tue, Jul 30, 2024 at 04:03:12PM +0800, zhangjiao2 wrote:
> From: Zhang Jiao <zhangjiao2@...s.chinamobile.com>
>
> Since misc_seq_ops is defined under CONFIG_PROC_FS in this file,
> it also need under CONFIG_PROC_FS when use.
>
> v1->v2: not check proc_creat_seq returns
As per the documentation, this goes below the --- line.
>
> Signed-off-by: Zhang Jiao <zhangjiao2@...s.chinamobile.com>
> ---
> drivers/char/misc.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/char/misc.c b/drivers/char/misc.c
> index 541edc26ec89..e1e8cd09c34a 100644
> --- a/drivers/char/misc.c
> +++ b/drivers/char/misc.c
> @@ -286,9 +286,11 @@ EXPORT_SYMBOL(misc_deregister);
> static int __init misc_init(void)
> {
> int err;
> +#ifdef CONFIG_PROC_FS
Again, why is a #ifdef ok in this .c file? What changed to suddenly
require this?
thanks,
greg k-h
Powered by blists - more mailing lists