Skip to content

Commit

Permalink
fs: debugfs: add forward declaration for struct device type
Browse files Browse the repository at this point in the history
The function debugfs_create_devm_seqfile() has a parameter of type
struct device pointer. This type needs to be forward declared to
avoid compilation issues on certain architectures and/or kernel
configurations. The function was introduced with:

  commit 98210b7
  Author: Arend van Spriel <arend@broadcom.com>
  Date:   Sun Nov 9 11:31:58 2014 +0100

     debugfs: add helper function to create device related seq_file

The reported build failure for sparc64 architecture was:

  make.cross ARCH=sparc64

All warnings:

   In file included from fs/debugfs/file.c:21:0:
   include/linux/debugfs.h:105:10: warning: 'struct device' declared
   inside parameter list
             void *data));
             ^

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Arend van Spriel authored and Greg Kroah-Hartman committed Nov 30, 2014
1 parent daa3d67 commit f30d0a8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/linux/debugfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#include <linux/types.h>

struct device;
struct file_operations;

struct debugfs_blob_wrapper {
Expand Down

0 comments on commit f30d0a8

Please sign in to comment.