Commit 2d62981
kernel-doc: allow object-like macros in ReST output
[ Upstream commit bb8fd09 ]
output_function_rst() does not handle object-like macros. It presents
a trailing "()" while output_function_man() handles these macros
correctly.
Update output_function_rst() to handle object-like macros.
Don't show the "Parameters" heading if there are no parameters.
For output_function_man(), don't show the "ARGUMENTS" heading if there
are no parameters.
I have tested this quite a bit with my ad hoc test files for both ReST
and man format outputs. The generated output looks good.
Fixes: cbb4d3e ("scripts/kernel-doc: handle object-like macros")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Horia Geanta <horia.geanta@freescale.com>
Tested-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20241015181107.536894-1-rdunlap@infradead.org
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent 417d6f3 commit 2d62981
1 file changed
Lines changed: 30 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
569 | 569 | | |
570 | 570 | | |
571 | 571 | | |
| 572 | + | |
| 573 | + | |
572 | 574 | | |
573 | 575 | | |
574 | 576 | | |
| |||
600 | 602 | | |
601 | 603 | | |
602 | 604 | | |
603 | | - | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
604 | 609 | | |
605 | 610 | | |
606 | 611 | | |
| |||
822 | 827 | | |
823 | 828 | | |
824 | 829 | | |
825 | | - | |
826 | | - | |
827 | | - | |
828 | | - | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
829 | 840 | | |
830 | 841 | | |
831 | 842 | | |
| |||
844 | 855 | | |
845 | 856 | | |
846 | 857 | | |
847 | | - | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
848 | 861 | | |
849 | 862 | | |
850 | 863 | | |
| |||
888 | 901 | | |
889 | 902 | | |
890 | 903 | | |
891 | | - | |
892 | 904 | | |
893 | | - | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
894 | 909 | | |
895 | 910 | | |
896 | 911 | | |
| |||
1704 | 1719 | | |
1705 | 1720 | | |
1706 | 1721 | | |
1707 | | - | |
| 1722 | + | |
1708 | 1723 | | |
1709 | 1724 | | |
1710 | 1725 | | |
| |||
1769 | 1784 | | |
1770 | 1785 | | |
1771 | 1786 | | |
1772 | | - | |
| 1787 | + | |
1773 | 1788 | | |
1774 | 1789 | | |
1775 | 1790 | | |
| |||
1796 | 1811 | | |
1797 | 1812 | | |
1798 | 1813 | | |
1799 | | - | |
| 1814 | + | |
1800 | 1815 | | |
1801 | 1816 | | |
1802 | 1817 | | |
| |||
1814 | 1829 | | |
1815 | 1830 | | |
1816 | 1831 | | |
1817 | | - | |
| 1832 | + | |
| 1833 | + | |
1818 | 1834 | | |
1819 | 1835 | | |
1820 | 1836 | | |
| |||
1827 | 1843 | | |
1828 | 1844 | | |
1829 | 1845 | | |
1830 | | - | |
| 1846 | + | |
| 1847 | + | |
1831 | 1848 | | |
1832 | 1849 | | |
1833 | 1850 | | |
| |||
0 commit comments