Skip to content

Commit 4e41524

Browse files
author
Mike Snitzer
committed
dm vdo target: eliminate inappropriate uses of UDS_SUCCESS
Most should be VDO_SUCCESS. But comparing the return from kstrtouint() with UDS_SUCCESS (happens to be 0) makes no sense. Signed-off-by: Mike Snitzer <[email protected]> Signed-off-by: Matthew Sakai <[email protected]>
1 parent e601673 commit 4e41524

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

drivers/md/dm-vdo/dm-vdo-target.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ static int split_string(const char *string, char separator, char ***substring_ar
318318
current_substring++;
319319
/* substrings[current_substring] is NULL already */
320320
*substring_array_ptr = substrings;
321-
return UDS_SUCCESS;
321+
return VDO_SUCCESS;
322322
}
323323

324324
/*
@@ -356,7 +356,7 @@ static int join_strings(char **substring_array, size_t array_length, char separa
356356
*(current_position - 1) = '\0';
357357

358358
*string_ptr = output;
359-
return UDS_SUCCESS;
359+
return VDO_SUCCESS;
360360
}
361361

362362
/**
@@ -484,7 +484,7 @@ static int parse_one_thread_config_spec(const char *spec,
484484
int result;
485485

486486
result = split_string(spec, '=', &fields);
487-
if (result != UDS_SUCCESS)
487+
if (result != VDO_SUCCESS)
488488
return result;
489489

490490
if ((fields[0] == NULL) || (fields[1] == NULL) || (fields[2] != NULL)) {
@@ -495,7 +495,7 @@ static int parse_one_thread_config_spec(const char *spec,
495495
}
496496

497497
result = kstrtouint(fields[1], 10, &count);
498-
if (result != UDS_SUCCESS) {
498+
if (result) {
499499
uds_log_error("thread config string error: integer value needed, found \"%s\"",
500500
fields[1]);
501501
free_string_array(fields);
@@ -537,7 +537,7 @@ static int parse_thread_config_string(const char *string,
537537
unsigned int i;
538538

539539
result = split_string(string, ',', &specs);
540-
if (result != UDS_SUCCESS)
540+
if (result != VDO_SUCCESS)
541541
return result;
542542

543543
for (i = 0; specs[i] != NULL; i++) {
@@ -607,7 +607,7 @@ static int parse_one_key_value_pair(const char *key, const char *value,
607607

608608
/* The remaining arguments must have integral values. */
609609
result = kstrtouint(value, 10, &count);
610-
if (result != UDS_SUCCESS) {
610+
if (result) {
611611
uds_log_error("optional config string error: integer value needed, found \"%s\"",
612612
value);
613613
return result;
@@ -2913,7 +2913,7 @@ static int __init vdo_init(void)
29132913

29142914
/* Add VDO errors to the set of errors registered by the indexer. */
29152915
result = vdo_register_status_codes();
2916-
if (result != UDS_SUCCESS) {
2916+
if (result != VDO_SUCCESS) {
29172917
uds_log_error("vdo_register_status_codes failed %d", result);
29182918
vdo_module_destroy();
29192919
return result;

0 commit comments

Comments
 (0)