Skip to content

Commit 359d625

Browse files
ebiggersakpm00
authored andcommitted
lib: parser: update documentation for match_NUMBER functions
commit 67222c4 ("lib: parser: optimize match_NUMBER apis to use local array") removed -ENOMEM as a possible return value, so update the comments accordingly. Link: https://lkml.kernel.org/r/[email protected] Fixes: 67222c4 ("lib: parser: optimize match_NUMBER apis to use local array") Signed-off-by: Eric Biggers <[email protected]> Cc: Li Lingfeng <[email protected]> Cc: Tejun Heo <[email protected]> Cc: Yu Kuai <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 4ec4190 commit 359d625

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/parser.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ EXPORT_SYMBOL(match_token);
133133
* as a number in that base.
134134
*
135135
* Return: On success, sets @result to the integer represented by the
136-
* string and returns 0. Returns -ENOMEM, -EINVAL, or -ERANGE on failure.
136+
* string and returns 0. Returns -EINVAL or -ERANGE on failure.
137137
*/
138138
static int match_number(substring_t *s, int *result, int base)
139139
{
@@ -165,7 +165,7 @@ static int match_number(substring_t *s, int *result, int base)
165165
* as a number in that base.
166166
*
167167
* Return: On success, sets @result to the integer represented by the
168-
* string and returns 0. Returns -ENOMEM, -EINVAL, or -ERANGE on failure.
168+
* string and returns 0. Returns -EINVAL or -ERANGE on failure.
169169
*/
170170
static int match_u64int(substring_t *s, u64 *result, int base)
171171
{
@@ -189,7 +189,7 @@ static int match_u64int(substring_t *s, u64 *result, int base)
189189
* Description: Attempts to parse the &substring_t @s as a decimal integer.
190190
*
191191
* Return: On success, sets @result to the integer represented by the string
192-
* and returns 0. Returns -ENOMEM, -EINVAL, or -ERANGE on failure.
192+
* and returns 0. Returns -EINVAL or -ERANGE on failure.
193193
*/
194194
int match_int(substring_t *s, int *result)
195195
{
@@ -205,7 +205,7 @@ EXPORT_SYMBOL(match_int);
205205
* Description: Attempts to parse the &substring_t @s as a decimal integer.
206206
*
207207
* Return: On success, sets @result to the integer represented by the string
208-
* and returns 0. Returns -ENOMEM, -EINVAL, or -ERANGE on failure.
208+
* and returns 0. Returns -EINVAL or -ERANGE on failure.
209209
*/
210210
int match_uint(substring_t *s, unsigned int *result)
211211
{
@@ -228,7 +228,7 @@ EXPORT_SYMBOL(match_uint);
228228
* integer.
229229
*
230230
* Return: On success, sets @result to the integer represented by the string
231-
* and returns 0. Returns -ENOMEM, -EINVAL, or -ERANGE on failure.
231+
* and returns 0. Returns -EINVAL or -ERANGE on failure.
232232
*/
233233
int match_u64(substring_t *s, u64 *result)
234234
{
@@ -244,7 +244,7 @@ EXPORT_SYMBOL(match_u64);
244244
* Description: Attempts to parse the &substring_t @s as an octal integer.
245245
*
246246
* Return: On success, sets @result to the integer represented by the string
247-
* and returns 0. Returns -ENOMEM, -EINVAL, or -ERANGE on failure.
247+
* and returns 0. Returns -EINVAL or -ERANGE on failure.
248248
*/
249249
int match_octal(substring_t *s, int *result)
250250
{
@@ -260,7 +260,7 @@ EXPORT_SYMBOL(match_octal);
260260
* Description: Attempts to parse the &substring_t @s as a hexadecimal integer.
261261
*
262262
* Return: On success, sets @result to the integer represented by the string
263-
* and returns 0. Returns -ENOMEM, -EINVAL, or -ERANGE on failure.
263+
* and returns 0. Returns -EINVAL or -ERANGE on failure.
264264
*/
265265
int match_hex(substring_t *s, int *result)
266266
{

0 commit comments

Comments
 (0)