linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Joel Granados <joel.granados@kernel.org>
To: Petr Mladek <pmladek@suse.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
	 Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
	Muchun Song <muchun.song@linux.dev>,
	 Oscar Salvador <osalvador@suse.de>,
	David Hildenbrand <david@kernel.org>,
	 Steven Rostedt <rostedt@goodmis.org>,
	John Ogness <john.ogness@linutronix.de>,
	 Sergey Senozhatsky <senozhatsky@chromium.org>,
	"David S. Miller" <davem@davemloft.net>,
	 Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>,
	 Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
	linux-fsdevel@vger.kernel.org,  linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, linux-hams@vger.kernel.org,
	 netdev@vger.kernel.org
Subject: Re: [PATCH] sysctl: Remove unused ctl_table forward declarations
Date: Wed, 17 Dec 2025 13:09:08 +0100	[thread overview]
Message-ID: <44x5syvqsqy4bfjdc5r5hfwhppz74vxa3p74diwmnlls26yox2@xccmzuov2afw> (raw)
In-Reply-To: <aUFUIfVvRcYN3_ID@pathway.suse.cz>

[-- Attachment #1: Type: text/plain, Size: 1921 bytes --]

On Tue, Dec 16, 2025 at 01:44:17PM +0100, Petr Mladek wrote:
> On Mon 2025-12-15 16:25:19, Joel Granados wrote:
> > Remove superfluous forward declarations of ctl_table from header files
> > where they are no longer needed. These declarations were left behind
> > after sysctl code refactoring and cleanup.
> > 
> > Signed-off-by: Joel Granados <joel.granados@kernel.org>
> 
> For the printk part:
> 
> Reviewed-by: Petr Mladek <pmladek@suse.com>
> 
> That said, I have found one more declaration in kernel/printk/internal.h.
> It is there because of devkmsg_sysctl_set_loglvl() declaration.
> But I think that a better solution would be:
> 
> diff --git a/kernel/printk/internal.h b/kernel/printk/internal.h
> index dff97321741a..27169fd33231 100644
> --- a/kernel/printk/internal.h
> +++ b/kernel/printk/internal.h
> @@ -4,9 +4,9 @@
>   */
>  #include <linux/console.h>
>  #include <linux/types.h>
> +#include <linux/sysctl.h>
>  
>  #if defined(CONFIG_PRINTK) && defined(CONFIG_SYSCTL)
> -struct ctl_table;
>  void __init printk_sysctl_init(void);
>  int devkmsg_sysctl_set_loglvl(const struct ctl_table *table, int write,
>  			      void *buffer, size_t *lenp, loff_t *ppos);
> diff --git a/kernel/printk/sysctl.c b/kernel/printk/sysctl.c
> index bb8fecb3fb05..512f0c692d6a 100644
> --- a/kernel/printk/sysctl.c
> +++ b/kernel/printk/sysctl.c
> @@ -3,7 +3,6 @@
>   * sysctl.c: General linux system control interface
>   */
>  
> -#include <linux/sysctl.h>
>  #include <linux/printk.h>
>  #include <linux/capability.h>
>  #include <linux/ratelimit.h>
> 
> Feel free to add this into v2. Or we could do this in a separate patch.
> 
> Best Regards,
> Petr

Very nice, thx. 

I believe it fits inside the current commit (no need to make two).
I'll add this and send a V2. You can then add co-developed-by &
Signed-off-by if you want.

Best

-- 

Joel Granados

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2025-12-17 12:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-15 15:25 Joel Granados
2025-12-16  8:15 ` Jan Kara
2025-12-16 12:44 ` Petr Mladek
2025-12-17 12:09   ` Joel Granados [this message]
2025-12-17  2:36 ` Muchun Song

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44x5syvqsqy4bfjdc5r5hfwhppz74vxa3p74diwmnlls26yox2@xccmzuov2afw \
    --to=joel.granados@kernel.org \
    --cc=brauner@kernel.org \
    --cc=davem@davemloft.net \
    --cc=david@kernel.org \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jack@suse.cz \
    --cc=john.ogness@linutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-hams@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=muchun.song@linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=osalvador@suse.de \
    --cc=pabeni@redhat.com \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=senozhatsky@chromium.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox