* Release a reference. If the reference count drops to 0, the bus will be
* freed.
*
- * Returns: NULL
+ * Return: NULL
*/
struct kdbus_bus *kdbus_bus_unref(struct kdbus_bus *bus)
{
* This function will allocate a new kdbus_bus and link it to the given
* namespace.
*
- * Returns: 0 on success, negative errno on failure.
+ * Return: 0 on success, negative errno on failure.
*/
int kdbus_bus_new(struct kdbus_ns *ns,
struct kdbus_cmd_make *make, const char *name,
* This function is part of the connection ioctl() interface and will parse
* the user-supplied data.
*
- * Returns: 0 on success, negative errno on failure.
+ * Return: 0 on success, negative errno on failure.
*/
int kdbus_bus_make_user(void __user *buf, struct kdbus_cmd_make **make,
char **name, size_t *bloom_size)
* @conn: Connection to work on
* @recv_user: A struct kdbus_cmd_recv containing the command details
*
- * Returns: 0 on success, negative errno on failure.
+ * Return: 0 on success, negative errno on failure
*/
int kdbus_conn_recv_msg_user(struct kdbus_conn *conn,
struct kdbus_cmd_recv __user *recv_buf)
* @conn_src: Connection, kernel-generated messages do not have one
* @kmsg: Message to send
*
- * Returns: 0 on success, negative errno on failure.
+ * Return: 0 on success, negative errno on failure
*/
int kdbus_conn_kmsg_send(struct kdbus_ep *ep,
struct kdbus_conn *conn_src,
*
* The list is cleared and freed after sending.
*
- * Returns 0 on success.
+ * Return: 0 on success, negative errno on failure
*/
int kdbus_conn_kmsg_list_send(struct kdbus_ep *ep,
struct list_head *kmsg_list)
* case the connection's message list is not
* empty
*
- * Returns 0 on success.
* If @ensure_msg_list_empty is true, and the connection has pending messages,
* -EBUSY is returned.
+ *
+ * Return: 0 on success, negative errno on failure
*/
int kdbus_conn_disconnect(struct kdbus_conn *conn, bool ensure_msg_list_empty)
{
* kdbus_conn_active() - connection is not disconnected
* @conn: Connection to check
*
- * Returns: true if the connection is still active
+ * Return: true if the connection is still active
*/
bool kdbus_conn_active(struct kdbus_conn *conn)
{
* kdbus_conn_ref() - take a connection reference
* @conn: Connection
*
- * Returns: the connection itself
+ * Return: the connection itself
*/
struct kdbus_conn *kdbus_conn_ref(struct kdbus_conn *conn)
{
* When the last reference is dropped, the connection's internal structure
* is freed.
*
- * Returns: NULL
+ * Return: NULL
*/
struct kdbus_conn *kdbus_conn_unref(struct kdbus_conn *conn)
{
* an ordinary connection is taking over a well-known name from a
* activator connection.
*
- * Returns: 0 on success, negative errno on failure.
+ * Return: 0 on success, negative errno on failure.
*/
int kdbus_conn_move_messages(struct kdbus_conn *conn_dst,
struct kdbus_conn *conn_src,
* @conn: Connection
* @buf: The returned offset to the message in the pool
*
- * Returns: 0 on success, negative errno on failure.
+ * Return: 0 on success, negative errno on failure.
*/
int kdbus_cmd_conn_info(struct kdbus_conn *conn,
void __user *buf)
* @meta: The metadata gathered at open() time of the handle
* @c: Returned connection
*
- * Returns: 0 on success, negative errno on failure.
+ * Return: 0 on success, negative errno on failure
*/
int kdbus_conn_new(struct kdbus_ep *ep,
struct kdbus_cmd_hello *hello,
* @conn: Connection
* @name: Well-know name to check for
*
- * Returns true if the name is currently owned by the connection.
+ * Return: true if the name is currently owned by the connection
*/
bool kdbus_conn_has_name(struct kdbus_conn *conn, const char *name)
{
* This function will create a new enpoint with the given
* name and properties for a given bus.
*
- * Returns: 0 on success, negative errno on failure.
+ * Return: 0 on success, negative errno on failure.
*/
int kdbus_ep_new(struct kdbus_bus *bus, struct kdbus_ns *ns, const char *name,
umode_t mode, kuid_t uid, kgid_t gid, bool policy_open)
* @make: The returned copy of user data
* @name: The name of the endpoint to create
*
- * Returns: 0 on success, negative errno on failure.
+ * Return: 0 on success, negative errno on failure.
*/
int kdbus_ep_make_user(void __user *buf,
struct kdbus_cmd_make **make, char **name)
* kdbus_match_db_new() - create a new match database
* @db: Pointer location for the returned database
*
- * Returns 0 on success, any other value in case of errors.
+ * Return: 0 on success, negative errno on failure.
*/
int kdbus_match_db_new(struct kdbus_match_db **db)
{
* with kdbus_match_db_add(). As soon as any of them has an all-satisfied rule
* set, this function will return true.
*
- * Returns true in if there was a matching database entry, false otherwise.
+ * Return: true if there was a matching database entry, false otherwise.
*/
bool kdbus_match_db_match_kmsg(struct kdbus_match_db *db,
struct kdbus_conn *conn_src,
* @conn: The connection that was used in the ioctl call
* @buf: The __user buffer that was provided by the ioctl call
*
- * Returns 0 in success, any other value in case of errors.
* This function is used in the context of the KDBUS_CMD_MATCH_ADD ioctl
* interface.
*
* Also note that KDBUS_ITEM_BLOOM, KDBUS_ITEM_NAME and KDBUS_ITEM_ID are
* used to match messages from userspace, while the others apply to kernel-
* generated notifications.
+
+ * Return: 0 on success, negative errno on failure
*/
int kdbus_match_db_add(struct kdbus_conn *conn, void __user *buf)
{
* @conn: The connection that was used in the ioctl call
* @buf: The __user buffer that was provided by the ioctl call
*
- * Returns 0 in success, any other value in case of errors.
* This function is used in the context of the KDBUS_CMD_MATCH_REMOVE
* ioctl interface.
+ *
+ * Return: 0 on success, negative errno on failure.
*/
int kdbus_match_db_remove(struct kdbus_conn *conn, void __user *buf)
{
* kdbus_is_memfd() - check if a file is one of our memfds
* @fp: File to check
*
- * Returns: true if the file is a memfd
+ * Return: true if the file is a memfd
*/
bool kdbus_is_memfd(const struct file *fp)
{
* kdbus_is_memfd_sealed() - check if a memfd is protected
* @fp: Memfd file to check
*
- * Returns: true if the memfd is protected
+ * Return: true if the memfd is protected
*/
bool kdbus_is_memfd_sealed(const struct file *fp)
{
* kdbus_memfd_size() - return the actual size of a memfd
* @fp: Memfd file to check
*
- * Returns: the actual size of the file in bytes
+ * Return: the actual size of the file in bytes
*/
u64 kdbus_memfd_size(const struct file *fp)
{
* @size: Initial size of the file
* @fd: Installed file descriptor
*
- * Returns: 0 on success, negative errno on failure.
+ * Return: 0 on success, negative errno on failure.
*/
int kdbus_memfd_new(const char *name, size_t size, int *fd)
{
* @extra_size: additional size to reserve for data
* @kmsg: Returned Message
*
- * Returns: 0 on success, negative errno on failure.
+ * Return: 0 on success, negative errno on failure.
*/
int kdbus_kmsg_new(size_t extra_size, struct kdbus_kmsg **kmsg)
{
* @conn: Connection
* @kmsg: Message
*
- * Returns: 0 on success, negative errno on failure.
+ * Return: 0 on success, negative errno on failure.
*/
static int kdbus_msg_scan_items(struct kdbus_conn *conn,
struct kdbus_kmsg *kmsg)
* @msg: User-provided message
* @kmsg: Copy of message
*
- * Returns: 0 on success, negative errno on failure.
+ * Return: 0 on success, negative errno on failure.
*/
int kdbus_kmsg_new_from_user(struct kdbus_conn *conn,
struct kdbus_msg __user *msg,
* kdbus_meta_new() - create new metadata object
* @meta: New metadata object
*
- * Returns: 0 on success, negative errno on failure.
+ * Return: 0 on success, negative errno on failure.
*/
int kdbus_meta_new(struct kdbus_meta **meta)
{
* @data: pointer to data to copy from
* @len: number of bytes to copy
*
- * Returns: 0 on success, negative errno on failure.
+ * Return: 0 on success, negative errno on failure.
*/
int kdbus_meta_append_data(struct kdbus_meta *meta, u64 type,
const void *data, size_t len)
* Collect the data specified in flags and allocate or extend
* the buffer in the metadata object.
*
- * Returns: 0 on success, negative errno on failure.
+ * Return: 0 on success, negative errno on failure.
*/
int kdbus_meta_append(struct kdbus_meta *meta,
struct kdbus_conn *conn,
* kdbus_name_registry_new() - create a new name registry
* @reg: The returned name registry
*
- * Returns 0 on success, -ENOMEM if memory allocation failed.
+ * Return: 0 on success, negative errno on failure.
*/
int kdbus_name_registry_new(struct kdbus_name_registry **reg)
{
* @reg: The name registry
* @name: The name to look up
*
- * Returns the name entry, if found. Otherwise, NULL is returned.
+ * Return: name entry if found, otherwise NULL.
*/
struct kdbus_name_entry *kdbus_name_lookup(struct kdbus_name_registry *reg,
const char *name)
* @flags: Acquisition flags (KDBUS_NAME_*)
* @entry: Return pointer for the entry (may be NULL)
*
- * Returns 0 on success, other values on error.
+ * Return: 0 on success, negative errno on failure.
*/
int kdbus_name_acquire(struct kdbus_name_registry *reg,
struct kdbus_conn *conn,
* @conn: The connection to pin this entry to
* @buf: The __user buffer as passed in by the ioctl
*
- * Returns 0 on success, other values on error.
+ * Return: 0 on success, negative errno on failure.
*/
int kdbus_cmd_name_acquire(struct kdbus_name_registry *reg,
struct kdbus_conn *conn,
* @conn: The connection that holds the name
* @buf: The __user buffer as passed in by the ioctl
*
- * Returns 0 on success, other values on error.
+ * Return: 0 on success, negative errno on failure.
*/
int kdbus_cmd_name_release(struct kdbus_name_registry *reg,
struct kdbus_conn *conn,
* @conn: The connection holding the name entries
* @buf: The __user buffer as passed in by the ioctl
*
- * Returns 0 on success, other values on error.
+ * Return: 0 on success, negative errno on failure.
*/
int kdbus_cmd_name_list(struct kdbus_name_registry *reg,
struct kdbus_conn *conn,
* kdbus_ns_ref() - take a namespace reference
* @ns : Namespace
*
- * Returns: the namespace itself
+ * Return: the namespace itself
*/
struct kdbus_ns *kdbus_ns_ref(struct kdbus_ns *ns)
{
* When the last reference is dropped, the namespace internal structure
* is freed.
*
- * Returns: NULL
+ * Return: NULL
*/
struct kdbus_ns *kdbus_ns_unref(struct kdbus_ns *ns)
{
* is ref'ed, and needs to be unref'ed by the user. Returns NULL if
* the namepace can't be found.
*
- * Returns: the namespace, or NULL if not found
+ * Return: the namespace, or NULL if not found
*/
struct kdbus_ns *kdbus_ns_find_by_major(unsigned int major)
{
* @mode: The access mode for the "control" device node
* @ns: The returned namespace
*
- * Returns: 0 on success, negative errno on failure.
+ * Return: 0 on success, negative errno on failure
*/
int kdbus_ns_new(struct kdbus_ns *parent, const char *name, umode_t mode,
struct kdbus_ns **ns)
* @make: The returned copy of user data
* @name: The name of the namespace to create
*
- * Returns: 0 on success, negative errno on failure.
+ * Return: 0 on success, negative errno on failure
*/
int kdbus_ns_make_user(void __user *buf,
struct kdbus_cmd_make **make, char **name)
*
* Queues a message that has a KDBUS_ITEM_REPLY_TIMEOUT item attached.
*
- * Returns: 0 on success, negative errno on failure.
+ * Return: 0 on success, negative errno on failure.
*/
int kdbus_notify_reply_timeout(u64 id, u64 cookie, struct list_head *queue_list)
{
*
* Queues a message that has a KDBUS_ITEM_REPLY_DEAD item attached.
*
- * Returns: 0 on success, negative errno on failure.
+ * Return: 0 on success, negative errno on failure.
*/
int kdbus_notify_reply_dead(u64 id, u64 cookie, struct list_head *queue_list)
{
* kdbus_kmsg_free(). Maybe NULL, in which case this
* function does nothing.
*
- * Returns: 0 on success, negative errno on failure.
+ * Return: 0 on success, negative errno on failure.
*/
int kdbus_notify_name_change(u64 type,
u64 old_id, u64 new_id,
* kdbus_kmsg_free(). Maybe NULL, in which case this
* function does nothing.
*
- * Returns: 0 on success, negative errno on failure.
+ * Return: 0 on success, negative errno on failure.
*/
int kdbus_notify_id_change(u64 type, u64 id, u64 flags,
struct list_head *queue_list)
* kdbus_policy_db_new() - create a new policy database
* @db: The location where to store the new database
*
- * Return 0 on success, or any other value in case of errors.
+ * Return: 0 on success, negative errno on failure
*/
int kdbus_policy_db_new(struct kdbus_policy_db **db)
{
* @conn_src: The source connection
* @conn_dst: The destination connection
*
- * Returns 0 if access is granted, -EPERM in case it's not, any any other
- * value in case of errors during adding the cache item internally.
+ * Return: 0 if access is granted, -EPERM if not, negative errno on failure
*/
int kdbus_policy_db_check_send_access(struct kdbus_policy_db *db,
struct kdbus_conn *conn_src,
* @conn: The connection to check
* @name: The name to check
*
- * Returns true if the connection is allowed to own the name, false otherwise.
+ * Return: true if the connection is allowed to own the name, false otherwise
*/
bool kdbus_policy_db_check_own_access(struct kdbus_policy_db *db,
struct kdbus_conn *conn,
* @db: The policy database
* @buf: The __user buffer that was provided by the ioctl() call
*
- * Returns 0 on success, or any other value in case of errors.
* This function is used in the context of the KDBUS_CMD_EP_POLICY_SET
* ioctl().
+ *
+ * Return: 0 on success, negative errno on failure
*/
int kdbus_cmd_policy_set_from_user(struct kdbus_policy_db *db, void __user *buf)
{
* @size: Maximum size of the pool
* @pool: Newly allocated pool
*
- * Returns: 0 on success, negative errno on failure.
+ * Return: 0 on success, negative errno on failure.
*/
int kdbus_pool_new(const char *name, size_t size, struct kdbus_pool **pool)
{
* kdbus_pool_remain() - the number of free bytes in the pool
* @pool: The receiver's pool
*
- * Returns: the number of unallocated bytes in the pool
+ * Return: the number of unallocated bytes in the pool
*/
size_t kdbus_pool_remain(struct kdbus_pool *pool)
{
* The returned offset is used for kdbus_pool_free() to
* free the allocated memory.
*
- * Returns: 0 on success, negative errno on failure.
+ * Return: 0 on success, negative errno on failure.
*/
int kdbus_pool_alloc_range(struct kdbus_pool *pool, size_t size, size_t *off)
{
* The offset was returned by the call to kdbus_pool_alloc_range(), the
* memory is returned to the pool.
*
- * Returns: 0 on success, negative errno on failure.
+ * Return: 0 on success, negative errno on failure.
*/
int kdbus_pool_free_range(struct kdbus_pool *pool, size_t off)
{
* The user memory at @data will be copied to the @off in the allocated
* memory in the pool.
*
- * Returns: the numbers of bytes copied, negative errno on failure.
+ * Return: the numbers of bytes copied, negative errno on failure.
*/
ssize_t kdbus_pool_write_user(const struct kdbus_pool *pool, size_t off,
void __user *data, size_t len)
* The user memory at @data will be copied to the @off in the allocated
* memory in the pool.
*
- * Returns: the numbers of bytes copied, negative errno on failure.
+ * Return: the numbers of bytes copied, negative errno on failure.
*/
ssize_t kdbus_pool_write(const struct kdbus_pool *pool, size_t off,
void *data, size_t len)
* destination pool, the memory copied over, and the free()d in source
* pool.
*
- * Returns: 0 on success, negative errno on failure.
+ * Return: 0 on success, negative errno on failure.
*/
int kdbus_pool_move(struct kdbus_pool *dst_pool,
struct kdbus_pool *src_pool,
* @pool: The receiver's pool
* @vma: passed by mmap() syscall
*
- * Returns: the result of the mmap() call, negative errno on failure.
+ * Return: the result of the mmap() call, negative errno on failure.
*/
int kdbus_pool_mmap(const struct kdbus_pool *pool, struct vm_area_struct *vma)
{
* kdbus_sysname_valid - validate names showing up in /proc, /sys and /dev
* @name: Name of namespace, bus, endpoint
*
- * Returns: 0 if the given name is valid, otherwise negative errno
+ * Return: 0 if the given name is valid, otherwise negative errno
*/
int kdbus_sysname_is_valid(const char *name)
{
* @_b: Buffer to read from
* @_t: Structure, "size" is a member of
*
- * Returns: the result of copy_from_user()
+ * Return: the result of copy_from_user()
*/
#define kdbus_size_get_user(_s, _b, _t) \
({ \
* @_b: Buffer to write to
* @_t: Structure, "offset" is a member of
*
- * Returns: the result of copy_to_user()
+ * Return: the result of copy_to_user()
*/
#define kdbus_offset_set_user(_s, _b, _t) \
({ \
* a variable string at its end
* @_s: The name of the dynamically sized string member
*
- * Returns: 1 if the string's end marker is withing the struct, or 0 otherwise.
+ * Return: 1 if the string's end marker is withing the struct, or 0 otherwise.
*/
#define kdbus_check_strlen(_p, _s) \
({ \
* Validate that a given string matches the given size, and the
* string is \0 terminated.
*
- * Returns: true if the given string is valid
+ * Return: true if the given string is valid
*/
static inline bool kdbus_validate_nul(const char *s, size_t l)
{
* kdbus_str_hash - calculate a hash
* @str: String
*
- * Returns: hash value
+ * Return: hash value
*/
static inline unsigned int kdbus_str_hash(const char *str)
{