1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
|
From: David Herrmann <dh.herrmann@gmail.com>
Date: Thu, 23 Apr 2015 10:23:38 +0200
Subject: [PATCH] kdbus: fix up documentation of ioctl handlers
We support feature negotiation on ioctls. As this is not necessarily fully
generic, we indicate this by returning >0 from kdbus_args_parse().
Therefore, all ioctl handlers that forward the return value of
kdbus_args_parse() might also return >0 on negotiation. Which is totally
fine and handled in kdbus_handle_ioctl(). However, the documentation of
the ioctl handlers doesn't reflect that behavior. Fix those up!
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
---
ipc/kdbus/bus.c | 4 ++--
ipc/kdbus/connection.c | 14 +++++++-------
ipc/kdbus/endpoint.c | 4 ++--
ipc/kdbus/match.c | 4 ++--
ipc/kdbus/names.c | 6 +++---
5 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/ipc/kdbus/bus.c b/ipc/kdbus/bus.c
index d5475961b896..bbdf0f2f391e 100644
--- a/ipc/kdbus/bus.c
+++ b/ipc/kdbus/bus.c
@@ -365,7 +365,7 @@ void kdbus_bus_eavesdrop(struct kdbus_bus *bus,
* @domain: domain to operate on
* @argp: command payload
*
- * Return: Newly created bus on success, ERR_PTR on failure.
+ * Return: NULL or newly created bus on success, ERR_PTR on failure.
*/
struct kdbus_bus *kdbus_cmd_bus_make(struct kdbus_domain *domain,
void __user *argp)
@@ -459,7 +459,7 @@ exit:
* @conn: connection to operate on
* @argp: command payload
*
- * Return: 0 on success, negative error code on failure.
+ * Return: >=0 on success, negative error code on failure.
*/
int kdbus_cmd_bus_creator_info(struct kdbus_conn *conn, void __user *argp)
{
diff --git a/ipc/kdbus/connection.c b/ipc/kdbus/connection.c
index cbfbf3847c24..8ee62fc0bd46 100644
--- a/ipc/kdbus/connection.c
+++ b/ipc/kdbus/connection.c
@@ -1589,7 +1589,7 @@ bool kdbus_conn_policy_see_notification(struct kdbus_conn *conn,
* @privileged: Whether the caller is privileged
* @argp: Command payload
*
- * Return: Newly created connection on success, ERR_PTR on failure.
+ * Return: NULL or newly created connection on success, ERR_PTR on failure.
*/
struct kdbus_conn *kdbus_cmd_hello(struct kdbus_ep *ep, bool privileged,
void __user *argp)
@@ -1676,7 +1676,7 @@ exit:
*
* The caller must not hold any active reference to @conn or this will deadlock.
*
- * Return: 0 on success, negative error code on failure.
+ * Return: >=0 on success, negative error code on failure.
*/
int kdbus_cmd_byebye_unlocked(struct kdbus_conn *conn, void __user *argp)
{
@@ -1708,7 +1708,7 @@ int kdbus_cmd_byebye_unlocked(struct kdbus_conn *conn, void __user *argp)
* @conn: connection to operate on
* @argp: command payload
*
- * Return: 0 on success, negative error code on failure.
+ * Return: >=0 on success, negative error code on failure.
*/
int kdbus_cmd_conn_info(struct kdbus_conn *conn, void __user *argp)
{
@@ -1838,7 +1838,7 @@ exit:
* @conn: connection to operate on
* @argp: command payload
*
- * Return: 0 on success, negative error code on failure.
+ * Return: >=0 on success, negative error code on failure.
*/
int kdbus_cmd_update(struct kdbus_conn *conn, void __user *argp)
{
@@ -1935,7 +1935,7 @@ exit:
* @f: file this command was called on
* @argp: command payload
*
- * Return: 0 on success, negative error code on failure.
+ * Return: >=0 on success, negative error code on failure.
*/
int kdbus_cmd_send(struct kdbus_conn *conn, struct file *f, void __user *argp)
{
@@ -2031,7 +2031,7 @@ exit:
* @conn: connection to operate on
* @argp: command payload
*
- * Return: 0 on success, negative error code on failure.
+ * Return: >=0 on success, negative error code on failure.
*/
int kdbus_cmd_recv(struct kdbus_conn *conn, void __user *argp)
{
@@ -2154,7 +2154,7 @@ exit:
* @conn: connection to operate on
* @argp: command payload
*
- * Return: 0 on success, negative error code on failure.
+ * Return: >=0 on success, negative error code on failure.
*/
int kdbus_cmd_free(struct kdbus_conn *conn, void __user *argp)
{
diff --git a/ipc/kdbus/endpoint.c b/ipc/kdbus/endpoint.c
index 174d274b113e..9a95a5ea84d7 100644
--- a/ipc/kdbus/endpoint.c
+++ b/ipc/kdbus/endpoint.c
@@ -188,7 +188,7 @@ struct kdbus_ep *kdbus_ep_unref(struct kdbus_ep *ep)
* @bus: bus to operate on
* @argp: command payload
*
- * Return: Newly created endpoint on success, ERR_PTR on failure.
+ * Return: NULL or newly created endpoint on success, ERR_PTR on failure.
*/
struct kdbus_ep *kdbus_cmd_ep_make(struct kdbus_bus *bus, void __user *argp)
{
@@ -247,7 +247,7 @@ exit:
* @ep: endpoint to operate on
* @argp: command payload
*
- * Return: Newly created endpoint on success, ERR_PTR on failure.
+ * Return: >=0 on success, negative error code on failure.
*/
int kdbus_cmd_ep_update(struct kdbus_ep *ep, void __user *argp)
{
diff --git a/ipc/kdbus/match.c b/ipc/kdbus/match.c
index 30cec1ca819f..cc083b4211de 100644
--- a/ipc/kdbus/match.c
+++ b/ipc/kdbus/match.c
@@ -368,7 +368,7 @@ static int kdbus_match_db_remove_unlocked(struct kdbus_match_db *mdb,
* are used to match messages from userspace, while the others apply to
* kernel-generated notifications.
*
- * Return: 0 on success, negative error code on failure.
+ * Return: >=0 on success, negative error code on failure.
*/
int kdbus_cmd_match_add(struct kdbus_conn *conn, void __user *argp)
{
@@ -528,7 +528,7 @@ exit:
* @conn: connection to operate on
* @argp: command payload
*
- * Return: 0 on success, negative error code on failure.
+ * Return: >=0 on success, negative error code on failure.
*/
int kdbus_cmd_match_remove(struct kdbus_conn *conn, void __user *argp)
{
diff --git a/ipc/kdbus/names.c b/ipc/kdbus/names.c
index 657008e1bb37..5f5d84ea0e8e 100644
--- a/ipc/kdbus/names.c
+++ b/ipc/kdbus/names.c
@@ -469,7 +469,7 @@ void kdbus_name_release_all(struct kdbus_name_registry *reg,
* @conn: connection to operate on
* @argp: command payload
*
- * Return: 0 on success, negative error code on failure.
+ * Return: >=0 on success, negative error code on failure.
*/
int kdbus_cmd_name_acquire(struct kdbus_conn *conn, void __user *argp)
{
@@ -528,7 +528,7 @@ exit:
* @conn: connection to operate on
* @argp: command payload
*
- * Return: 0 on success, negative error code on failure.
+ * Return: >=0 on success, negative error code on failure.
*/
int kdbus_cmd_name_release(struct kdbus_conn *conn, void __user *argp)
{
@@ -699,7 +699,7 @@ static int kdbus_list_all(struct kdbus_conn *conn, u64 flags,
* @conn: connection to operate on
* @argp: command payload
*
- * Return: 0 on success, negative error code on failure.
+ * Return: >=0 on success, negative error code on failure.
*/
int kdbus_cmd_list(struct kdbus_conn *conn, void __user *argp)
{
|