* [PATCH 2/8] debugfs: remove return value of debugfs_create_u16()
2019-10-11 13:29 [PATCH 1/8] debugfs: remove return value of debugfs_create_u8() Greg Kroah-Hartman
@ 2019-10-11 13:29 ` Greg Kroah-Hartman
2019-10-11 13:29 ` [PATCH 3/8] debugfs: remove return value of debugfs_create_u64() Greg Kroah-Hartman
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Greg Kroah-Hartman @ 2019-10-11 13:29 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman
No one checks the return value of debugfs_create_u16(), as it's not
needed, so make the return value void, so that no one tries to do so in
the future.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
Documentation/filesystems/debugfs.txt | 4 ++--
fs/debugfs/file.c | 15 +++------------
include/linux/debugfs.h | 12 ++++--------
3 files changed, 9 insertions(+), 22 deletions(-)
diff --git a/Documentation/filesystems/debugfs.txt b/Documentation/filesystems/debugfs.txt
index c146f18eb8ac..6abcf41fbd37 100644
--- a/Documentation/filesystems/debugfs.txt
+++ b/Documentation/filesystems/debugfs.txt
@@ -70,8 +70,8 @@ created with any of:
void debugfs_create_u8(const char *name, umode_t mode,
struct dentry *parent, u8 *value);
- struct dentry *debugfs_create_u16(const char *name, umode_t mode,
- struct dentry *parent, u16 *value);
+ void debugfs_create_u16(const char *name, umode_t mode,
+ struct dentry *parent, u16 *value);
struct dentry *debugfs_create_u32(const char *name, umode_t mode,
struct dentry *parent, u32 *value);
struct dentry *debugfs_create_u64(const char *name, umode_t mode,
diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c
index 2d5d9a0a6f57..8091a7ef3589 100644
--- a/fs/debugfs/file.c
+++ b/fs/debugfs/file.c
@@ -456,20 +456,11 @@ DEFINE_DEBUGFS_ATTRIBUTE(fops_u16_wo, NULL, debugfs_u16_set, "%llu\n");
* This function creates a file in debugfs with the given name that
* contains the value of the variable @value. If the @mode variable is so
* set, it can be read from, and written to.
- *
- * This function will return a pointer to a dentry if it succeeds. This
- * pointer must be passed to the debugfs_remove() function when the file is
- * to be removed (no automatic cleanup happens if your module is unloaded,
- * you are responsible here.) If an error occurs, %ERR_PTR(-ERROR) will be
- * returned.
- *
- * If debugfs is not enabled in the kernel, the value %ERR_PTR(-ENODEV) will
- * be returned.
*/
-struct dentry *debugfs_create_u16(const char *name, umode_t mode,
- struct dentry *parent, u16 *value)
+void debugfs_create_u16(const char *name, umode_t mode, struct dentry *parent,
+ u16 *value)
{
- return debugfs_create_mode_unsafe(name, mode, parent, value, &fops_u16,
+ debugfs_create_mode_unsafe(name, mode, parent, value, &fops_u16,
&fops_u16_ro, &fops_u16_wo);
}
EXPORT_SYMBOL_GPL(debugfs_create_u16);
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h
index 8e071f599245..c83a33a76b6c 100644
--- a/include/linux/debugfs.h
+++ b/include/linux/debugfs.h
@@ -99,8 +99,8 @@ struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry,
void debugfs_create_u8(const char *name, umode_t mode, struct dentry *parent,
u8 *value);
-struct dentry *debugfs_create_u16(const char *name, umode_t mode,
- struct dentry *parent, u16 *value);
+void debugfs_create_u16(const char *name, umode_t mode, struct dentry *parent,
+ u16 *value);
struct dentry *debugfs_create_u32(const char *name, umode_t mode,
struct dentry *parent, u32 *value);
struct dentry *debugfs_create_u64(const char *name, umode_t mode,
@@ -247,12 +247,8 @@ static inline struct dentry *debugfs_rename(struct dentry *old_dir, struct dentr
static inline void debugfs_create_u8(const char *name, umode_t mode,
struct dentry *parent, u8 *value) { }
-static inline struct dentry *debugfs_create_u16(const char *name, umode_t mode,
- struct dentry *parent,
- u16 *value)
-{
- return ERR_PTR(-ENODEV);
-}
+static inline void debugfs_create_u16(const char *name, umode_t mode,
+ struct dentry *parent, u16 *value) { }
static inline struct dentry *debugfs_create_u32(const char *name, umode_t mode,
struct dentry *parent,
--
2.23.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/8] debugfs: remove return value of debugfs_create_u64()
2019-10-11 13:29 [PATCH 1/8] debugfs: remove return value of debugfs_create_u8() Greg Kroah-Hartman
2019-10-11 13:29 ` [PATCH 2/8] debugfs: remove return value of debugfs_create_u16() Greg Kroah-Hartman
@ 2019-10-11 13:29 ` Greg Kroah-Hartman
2019-10-11 13:29 ` [PATCH 4/8] debugfs: remove return value of debugfs_create_size_t() Greg Kroah-Hartman
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Greg Kroah-Hartman @ 2019-10-11 13:29 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman
No one checks the return value of debugfs_create_u64(), as it's not
needed, so make the return value void, so that no one tries to do so in
the future.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
Documentation/filesystems/debugfs.txt | 4 ++--
fs/debugfs/file.c | 15 +++------------
include/linux/debugfs.h | 12 ++++--------
3 files changed, 9 insertions(+), 22 deletions(-)
diff --git a/Documentation/filesystems/debugfs.txt b/Documentation/filesystems/debugfs.txt
index 6abcf41fbd37..1b299ae4904d 100644
--- a/Documentation/filesystems/debugfs.txt
+++ b/Documentation/filesystems/debugfs.txt
@@ -74,8 +74,8 @@ created with any of:
struct dentry *parent, u16 *value);
struct dentry *debugfs_create_u32(const char *name, umode_t mode,
struct dentry *parent, u32 *value);
- struct dentry *debugfs_create_u64(const char *name, umode_t mode,
- struct dentry *parent, u64 *value);
+ void debugfs_create_u64(const char *name, umode_t mode,
+ struct dentry *parent, u64 *value);
These files support both reading and writing the given value; if a specific
file should not be written to, simply set the mode bits accordingly. The
diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c
index 8091a7ef3589..4c8912d7d34c 100644
--- a/fs/debugfs/file.c
+++ b/fs/debugfs/file.c
@@ -538,20 +538,11 @@ DEFINE_DEBUGFS_ATTRIBUTE(fops_u64_wo, NULL, debugfs_u64_set, "%llu\n");
* This function creates a file in debugfs with the given name that
* contains the value of the variable @value. If the @mode variable is so
* set, it can be read from, and written to.
- *
- * This function will return a pointer to a dentry if it succeeds. This
- * pointer must be passed to the debugfs_remove() function when the file is
- * to be removed (no automatic cleanup happens if your module is unloaded,
- * you are responsible here.) If an error occurs, %ERR_PTR(-ERROR) will be
- * returned.
- *
- * If debugfs is not enabled in the kernel, the value %ERR_PTR(-ENODEV) will
- * be returned.
*/
-struct dentry *debugfs_create_u64(const char *name, umode_t mode,
- struct dentry *parent, u64 *value)
+void debugfs_create_u64(const char *name, umode_t mode, struct dentry *parent,
+ u64 *value)
{
- return debugfs_create_mode_unsafe(name, mode, parent, value, &fops_u64,
+ debugfs_create_mode_unsafe(name, mode, parent, value, &fops_u64,
&fops_u64_ro, &fops_u64_wo);
}
EXPORT_SYMBOL_GPL(debugfs_create_u64);
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h
index c83a33a76b6c..b3bed4d61733 100644
--- a/include/linux/debugfs.h
+++ b/include/linux/debugfs.h
@@ -103,8 +103,8 @@ void debugfs_create_u16(const char *name, umode_t mode, struct dentry *parent,
u16 *value);
struct dentry *debugfs_create_u32(const char *name, umode_t mode,
struct dentry *parent, u32 *value);
-struct dentry *debugfs_create_u64(const char *name, umode_t mode,
- struct dentry *parent, u64 *value);
+void debugfs_create_u64(const char *name, umode_t mode, struct dentry *parent,
+ u64 *value);
struct dentry *debugfs_create_ulong(const char *name, umode_t mode,
struct dentry *parent, unsigned long *value);
struct dentry *debugfs_create_x8(const char *name, umode_t mode,
@@ -257,12 +257,8 @@ static inline struct dentry *debugfs_create_u32(const char *name, umode_t mode,
return ERR_PTR(-ENODEV);
}
-static inline struct dentry *debugfs_create_u64(const char *name, umode_t mode,
- struct dentry *parent,
- u64 *value)
-{
- return ERR_PTR(-ENODEV);
-}
+static inline void debugfs_create_u64(const char *name, umode_t mode,
+ struct dentry *parent, u64 *value) { }
static inline struct dentry *debugfs_create_ulong(const char *name,
umode_t mode,
--
2.23.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/8] debugfs: remove return value of debugfs_create_size_t()
2019-10-11 13:29 [PATCH 1/8] debugfs: remove return value of debugfs_create_u8() Greg Kroah-Hartman
2019-10-11 13:29 ` [PATCH 2/8] debugfs: remove return value of debugfs_create_u16() Greg Kroah-Hartman
2019-10-11 13:29 ` [PATCH 3/8] debugfs: remove return value of debugfs_create_u64() Greg Kroah-Hartman
@ 2019-10-11 13:29 ` Greg Kroah-Hartman
2019-10-11 13:29 ` [PATCH 5/8] debugfs: remove return value of debugfs_create_x8() Greg Kroah-Hartman
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Greg Kroah-Hartman @ 2019-10-11 13:29 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman
No one checks the return value of debugfs_create_size_t(), as it's not
needed, so make the return value void, so that no one tries to do so in
the future.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
Documentation/filesystems/debugfs.txt | 5 ++---
fs/debugfs/file.c | 9 ++++-----
include/linux/debugfs.h | 13 +++++--------
3 files changed, 11 insertions(+), 16 deletions(-)
diff --git a/Documentation/filesystems/debugfs.txt b/Documentation/filesystems/debugfs.txt
index 1b299ae4904d..55a5da08c71c 100644
--- a/Documentation/filesystems/debugfs.txt
+++ b/Documentation/filesystems/debugfs.txt
@@ -96,9 +96,8 @@ value to be exported. Some types can have different widths on different
architectures, though, complicating the situation somewhat. There is a
function meant to help out in one special case:
- struct dentry *debugfs_create_size_t(const char *name, umode_t mode,
- struct dentry *parent,
- size_t *value);
+ void debugfs_create_size_t(const char *name, umode_t mode,
+ struct dentry *parent, size_t *value);
As might be expected, this function will create a debugfs file to represent
a variable of type size_t.
diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c
index 4c8912d7d34c..dfeda13023b3 100644
--- a/fs/debugfs/file.c
+++ b/fs/debugfs/file.c
@@ -721,12 +721,11 @@ DEFINE_DEBUGFS_ATTRIBUTE(fops_size_t_wo, NULL, debugfs_size_t_set, "%llu\n");
* @value: a pointer to the variable that the file should read to and write
* from.
*/
-struct dentry *debugfs_create_size_t(const char *name, umode_t mode,
- struct dentry *parent, size_t *value)
+void debugfs_create_size_t(const char *name, umode_t mode,
+ struct dentry *parent, size_t *value)
{
- return debugfs_create_mode_unsafe(name, mode, parent, value,
- &fops_size_t, &fops_size_t_ro,
- &fops_size_t_wo);
+ debugfs_create_mode_unsafe(name, mode, parent, value, &fops_size_t,
+ &fops_size_t_ro, &fops_size_t_wo);
}
EXPORT_SYMBOL_GPL(debugfs_create_size_t);
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h
index b3bed4d61733..1d859bc657bd 100644
--- a/include/linux/debugfs.h
+++ b/include/linux/debugfs.h
@@ -115,8 +115,8 @@ struct dentry *debugfs_create_x32(const char *name, umode_t mode,
struct dentry *parent, u32 *value);
struct dentry *debugfs_create_x64(const char *name, umode_t mode,
struct dentry *parent, u64 *value);
-struct dentry *debugfs_create_size_t(const char *name, umode_t mode,
- struct dentry *parent, size_t *value);
+void debugfs_create_size_t(const char *name, umode_t mode,
+ struct dentry *parent, size_t *value);
struct dentry *debugfs_create_atomic_t(const char *name, umode_t mode,
struct dentry *parent, atomic_t *value);
struct dentry *debugfs_create_bool(const char *name, umode_t mode,
@@ -296,12 +296,9 @@ static inline struct dentry *debugfs_create_x64(const char *name, umode_t mode,
return ERR_PTR(-ENODEV);
}
-static inline struct dentry *debugfs_create_size_t(const char *name, umode_t mode,
- struct dentry *parent,
- size_t *value)
-{
- return ERR_PTR(-ENODEV);
-}
+static inline void debugfs_create_size_t(const char *name, umode_t mode,
+ struct dentry *parent, size_t *value)
+{ }
static inline struct dentry *debugfs_create_atomic_t(const char *name, umode_t mode,
struct dentry *parent, atomic_t *value)
--
2.23.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 5/8] debugfs: remove return value of debugfs_create_x8()
2019-10-11 13:29 [PATCH 1/8] debugfs: remove return value of debugfs_create_u8() Greg Kroah-Hartman
` (2 preceding siblings ...)
2019-10-11 13:29 ` [PATCH 4/8] debugfs: remove return value of debugfs_create_size_t() Greg Kroah-Hartman
@ 2019-10-11 13:29 ` Greg Kroah-Hartman
2019-10-11 13:29 ` [PATCH 6/8] debugfs: remove return value of debugfs_create_x16() Greg Kroah-Hartman
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Greg Kroah-Hartman @ 2019-10-11 13:29 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman
No one checks the return value of debugfs_create_x8(), as it's not
needed, so make the return value void, so that no one tries to do so in
the future.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
Documentation/filesystems/debugfs.txt | 4 ++--
fs/debugfs/file.c | 6 +++---
include/linux/debugfs.h | 12 ++++--------
3 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/Documentation/filesystems/debugfs.txt b/Documentation/filesystems/debugfs.txt
index 55a5da08c71c..2c4ea9b73572 100644
--- a/Documentation/filesystems/debugfs.txt
+++ b/Documentation/filesystems/debugfs.txt
@@ -82,8 +82,8 @@ file should not be written to, simply set the mode bits accordingly. The
values in these files are in decimal; if hexadecimal is more appropriate,
the following functions can be used instead:
- struct dentry *debugfs_create_x8(const char *name, umode_t mode,
- struct dentry *parent, u8 *value);
+ void debugfs_create_x8(const char *name, umode_t mode,
+ struct dentry *parent, u8 *value);
struct dentry *debugfs_create_x16(const char *name, umode_t mode,
struct dentry *parent, u16 *value);
struct dentry *debugfs_create_x32(const char *name, umode_t mode,
diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c
index dfeda13023b3..693c9336b040 100644
--- a/fs/debugfs/file.c
+++ b/fs/debugfs/file.c
@@ -633,10 +633,10 @@ DEFINE_DEBUGFS_ATTRIBUTE(fops_x64_wo, NULL, debugfs_u64_set, "0x%016llx\n");
* @value: a pointer to the variable that the file should read to and write
* from.
*/
-struct dentry *debugfs_create_x8(const char *name, umode_t mode,
- struct dentry *parent, u8 *value)
+void debugfs_create_x8(const char *name, umode_t mode, struct dentry *parent,
+ u8 *value)
{
- return debugfs_create_mode_unsafe(name, mode, parent, value, &fops_x8,
+ debugfs_create_mode_unsafe(name, mode, parent, value, &fops_x8,
&fops_x8_ro, &fops_x8_wo);
}
EXPORT_SYMBOL_GPL(debugfs_create_x8);
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h
index 1d859bc657bd..70d38dc6b151 100644
--- a/include/linux/debugfs.h
+++ b/include/linux/debugfs.h
@@ -107,8 +107,8 @@ void debugfs_create_u64(const char *name, umode_t mode, struct dentry *parent,
u64 *value);
struct dentry *debugfs_create_ulong(const char *name, umode_t mode,
struct dentry *parent, unsigned long *value);
-struct dentry *debugfs_create_x8(const char *name, umode_t mode,
- struct dentry *parent, u8 *value);
+void debugfs_create_x8(const char *name, umode_t mode, struct dentry *parent,
+ u8 *value);
struct dentry *debugfs_create_x16(const char *name, umode_t mode,
struct dentry *parent, u16 *value);
struct dentry *debugfs_create_x32(const char *name, umode_t mode,
@@ -268,12 +268,8 @@ static inline struct dentry *debugfs_create_ulong(const char *name,
return ERR_PTR(-ENODEV);
}
-static inline struct dentry *debugfs_create_x8(const char *name, umode_t mode,
- struct dentry *parent,
- u8 *value)
-{
- return ERR_PTR(-ENODEV);
-}
+static inline void debugfs_create_x8(const char *name, umode_t mode,
+ struct dentry *parent, u8 *value) { }
static inline struct dentry *debugfs_create_x16(const char *name, umode_t mode,
struct dentry *parent,
--
2.23.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 6/8] debugfs: remove return value of debugfs_create_x16()
2019-10-11 13:29 [PATCH 1/8] debugfs: remove return value of debugfs_create_u8() Greg Kroah-Hartman
` (3 preceding siblings ...)
2019-10-11 13:29 ` [PATCH 5/8] debugfs: remove return value of debugfs_create_x8() Greg Kroah-Hartman
@ 2019-10-11 13:29 ` Greg Kroah-Hartman
2019-10-11 13:29 ` [PATCH 7/8] debugfs: remove return value of debugfs_create_x32() Greg Kroah-Hartman
2019-10-11 13:29 ` [PATCH 8/8] debugfs: remove return value of debugfs_create_x64() Greg Kroah-Hartman
6 siblings, 0 replies; 8+ messages in thread
From: Greg Kroah-Hartman @ 2019-10-11 13:29 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman
No one checks the return value of debugfs_create_x16(), as it's not
needed, so make the return value void, so that no one tries to do so in
the future.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
Documentation/filesystems/debugfs.txt | 4 ++--
fs/debugfs/file.c | 6 +++---
include/linux/debugfs.h | 12 ++++--------
3 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/Documentation/filesystems/debugfs.txt b/Documentation/filesystems/debugfs.txt
index 2c4ea9b73572..674ce905b7f7 100644
--- a/Documentation/filesystems/debugfs.txt
+++ b/Documentation/filesystems/debugfs.txt
@@ -84,8 +84,8 @@ the following functions can be used instead:
void debugfs_create_x8(const char *name, umode_t mode,
struct dentry *parent, u8 *value);
- struct dentry *debugfs_create_x16(const char *name, umode_t mode,
- struct dentry *parent, u16 *value);
+ void debugfs_create_x16(const char *name, umode_t mode,
+ struct dentry *parent, u16 *value);
struct dentry *debugfs_create_x32(const char *name, umode_t mode,
struct dentry *parent, u32 *value);
struct dentry *debugfs_create_x64(const char *name, umode_t mode,
diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c
index 693c9336b040..046426db4644 100644
--- a/fs/debugfs/file.c
+++ b/fs/debugfs/file.c
@@ -651,10 +651,10 @@ EXPORT_SYMBOL_GPL(debugfs_create_x8);
* @value: a pointer to the variable that the file should read to and write
* from.
*/
-struct dentry *debugfs_create_x16(const char *name, umode_t mode,
- struct dentry *parent, u16 *value)
+void debugfs_create_x16(const char *name, umode_t mode, struct dentry *parent,
+ u16 *value)
{
- return debugfs_create_mode_unsafe(name, mode, parent, value, &fops_x16,
+ debugfs_create_mode_unsafe(name, mode, parent, value, &fops_x16,
&fops_x16_ro, &fops_x16_wo);
}
EXPORT_SYMBOL_GPL(debugfs_create_x16);
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h
index 70d38dc6b151..d081f51defd5 100644
--- a/include/linux/debugfs.h
+++ b/include/linux/debugfs.h
@@ -109,8 +109,8 @@ struct dentry *debugfs_create_ulong(const char *name, umode_t mode,
struct dentry *parent, unsigned long *value);
void debugfs_create_x8(const char *name, umode_t mode, struct dentry *parent,
u8 *value);
-struct dentry *debugfs_create_x16(const char *name, umode_t mode,
- struct dentry *parent, u16 *value);
+void debugfs_create_x16(const char *name, umode_t mode, struct dentry *parent,
+ u16 *value);
struct dentry *debugfs_create_x32(const char *name, umode_t mode,
struct dentry *parent, u32 *value);
struct dentry *debugfs_create_x64(const char *name, umode_t mode,
@@ -271,12 +271,8 @@ static inline struct dentry *debugfs_create_ulong(const char *name,
static inline void debugfs_create_x8(const char *name, umode_t mode,
struct dentry *parent, u8 *value) { }
-static inline struct dentry *debugfs_create_x16(const char *name, umode_t mode,
- struct dentry *parent,
- u16 *value)
-{
- return ERR_PTR(-ENODEV);
-}
+static inline void debugfs_create_x16(const char *name, umode_t mode,
+ struct dentry *parent, u16 *value) { }
static inline struct dentry *debugfs_create_x32(const char *name, umode_t mode,
struct dentry *parent,
--
2.23.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 7/8] debugfs: remove return value of debugfs_create_x32()
2019-10-11 13:29 [PATCH 1/8] debugfs: remove return value of debugfs_create_u8() Greg Kroah-Hartman
` (4 preceding siblings ...)
2019-10-11 13:29 ` [PATCH 6/8] debugfs: remove return value of debugfs_create_x16() Greg Kroah-Hartman
@ 2019-10-11 13:29 ` Greg Kroah-Hartman
2019-10-11 13:29 ` [PATCH 8/8] debugfs: remove return value of debugfs_create_x64() Greg Kroah-Hartman
6 siblings, 0 replies; 8+ messages in thread
From: Greg Kroah-Hartman @ 2019-10-11 13:29 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman
No one checks the return value of debugfs_create_x32(), as it's not
needed, so make the return value void, so that no one tries to do so in
the future.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
Documentation/filesystems/debugfs.txt | 4 ++--
fs/debugfs/file.c | 6 +++---
include/linux/debugfs.h | 12 ++++--------
3 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/Documentation/filesystems/debugfs.txt b/Documentation/filesystems/debugfs.txt
index 674ce905b7f7..fa2284ad6129 100644
--- a/Documentation/filesystems/debugfs.txt
+++ b/Documentation/filesystems/debugfs.txt
@@ -86,8 +86,8 @@ the following functions can be used instead:
struct dentry *parent, u8 *value);
void debugfs_create_x16(const char *name, umode_t mode,
struct dentry *parent, u16 *value);
- struct dentry *debugfs_create_x32(const char *name, umode_t mode,
- struct dentry *parent, u32 *value);
+ void debugfs_create_x32(const char *name, umode_t mode,
+ struct dentry *parent, u32 *value);
struct dentry *debugfs_create_x64(const char *name, umode_t mode,
struct dentry *parent, u64 *value);
diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c
index 046426db4644..54a0db733574 100644
--- a/fs/debugfs/file.c
+++ b/fs/debugfs/file.c
@@ -669,10 +669,10 @@ EXPORT_SYMBOL_GPL(debugfs_create_x16);
* @value: a pointer to the variable that the file should read to and write
* from.
*/
-struct dentry *debugfs_create_x32(const char *name, umode_t mode,
- struct dentry *parent, u32 *value)
+void debugfs_create_x32(const char *name, umode_t mode, struct dentry *parent,
+ u32 *value)
{
- return debugfs_create_mode_unsafe(name, mode, parent, value, &fops_x32,
+ debugfs_create_mode_unsafe(name, mode, parent, value, &fops_x32,
&fops_x32_ro, &fops_x32_wo);
}
EXPORT_SYMBOL_GPL(debugfs_create_x32);
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h
index d081f51defd5..25c213e9158e 100644
--- a/include/linux/debugfs.h
+++ b/include/linux/debugfs.h
@@ -111,8 +111,8 @@ void debugfs_create_x8(const char *name, umode_t mode, struct dentry *parent,
u8 *value);
void debugfs_create_x16(const char *name, umode_t mode, struct dentry *parent,
u16 *value);
-struct dentry *debugfs_create_x32(const char *name, umode_t mode,
- struct dentry *parent, u32 *value);
+void debugfs_create_x32(const char *name, umode_t mode, struct dentry *parent,
+ u32 *value);
struct dentry *debugfs_create_x64(const char *name, umode_t mode,
struct dentry *parent, u64 *value);
void debugfs_create_size_t(const char *name, umode_t mode,
@@ -274,12 +274,8 @@ static inline void debugfs_create_x8(const char *name, umode_t mode,
static inline void debugfs_create_x16(const char *name, umode_t mode,
struct dentry *parent, u16 *value) { }
-static inline struct dentry *debugfs_create_x32(const char *name, umode_t mode,
- struct dentry *parent,
- u32 *value)
-{
- return ERR_PTR(-ENODEV);
-}
+static inline void debugfs_create_x32(const char *name, umode_t mode,
+ struct dentry *parent, u32 *value) { }
static inline struct dentry *debugfs_create_x64(const char *name, umode_t mode,
struct dentry *parent,
--
2.23.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 8/8] debugfs: remove return value of debugfs_create_x64()
2019-10-11 13:29 [PATCH 1/8] debugfs: remove return value of debugfs_create_u8() Greg Kroah-Hartman
` (5 preceding siblings ...)
2019-10-11 13:29 ` [PATCH 7/8] debugfs: remove return value of debugfs_create_x32() Greg Kroah-Hartman
@ 2019-10-11 13:29 ` Greg Kroah-Hartman
6 siblings, 0 replies; 8+ messages in thread
From: Greg Kroah-Hartman @ 2019-10-11 13:29 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman
No one checks the return value of debugfs_create_x64(), as it's not
needed, so make the return value void, so that no one tries to do so in
the future.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
Documentation/filesystems/debugfs.txt | 4 ++--
fs/debugfs/file.c | 6 +++---
include/linux/debugfs.h | 12 ++++--------
3 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/Documentation/filesystems/debugfs.txt b/Documentation/filesystems/debugfs.txt
index fa2284ad6129..1ec4a94b6e93 100644
--- a/Documentation/filesystems/debugfs.txt
+++ b/Documentation/filesystems/debugfs.txt
@@ -88,8 +88,8 @@ the following functions can be used instead:
struct dentry *parent, u16 *value);
void debugfs_create_x32(const char *name, umode_t mode,
struct dentry *parent, u32 *value);
- struct dentry *debugfs_create_x64(const char *name, umode_t mode,
- struct dentry *parent, u64 *value);
+ void debugfs_create_x64(const char *name, umode_t mode,
+ struct dentry *parent, u64 *value);
These functions are useful as long as the developer knows the size of the
value to be exported. Some types can have different widths on different
diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c
index 54a0db733574..8aac1a9007c9 100644
--- a/fs/debugfs/file.c
+++ b/fs/debugfs/file.c
@@ -687,10 +687,10 @@ EXPORT_SYMBOL_GPL(debugfs_create_x32);
* @value: a pointer to the variable that the file should read to and write
* from.
*/
-struct dentry *debugfs_create_x64(const char *name, umode_t mode,
- struct dentry *parent, u64 *value)
+void debugfs_create_x64(const char *name, umode_t mode, struct dentry *parent,
+ u64 *value)
{
- return debugfs_create_mode_unsafe(name, mode, parent, value, &fops_x64,
+ debugfs_create_mode_unsafe(name, mode, parent, value, &fops_x64,
&fops_x64_ro, &fops_x64_wo);
}
EXPORT_SYMBOL_GPL(debugfs_create_x64);
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h
index 25c213e9158e..c127c159d10a 100644
--- a/include/linux/debugfs.h
+++ b/include/linux/debugfs.h
@@ -113,8 +113,8 @@ void debugfs_create_x16(const char *name, umode_t mode, struct dentry *parent,
u16 *value);
void debugfs_create_x32(const char *name, umode_t mode, struct dentry *parent,
u32 *value);
-struct dentry *debugfs_create_x64(const char *name, umode_t mode,
- struct dentry *parent, u64 *value);
+void debugfs_create_x64(const char *name, umode_t mode, struct dentry *parent,
+ u64 *value);
void debugfs_create_size_t(const char *name, umode_t mode,
struct dentry *parent, size_t *value);
struct dentry *debugfs_create_atomic_t(const char *name, umode_t mode,
@@ -277,12 +277,8 @@ static inline void debugfs_create_x16(const char *name, umode_t mode,
static inline void debugfs_create_x32(const char *name, umode_t mode,
struct dentry *parent, u32 *value) { }
-static inline struct dentry *debugfs_create_x64(const char *name, umode_t mode,
- struct dentry *parent,
- u64 *value)
-{
- return ERR_PTR(-ENODEV);
-}
+static inline void debugfs_create_x64(const char *name, umode_t mode,
+ struct dentry *parent, u64 *value) { }
static inline void debugfs_create_size_t(const char *name, umode_t mode,
struct dentry *parent, size_t *value)
--
2.23.0
^ permalink raw reply related [flat|nested] 8+ messages in thread