Skip to contentSkip to conversation

bitops: Update kernel-doc for sign_extendXX()

PATCH Applied Andy Shevchenko 2 participants 2 messages Apr 7 Bitops API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bitops: Update kernel-doc for sign_extendXX()

The sign_extendXX() lack of Return section and have other style issues. Address that by updating kernel-doc accordingly.

---
 include/linux/bitops.h | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
include/linux/bitops.h +8 -2
index 1fe46703792f..657eab2725ce 100644
@@ -179,9 +179,11 @@ static inline __u8 ror8(__u8 word, unsigned int shift)
 /**
  * sign_extend32 - sign extend a 32-bit value using specified bit as sign-bit
  * @value: value to sign extend
- * @index: 0 based bit index (0<=index<32) to sign bit
+ * @index: 0 based bit index (0 <= index < 32) to sign bit
  *
  * This is safe to use for 16- and 8-bit types as well.
+ *
+ * Return: 32-bit sign extended value
  */
 static __always_inline __s32 sign_extend32(__u32 value, int index)
 {
@@ -192,7 +194,11 @@ static __always_inline __s32 sign_extend32(__u32 value, int index)
 /**
  * sign_extend64 - sign extend a 64-bit value using specified bit as sign-bit
  * @value: value to sign extend
- * @index: 0 based bit index (0<=index<64) to sign bit
+ * @index: 0 based bit index (0 <= index < 64) to sign bit
+ *
+ * This is safe to use for 32-, 16- and 8-bit types as well.
+ *
+ * Return: 64-bit sign extended value
  */
 static __always_inline __s64 sign_extend64(__u64 value, int index)
 {
Signature · 1 line
2.50.1
Applied
#1 lore raw
Quoted 4 lines · Andy Shevchenko

The sign_extendXX() lack of Return section and have other style issues. Address that by updating kernel-doc accordingly.

Applied, thanks.

Quoted 36 lines
---
 include/linux/bitops.h | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
include/linux/bitops.h +8 -2
index 1fe46703792f..657eab2725ce 100644
@@ -179,9 +179,11 @@ static inline __u8 ror8(__u8 word, unsigned int shift)
 /**
  * sign_extend32 - sign extend a 32-bit value using specified bit as sign-bit
  * @value: value to sign extend
- * @index: 0 based bit index (0<=index<32) to sign bit
+ * @index: 0 based bit index (0 <= index < 32) to sign bit
  *
  * This is safe to use for 16- and 8-bit types as well.
+ *
+ * Return: 32-bit sign extended value
  */
 static __always_inline __s32 sign_extend32(__u32 value, int index)
 {
@@ -192,7 +194,11 @@ static __always_inline __s32 sign_extend32(__u32 value, int index)
 /**
  * sign_extend64 - sign extend a 64-bit value using specified bit as sign-bit
  * @value: value to sign extend
- * @index: 0 based bit index (0<=index<64) to sign bit
+ * @index: 0 based bit index (0 <= index < 64) to sign bit
+ *
+ * This is safe to use for 32-, 16- and 8-bit types as well.
+ *
+ * Return: 64-bit sign extended value
  */
 static __always_inline __s64 sign_extend64(__u64 value, int index)
 {
Signature · 1 line
2.50.1