mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
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 <snitzer@kernel.org> Signed-off-by: Matthew Sakai <msakai@redhat.com>
This commit is contained in:
parent
e60167367e
commit
4e4152482b
1 changed files with 7 additions and 7 deletions
|
@ -318,7 +318,7 @@ static int split_string(const char *string, char separator, char ***substring_ar
|
||||||
current_substring++;
|
current_substring++;
|
||||||
/* substrings[current_substring] is NULL already */
|
/* substrings[current_substring] is NULL already */
|
||||||
*substring_array_ptr = substrings;
|
*substring_array_ptr = substrings;
|
||||||
return UDS_SUCCESS;
|
return VDO_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -356,7 +356,7 @@ static int join_strings(char **substring_array, size_t array_length, char separa
|
||||||
*(current_position - 1) = '\0';
|
*(current_position - 1) = '\0';
|
||||||
|
|
||||||
*string_ptr = output;
|
*string_ptr = output;
|
||||||
return UDS_SUCCESS;
|
return VDO_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -484,7 +484,7 @@ static int parse_one_thread_config_spec(const char *spec,
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
result = split_string(spec, '=', &fields);
|
result = split_string(spec, '=', &fields);
|
||||||
if (result != UDS_SUCCESS)
|
if (result != VDO_SUCCESS)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
if ((fields[0] == NULL) || (fields[1] == NULL) || (fields[2] != NULL)) {
|
if ((fields[0] == NULL) || (fields[1] == NULL) || (fields[2] != NULL)) {
|
||||||
|
@ -495,7 +495,7 @@ static int parse_one_thread_config_spec(const char *spec,
|
||||||
}
|
}
|
||||||
|
|
||||||
result = kstrtouint(fields[1], 10, &count);
|
result = kstrtouint(fields[1], 10, &count);
|
||||||
if (result != UDS_SUCCESS) {
|
if (result) {
|
||||||
uds_log_error("thread config string error: integer value needed, found \"%s\"",
|
uds_log_error("thread config string error: integer value needed, found \"%s\"",
|
||||||
fields[1]);
|
fields[1]);
|
||||||
free_string_array(fields);
|
free_string_array(fields);
|
||||||
|
@ -537,7 +537,7 @@ static int parse_thread_config_string(const char *string,
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
result = split_string(string, ',', &specs);
|
result = split_string(string, ',', &specs);
|
||||||
if (result != UDS_SUCCESS)
|
if (result != VDO_SUCCESS)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
for (i = 0; specs[i] != NULL; i++) {
|
for (i = 0; specs[i] != NULL; i++) {
|
||||||
|
@ -607,7 +607,7 @@ static int parse_one_key_value_pair(const char *key, const char *value,
|
||||||
|
|
||||||
/* The remaining arguments must have integral values. */
|
/* The remaining arguments must have integral values. */
|
||||||
result = kstrtouint(value, 10, &count);
|
result = kstrtouint(value, 10, &count);
|
||||||
if (result != UDS_SUCCESS) {
|
if (result) {
|
||||||
uds_log_error("optional config string error: integer value needed, found \"%s\"",
|
uds_log_error("optional config string error: integer value needed, found \"%s\"",
|
||||||
value);
|
value);
|
||||||
return result;
|
return result;
|
||||||
|
@ -2913,7 +2913,7 @@ static int __init vdo_init(void)
|
||||||
|
|
||||||
/* Add VDO errors to the set of errors registered by the indexer. */
|
/* Add VDO errors to the set of errors registered by the indexer. */
|
||||||
result = vdo_register_status_codes();
|
result = vdo_register_status_codes();
|
||||||
if (result != UDS_SUCCESS) {
|
if (result != VDO_SUCCESS) {
|
||||||
uds_log_error("vdo_register_status_codes failed %d", result);
|
uds_log_error("vdo_register_status_codes failed %d", result);
|
||||||
vdo_module_destroy();
|
vdo_module_destroy();
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Add table
Reference in a new issue