@@ -51,8 +51,8 @@ static inline bool __must_check __must_check_overflow(bool overflow)
51
51
return unlikely (overflow );
52
52
}
53
53
54
- /** check_add_overflow() - Calculate addition with overflow checking
55
- *
54
+ /**
55
+ * check_add_overflow() - Calculate addition with overflow checking
56
56
* @a: first addend
57
57
* @b: second addend
58
58
* @d: pointer to store sum
@@ -66,8 +66,8 @@ static inline bool __must_check __must_check_overflow(bool overflow)
66
66
#define check_add_overflow (a , b , d ) \
67
67
__must_check_overflow(__builtin_add_overflow(a, b, d))
68
68
69
- /** check_sub_overflow() - Calculate subtraction with overflow checking
70
- *
69
+ /**
70
+ * check_sub_overflow() - Calculate subtraction with overflow checking
71
71
* @a: minuend; value to subtract from
72
72
* @b: subtrahend; value to subtract from @a
73
73
* @d: pointer to store difference
@@ -81,8 +81,8 @@ static inline bool __must_check __must_check_overflow(bool overflow)
81
81
#define check_sub_overflow (a , b , d ) \
82
82
__must_check_overflow(__builtin_sub_overflow(a, b, d))
83
83
84
- /** check_mul_overflow() - Calculate multiplication with overflow checking
85
- *
84
+ /**
85
+ * check_mul_overflow() - Calculate multiplication with overflow checking
86
86
* @a: first factor
87
87
* @b: second factor
88
88
* @d: pointer to store product
@@ -96,23 +96,24 @@ static inline bool __must_check __must_check_overflow(bool overflow)
96
96
#define check_mul_overflow (a , b , d ) \
97
97
__must_check_overflow(__builtin_mul_overflow(a, b, d))
98
98
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
101
101
* @a: Value to be shifted
102
102
* @s: How many bits left to shift
103
103
* @d: Pointer to where to store the result
104
104
*
105
105
* Computes *@d = (@a << @s)
106
106
*
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
108
108
* 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'.
114
109
*
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
116
117
* considered "safe for use" if true is returned.
117
118
*/
118
119
#define check_shl_overflow (a , s , d ) __must_check_overflow(({ \
@@ -129,7 +130,6 @@ static inline bool __must_check __must_check_overflow(bool overflow)
129
130
130
131
/**
131
132
* size_mul() - Calculate size_t multiplication with saturation at SIZE_MAX
132
- *
133
133
* @factor1: first factor
134
134
* @factor2: second factor
135
135
*
@@ -149,7 +149,6 @@ static inline size_t __must_check size_mul(size_t factor1, size_t factor2)
149
149
150
150
/**
151
151
* size_add() - Calculate size_t addition with saturation at SIZE_MAX
152
- *
153
152
* @addend1: first addend
154
153
* @addend2: second addend
155
154
*
@@ -169,7 +168,6 @@ static inline size_t __must_check size_add(size_t addend1, size_t addend2)
169
168
170
169
/**
171
170
* size_sub() - Calculate size_t subtraction with saturation at SIZE_MAX
172
- *
173
171
* @minuend: value to subtract from
174
172
* @subtrahend: value to subtract from @minuend
175
173
*
@@ -192,7 +190,6 @@ static inline size_t __must_check size_sub(size_t minuend, size_t subtrahend)
192
190
193
191
/**
194
192
* array_size() - Calculate size of 2-dimensional array.
195
- *
196
193
* @a: dimension one
197
194
* @b: dimension two
198
195
*
@@ -205,7 +202,6 @@ static inline size_t __must_check size_sub(size_t minuend, size_t subtrahend)
205
202
206
203
/**
207
204
* array3_size() - Calculate size of 3-dimensional array.
208
- *
209
205
* @a: dimension one
210
206
* @b: dimension two
211
207
* @c: dimension three
@@ -220,7 +216,6 @@ static inline size_t __must_check size_sub(size_t minuend, size_t subtrahend)
220
216
/**
221
217
* flex_array_size() - Calculate size of a flexible array member
222
218
* within an enclosing structure.
223
- *
224
219
* @p: Pointer to the structure.
225
220
* @member: Name of the flexible array member.
226
221
* @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)
237
232
238
233
/**
239
234
* struct_size() - Calculate size of structure with trailing flexible array.
240
- *
241
235
* @p: Pointer to the structure.
242
236
* @member: Name of the array member.
243
237
* @count: Number of elements in the array.
0 commit comments