[PATCH] Documentation: checkpatch: MISORDERED_TYPE table intersection fixup

From: Bagas Sanjaya
Date: Tue Aug 02 2022 - 22:48:43 EST


Sphinx reported error and warnings pointed at MISORDERED_TYPE table:

Documentation/dev-tools/checkpatch.rst:1393: (SEVERE/4) Unexpected section title or transition.
Documentation/dev-tools/checkpatch.rst:1393: WARNING: Block quote ends without a blank line; unexpected unindent.
Documentation/dev-tools/checkpatch.rst:1393: WARNING: Unexpected section title or transition.

Fix these above by marking cell intersections with plus (+) sign.

Link: https://lore.kernel.org/linux-doc/202208030829.xj2bvI7P-lkp@xxxxxxxxx/
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Signed-off-by: Bagas Sanjaya <bagasdotme@xxxxxxxxx>
---
Documentation/dev-tools/checkpatch.rst | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/Documentation/dev-tools/checkpatch.rst b/Documentation/dev-tools/checkpatch.rst
index 78abcadb522824..a9d27913e6c46f 100644
--- a/Documentation/dev-tools/checkpatch.rst
+++ b/Documentation/dev-tools/checkpatch.rst
@@ -1371,30 +1371,30 @@ Others

+--------------------------------------------------+--------------------+
| Types | Recommended Way |
- +=======================================================================+
+ +==================================================+====================+
| char | char |
- +-----------------------------------------------------------------------+
+ +--------------------------------------------------+--------------------+
| signed char | signed char |
- +-----------------------------------------------------------------------+
+ +--------------------------------------------------+--------------------+
| unsigned char | unsigned char |
- +-----------------------------------------------------------------------+
+ +--------------------------------------------------+--------------------+
| signed, int, signed int | int |
- +-----------------------------------------------------------------------+
+ +--------------------------------------------------+--------------------+
| unsigned, unsigned int | unsigned int |
- +-----------------------------------------------------------------------+
+ +--------------------------------------------------+--------------------+
| short, signed short, short int, signed short int | short |
- +-----------------------------------------------------------------------+
+ +--------------------------------------------------+--------------------+
| unsigned short, unsigned short int | unsigned short |
- +-----------------------------------------------------------------------+
+ +--------------------------------------------------+--------------------+
| long, signed long, long int, signed long int | long |
- +-----------------------------------------------------------------------+
+ +--------------------------------------------------+--------------------+
| unsigned long, unsigned long int | unsigned long |
- +-----------------------------------------------------------------------|
+ +--------------------------------------------------+--------------------+
| long long, signed long long, long long int, | long long |
| signed long long int | |
- +-----------------------------------------------------------------------+
+ +--------------------------------------------------+--------------------+
| unsigned long long, unsigned long long int | unsigned long long |
- +-----------------------------------------------------------------------+
+ +--------------------------------------------------+--------------------+

**NOT_UNIFIED_DIFF**
The patch file does not appear to be in unified-diff format. Please
---- >8 ----

> + Also, do not change the code if there is only a single return statement
> + inside if-else block, like::
> +
> + if (a > b)
> + return a;
> + else
> + return b;
> +
> + now if the else statement is removed::
> +
> + if (a > b)
> + return a;
> + return b;
> +
> + there is no considerable increase in the readability and one can argue
> + that the first form is more readable because of the indentation. So
> + do not remove the else statement in case of a single return statement
> + inside the if-else block.
> +

So the first indentation above is more readable for it's clear that
b is returned if the condition is false (in this case, a < b), right?

> + See: https://lore.kernel.org/lkml/20140925032215.GK7996@xxxxxxxxxxxxxxxxxx/
> +
> + **UNNECESSARY_INT**
> + On Sun, 2018-08-05 at 08:52 -0700, Linus Torvalds wrote:
> + > "long unsigned int" isn't _technically_ wrong. But we normally
> + > call that type "unsigned long".
> +

IMO, the mail quote above can be deleted.

Thanks.

--
An old man doll... just what I always wanted! - Clara