lkml.org 
[lkml]   [2021]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/2] Add namespace tags that can be used for matching without pinning a ns
Date
Jarkko Sakkinen <jarkko@kernel.org> wrote:

> > + * init_ns_common - Initialise the common part of a namespace
>
> Nit: init_ns_common()

Interesting. The majority of code doesn't put the brackets in.

> I've used lately (e.g. arch/x86/kernel/cpu/sgx/ioctl.c) along the lines:
>
> * Return:
> * - 0: Initialization was successful.
> * - -ENOMEM: Out of memory.

Actually, looking at kernel-doc.rst, this isn't necessarily the recommended
approach as it will much everything into one line, complete with dashes, and
can't handle splitting over lines. You probably meant:

* Return:
* * 0 - OK to runtime suspend the device
* * -EBUSY - Device should not be runtime suspended

> * Return:
> * - 0: Initialization was successful.
> * - -ENOMEM: Out of memory.
>
> Looking at the implementation, I guess this is a complete representation of
> what it can return?

It isn't. It can return at least -ENOSPC as well, but it's awkward detailing
the errors from functions it calls since they can change and then the
description here is wrong. I'm not sure there's a perfect answer to that.

David

\
 
 \ /
  Last update: 2021-02-05 09:29    [W:0.130 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site