@@ -51,8 +51,8 @@ static inline bool __must_check __must_check_overflow(bool overflow)
5151 return unlikely (overflow );
5252}
5353
54- /** check_add_overflow() - Calculate addition with overflow checking
55- *
54+ /**
55+ * check_add_overflow() - Calculate addition with overflow checking
5656 * @a: first addend
5757 * @b: second addend
5858 * @d: pointer to store sum
@@ -66,8 +66,8 @@ static inline bool __must_check __must_check_overflow(bool overflow)
6666#define check_add_overflow (a , b , d ) \
6767 __must_check_overflow(__builtin_add_overflow(a, b, d))
6868
69- /** check_sub_overflow() - Calculate subtraction with overflow checking
70- *
69+ /**
70+ * check_sub_overflow() - Calculate subtraction with overflow checking
7171 * @a: minuend; value to subtract from
7272 * @b: subtrahend; value to subtract from @a
7373 * @d: pointer to store difference
@@ -81,8 +81,8 @@ static inline bool __must_check __must_check_overflow(bool overflow)
8181#define check_sub_overflow (a , b , d ) \
8282 __must_check_overflow(__builtin_sub_overflow(a, b, d))
8383
84- /** check_mul_overflow() - Calculate multiplication with overflow checking
85- *
84+ /**
85+ * check_mul_overflow() - Calculate multiplication with overflow checking
8686 * @a: first factor
8787 * @b: second factor
8888 * @d: pointer to store product
@@ -96,23 +96,24 @@ static inline bool __must_check __must_check_overflow(bool overflow)
9696#define check_mul_overflow (a , b , d ) \
9797 __must_check_overflow(__builtin_mul_overflow(a, b, d))
9898
99- /** check_shl_overflow() - Calculate a left-shifted value and check overflow
100- *
99+ /**
100+ * check_shl_overflow() - Calculate a left-shifted value and check overflow
101101 * @a: Value to be shifted
102102 * @s: How many bits left to shift
103103 * @d: Pointer to where to store the result
104104 *
105105 * Computes *@d = (@a << @s)
106106 *
107- * Returns true if '*d' cannot hold the result or when 'a << s' doesn't
107+ * Returns true if '*@ d' cannot hold the result or when '@ a << @ s' doesn't
108108 * make sense. Example conditions:
109- * - 'a << s' causes bits to be lost when stored in *d.
110- * - 's' is garbage (e.g. negative) or so large that the result of
111- * 'a << s' is guaranteed to be 0.
112- * - 'a' is negative.
113- * - 'a << s' sets the sign bit, if any, in '*d'.
114109 *
115- * '*d' will hold the results of the attempted shift, but is not
110+ * - '@a << @s' causes bits to be lost when stored in *@d.
111+ * - '@s' is garbage (e.g. negative) or so large that the result of
112+ * '@a << @s' is guaranteed to be 0.
113+ * - '@a' is negative.
114+ * - '@a << @s' sets the sign bit, if any, in '*@d'.
115+ *
116+ * '*@d' will hold the results of the attempted shift, but is not
116117 * considered "safe for use" if true is returned.
117118 */
118119#define check_shl_overflow (a , s , d ) __must_check_overflow(({ \
@@ -129,7 +130,6 @@ static inline bool __must_check __must_check_overflow(bool overflow)
129130
130131/**
131132 * size_mul() - Calculate size_t multiplication with saturation at SIZE_MAX
132- *
133133 * @factor1: first factor
134134 * @factor2: second factor
135135 *
@@ -149,7 +149,6 @@ static inline size_t __must_check size_mul(size_t factor1, size_t factor2)
149149
150150/**
151151 * size_add() - Calculate size_t addition with saturation at SIZE_MAX
152- *
153152 * @addend1: first addend
154153 * @addend2: second addend
155154 *
@@ -169,7 +168,6 @@ static inline size_t __must_check size_add(size_t addend1, size_t addend2)
169168
170169/**
171170 * size_sub() - Calculate size_t subtraction with saturation at SIZE_MAX
172- *
173171 * @minuend: value to subtract from
174172 * @subtrahend: value to subtract from @minuend
175173 *
@@ -192,7 +190,6 @@ static inline size_t __must_check size_sub(size_t minuend, size_t subtrahend)
192190
193191/**
194192 * array_size() - Calculate size of 2-dimensional array.
195- *
196193 * @a: dimension one
197194 * @b: dimension two
198195 *
@@ -205,7 +202,6 @@ static inline size_t __must_check size_sub(size_t minuend, size_t subtrahend)
205202
206203/**
207204 * array3_size() - Calculate size of 3-dimensional array.
208- *
209205 * @a: dimension one
210206 * @b: dimension two
211207 * @c: dimension three
@@ -220,7 +216,6 @@ static inline size_t __must_check size_sub(size_t minuend, size_t subtrahend)
220216/**
221217 * flex_array_size() - Calculate size of a flexible array member
222218 * within an enclosing structure.
223- *
224219 * @p: Pointer to the structure.
225220 * @member: Name of the flexible array member.
226221 * @count: Number of elements in the array.
@@ -237,7 +232,6 @@ static inline size_t __must_check size_sub(size_t minuend, size_t subtrahend)
237232
238233/**
239234 * struct_size() - Calculate size of structure with trailing flexible array.
240- *
241235 * @p: Pointer to the structure.
242236 * @member: Name of the array member.
243237 * @count: Number of elements in the array.
0 commit comments