From b1f0d7a406a884a3a1d7b2b97b6578b36da09fc0 Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Wed, 22 Oct 2014 11:58:01 +0200 Subject: [PATCH] handle.c: fix and add kernel-doc Signed-off-by: Daniel Mack --- connection.c | 1 - endpoint.c | 2 +- handle.c | 19 +++++++++++++++++++ match.c | 3 +-- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/connection.c b/connection.c index 04f0538..8adf116 100644 --- a/connection.c +++ b/connection.c @@ -1204,7 +1204,6 @@ int kdbus_conn_move_messages(struct kdbus_conn *conn_dst, * kdbus_cmd_conn_info() - retrieve info about a connection * @conn: Connection * @cmd_info: The command as passed in by the ioctl - * @size: Size of the passed data structure * * Return: 0 on success, negative errno on failure. */ diff --git a/endpoint.c b/endpoint.c index 36411ad..8304360 100644 --- a/endpoint.c +++ b/endpoint.c @@ -335,7 +335,7 @@ int kdbus_ep_policy_check_see_access(struct kdbus_ep *ep, * the name in a notification * @ep: Endpoint to operate on * @conn: Connection connected to the endpoint - * @kmsg The message carrying the notification + * @kmsg: The message carrying the notification * * This function verifies that @conn is allowed to see the well-known name * inside a name-change notification contained in @msg via the endpoint @ep. diff --git a/handle.c b/handle.c index 5e6843d..3d59415 100644 --- a/handle.c +++ b/handle.c @@ -171,6 +171,15 @@ static void kdbus_minor_unref(enum kdbus_minor_type type, void *ptr) } } +/** + * kdbus_minor_alloc() - allocate a minor for a new kdbus device node + * @type: The type of device to allocate + * @ptr: The opaque pointer of the new device to store + * @out: Pointer to a dev_t for storing the result. + * + * Returns: 0 on success, in which case @out is set to the newly allocated + * device node. + */ int kdbus_minor_alloc(enum kdbus_minor_type type, void *ptr, dev_t *out) { int ret; @@ -190,6 +199,10 @@ int kdbus_minor_alloc(enum kdbus_minor_type type, void *ptr, dev_t *out) return 0; } +/** + * kdbus_minor_free() - free a minor of a kdbus device node + * @devt: The device node to remove + */ void kdbus_minor_free(dev_t devt) { unsigned int minor = MINOR(devt); @@ -202,6 +215,12 @@ void kdbus_minor_free(dev_t devt) spin_unlock(&kdbus_minor_lock); } +/** + * kdbus_minor_set() - set an existing minor type of a kdbus device node + * @devt: The device node to remove + * @type: New type to set + * @ptr: Associated pointer when node was initially registered + */ void kdbus_minor_set(dev_t devt, enum kdbus_minor_type type, void *ptr) { unsigned int minor = MINOR(devt); diff --git a/match.c b/match.c index 689c0e2..86458a6 100644 --- a/match.c +++ b/match.c @@ -32,6 +32,7 @@ * struct kdbus_match_db - message filters * @entries_list: List of matches * @entries_lock: Match data lock + * @entries: Number of entries in database */ struct kdbus_match_db { struct list_head entries_list; @@ -328,8 +329,6 @@ static int __kdbus_match_db_remove_unlocked(struct kdbus_match_db *db, * kdbus_match_db_add() - add an entry to the match database * @conn: The connection that was used in the ioctl call * @cmd: The command as provided by the ioctl call - * @replace: If an entry with the given cookie already exists, - * replace it with the new one. * * This function is used in the context of the KDBUS_CMD_MATCH_ADD ioctl * interface. -- 2.34.1