public inbox for cocci@systeme.lip6.fr
 help / color / mirror / Atom feed
From: David Reaver <me@davidreaver.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	 "Rafael J . Wysocki" <rafael@kernel.org>,
	 Danilo Krummrich <dakr@kernel.org>,
	 Christian Brauner <brauner@kernel.org>,
	 Alexander Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel@vger.kernel.org,  cocci@inria.fr,
	linux-kernel@vger.kernel.org
Subject: Re: [cocci] [RFC PATCH 5/6] debugfs: Manual fixes for incomplete Coccinelle conversions
Date: Mon, 10 Feb 2025 09:53:40 -0800	[thread overview]
Message-ID: <86cyfp3cuz.fsf@davidreaver.com> (raw)
In-Reply-To: <20250210114531.20ea15cf@gandalf.local.home> (Steven Rostedt's message of "Mon, 10 Feb 2025 11:45:31 -0500")

Steven Rostedt <rostedt@goodmis.org> writes:
>
> Why are you adding these defines?
>
> All files should be just including <linux/debugfs.h>
>
> so that they can use either "dentry" or "debugfs_node" while you do he
> conversion.
>
> Then the last patch should just modify debugfs and debugfs.h and no other
> file should be touched.
>
> I'll comment on the last patch to explain what I was expecting to be done
> that should satisfy Al.
>
> -- Steve

Hey Steve, there are two reasons for the temporary defines:

1. There are a few files touched in this series where replacing the
   define or later forward declaration with an include <linux/debugfs.h>
   caused errors related to circular includes.

2. The heuristic of adding a define or forward declaration wherever a
   struct dentry declaration existed was far easier to automate than
   conditionally adding an #include <linux/debugfs.h>. It is harder for
   Coccinelle figure out where to put the #include if there multiple
   #include blocks, no #includes in the file, etc.

However, I'm having trouble reproducing point 1. I'd be happy to use
#include <linux/debugfs.h> instead of forward declarations. I'll see if
I can find a way to mostly automate that. There are "only" 56 additions
of struct dentry forward declarations so far in this patch series, so
even if I have to eyeball these #includes by hand that might be okay.

Thanks,
David Reaver

  reply	other threads:[~2025-02-10 17:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-10  5:20 [cocci] [RFC PATCH 0/6] debugfs: Replace dentry with an opaque handle in debugfs API David Reaver
2025-02-10  5:20 ` [cocci] [RFC PATCH 1/6] debugfs: Add temporary "#define debugfs_node dentry" directives David Reaver
2025-02-10  5:20 ` [cocci] [RFC PATCH 2/6] debugfs: Add helper functions for debugfs_node encapsulation David Reaver
2025-02-10  5:20 ` [cocci] [RFC PATCH 3/6] relay: Replace dentry with debugfs_node David Reaver
2025-02-10  5:20 ` [cocci] [RFC PATCH 4/6] debugfs: Automated conversion from dentry to debugfs_node David Reaver
2025-02-10  5:20 ` [cocci] [RFC PATCH 5/6] debugfs: Manual fixes for incomplete Coccinelle conversions David Reaver
2025-02-10 16:45   ` Steven Rostedt
2025-02-10 17:53     ` David Reaver [this message]
2025-02-10  5:20 ` [cocci] [RFC PATCH 6/6] debugfs: Replace debugfs_node #define with struct wrapping dentry David Reaver
2025-02-10  5:58   ` Al Viro
2025-02-10  5:53 ` [cocci] [RFC PATCH 0/6] debugfs: Replace dentry with an opaque handle in debugfs API Al Viro
2025-02-10  7:08 ` Greg Kroah-Hartman
2025-02-10 16:08   ` David Reaver
2025-02-10 16:53     ` Steven Rostedt
2025-02-10 17:00       ` Al Viro
2025-02-10 17:12         ` Steven Rostedt
2025-02-10 17:25           ` Steven Rostedt
2025-02-10 17:59       ` David Reaver

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=86cyfp3cuz.fsf@davidreaver.com \
    --to=me@davidreaver.com \
    --cc=brauner@kernel.org \
    --cc=cocci@inria.fr \
    --cc=dakr@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=rostedt@goodmis.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