Home
last modified time | relevance | path

Searched hist:"5 ef09c96" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/scripts/
H A Dkernel-doc5ef09c96 Fri Oct 09 03:15:25 CDT 2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org> scripts: kernel-doc: fix line number handling

Address several issues related to pointing to the wrong line
number:

1) ensure that line numbers will always be initialized

When section is the default (Description), the line number
is not initializing, producing this:

$ ./scripts/kernel-doc --enable-lineno ./drivers/media/v4l2-core/v4l2-mem2mem.c|less

**Description**

#define LINENO 0
In case of streamoff or release called on any context,
1] If the context is currently running, then abort job will be called
2] If the context is queued, then the context will be removed from
the job_queue

Which is not right. Ensure that the line number will always
be there. After applied, the result now points to the right location:

**Description**

#define LINENO 410
In case of streamoff or release called on any context,
1] If the context is currently running, then abort job will be called
2] If the context is queued, then the context will be removed from
the job_queue

2) The line numbers for function prototypes are always + 1,
because it is taken at the line after handling the prototype.
Change the logic to point to the next line after the /** */
block;

3) The "DOC:" line number should point to the same line as this
markup is found, and not to the next one.

Probably part of the issues were due to a but that was causing
the line number offset to be incremented by one, if --export
were used.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
5ef09c96 Fri Oct 09 03:15:25 CDT 2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org> scripts: kernel-doc: fix line number handling

Address several issues related to pointing to the wrong line
number:

1) ensure that line numbers will always be initialized

When section is the default (Description), the line number
is not initializing, producing this:

$ ./scripts/kernel-doc --enable-lineno ./drivers/media/v4l2-core/v4l2-mem2mem.c|less

**Description**

#define LINENO 0
In case of streamoff or release called on any context,
1] If the context is currently running, then abort job will be called
2] If the context is queued, then the context will be removed from
the job_queue

Which is not right. Ensure that the line number will always
be there. After applied, the result now points to the right location:

**Description**

#define LINENO 410
In case of streamoff or release called on any context,
1] If the context is currently running, then abort job will be called
2] If the context is queued, then the context will be removed from
the job_queue

2) The line numbers for function prototypes are always + 1,
because it is taken at the line after handling the prototype.
Change the logic to point to the next line after the /** */
block;

3) The "DOC:" line number should point to the same line as this
markup is found, and not to the next one.

Probably part of the issues were due to a but that was causing
the line number offset to be incremented by one, if --export
were used.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>