linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] debugfs: add definition of debugfs_real_fops() if CONFIG_DEBUG_FS unset
@ 2017-11-27 20:35 Jakub Kicinski
  2017-11-28 11:47 ` [oss-drivers] " Simon Horman
  2017-11-28 14:23 ` Greg Kroah-Hartman
  0 siblings, 2 replies; 4+ messages in thread
From: Jakub Kicinski @ 2017-11-27 20:35 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Nicolai Stange
  Cc: linux-kernel, oss-drivers, Jakub Kicinski

Recent commit moved the implementation of debugfs_real_fops()
out of the header file.  The declaration, however, is only
provided if CONFIG_DEBUG_FS is set.  Add an empty static inline
definition for when CONFIG_DEBUG_FS is unset.

Fixes: 7c8d469877b1 ("debugfs: add support for more elaborate ->d_fsdata")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
---
 include/linux/debugfs.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h
index f36ecc2a5712..95ebbdce4193 100644
--- a/include/linux/debugfs.h
+++ b/include/linux/debugfs.h
@@ -216,6 +216,11 @@ static inline void debugfs_remove(struct dentry *dentry)
 static inline void debugfs_remove_recursive(struct dentry *dentry)
 { }
 
+static inline const struct file_operations *debugfs_real_fops(const struct file *filp)
+{
+	return NULL;
+}
+
 static inline int debugfs_file_get(struct dentry *dentry)
 {
 	return 0;
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [oss-drivers] [PATCH v2] debugfs: add definition of debugfs_real_fops() if CONFIG_DEBUG_FS unset
  2017-11-27 20:35 [PATCH v2] debugfs: add definition of debugfs_real_fops() if CONFIG_DEBUG_FS unset Jakub Kicinski
@ 2017-11-28 11:47 ` Simon Horman
  2017-11-28 14:23 ` Greg Kroah-Hartman
  1 sibling, 0 replies; 4+ messages in thread
From: Simon Horman @ 2017-11-28 11:47 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: Greg Kroah-Hartman, Nicolai Stange, linux-kernel, oss-drivers

On Mon, Nov 27, 2017 at 12:35:44PM -0800, Jakub Kicinski wrote:
> Recent commit moved the implementation of debugfs_real_fops()
> out of the header file.  The declaration, however, is only
> provided if CONFIG_DEBUG_FS is set.  Add an empty static inline
> definition for when CONFIG_DEBUG_FS is unset.
> 
> Fixes: 7c8d469877b1 ("debugfs: add support for more elaborate ->d_fsdata")
> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>

Reviewed-by: Simon Horman <simon.horman@netronome.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] debugfs: add definition of debugfs_real_fops() if CONFIG_DEBUG_FS unset
  2017-11-27 20:35 [PATCH v2] debugfs: add definition of debugfs_real_fops() if CONFIG_DEBUG_FS unset Jakub Kicinski
  2017-11-28 11:47 ` [oss-drivers] " Simon Horman
@ 2017-11-28 14:23 ` Greg Kroah-Hartman
  2017-11-28 18:23   ` Jakub Kicinski
  1 sibling, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-28 14:23 UTC (permalink / raw)
  To: Jakub Kicinski; +Cc: Nicolai Stange, linux-kernel, oss-drivers

On Mon, Nov 27, 2017 at 12:35:44PM -0800, Jakub Kicinski wrote:
> Recent commit moved the implementation of debugfs_real_fops()
> out of the header file.  The declaration, however, is only
> provided if CONFIG_DEBUG_FS is set.  Add an empty static inline
> definition for when CONFIG_DEBUG_FS is unset.
> 
> Fixes: 7c8d469877b1 ("debugfs: add support for more elaborate ->d_fsdata")
> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
> ---
>  include/linux/debugfs.h | 5 +++++
>  1 file changed, 5 insertions(+)

Arnd sent me a better patch for this last week that I'll queue up now.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] debugfs: add definition of debugfs_real_fops() if CONFIG_DEBUG_FS unset
  2017-11-28 14:23 ` Greg Kroah-Hartman
@ 2017-11-28 18:23   ` Jakub Kicinski
  0 siblings, 0 replies; 4+ messages in thread
From: Jakub Kicinski @ 2017-11-28 18:23 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Nicolai Stange, linux-kernel, oss-drivers, Arnd Bergmann

On Tue, 28 Nov 2017 15:23:00 +0100, Greg Kroah-Hartman wrote:
> On Mon, Nov 27, 2017 at 12:35:44PM -0800, Jakub Kicinski wrote:
> > Recent commit moved the implementation of debugfs_real_fops()
> > out of the header file.  The declaration, however, is only
> > provided if CONFIG_DEBUG_FS is set.  Add an empty static inline
> > definition for when CONFIG_DEBUG_FS is unset.
> > 
> > Fixes: 7c8d469877b1 ("debugfs: add support for more elaborate ->d_fsdata")
> > Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
> > ---
> >  include/linux/debugfs.h | 5 +++++
> >  1 file changed, 5 insertions(+)  
> 
> Arnd sent me a better patch for this last week that I'll queue up now.

Arnd's patch assumes all call sites can be eliminated, i.e. all of the
users are static functions assigned to static fops and compiler is
clever enough.  It does solve my immediate problem but let's wait and
see if that bites us on the rear later :)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-11-28 18:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-27 20:35 [PATCH v2] debugfs: add definition of debugfs_real_fops() if CONFIG_DEBUG_FS unset Jakub Kicinski
2017-11-28 11:47 ` [oss-drivers] " Simon Horman
2017-11-28 14:23 ` Greg Kroah-Hartman
2017-11-28 18:23   ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).