Add verbose description for UNNECESSARY_CASTS message type.
Suggested-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Signed-off-by: Vinesh Raut <redacted>
---
Documentation/dev-tools/checkpatch.rst | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/Documentation/dev-tools/checkpatch.rst b/Documentation/dev-tools/checkpatch.rst
index f0956e9ea2d8..9cb6b9059fc6 100644
--- a/Documentation/dev-tools/checkpatch.rst
+++ b/Documentation/dev-tools/checkpatch.rst
@@ -268,6 +268,15 @@ Allocation style
See: https://www.kernel.org/doc/html/latest/core-api/memory-allocation.html
+ **UNNECESSAR_CASTS**
+ Cast should not be done to any alloc functions.
+ Appropriate type of pointer is pick by compiler at run time
+ Cast may hide bugs, as compiler suppress the warning after cast.
+
+ See:
+ 1] https://lore.kernel.org/lkml/20070808024321.GA6316@redhat.com/
+ 2] https://lore.kernel.org/lkml/a5e60a2b93e10baf84af063f6c8e56402273105d.camel@perches.com/
+
API usage
-----------
2.30.2
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees