projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dm: replace simple_strtoul
[deliverable/linux.git]
/
drivers
/
md
/
dm-exception-store.c
diff --git
a/drivers/md/dm-exception-store.c
b/drivers/md/dm-exception-store.c
index aa70f7d43a1ab87750cee933d244eb098cb8d92b..ebaa4f803eec3a08a0cd9fcd9a9a1b933618c50c 100644
(file)
--- a/
drivers/md/dm-exception-store.c
+++ b/
drivers/md/dm-exception-store.c
@@
-142,24
+142,19
@@
EXPORT_SYMBOL(dm_exception_store_type_unregister);
static int set_chunk_size(struct dm_exception_store *store,
const char *chunk_size_arg, char **error)
{
static int set_chunk_size(struct dm_exception_store *store,
const char *chunk_size_arg, char **error)
{
- unsigned long chunk_size_ulong;
- char *value;
+ unsigned chunk_size;
- chunk_size_ulong = simple_strtoul(chunk_size_arg, &value, 10);
- if (*chunk_size_arg == '\0' || *value != '\0' ||
- chunk_size_ulong > UINT_MAX) {
+ if (kstrtouint(chunk_size_arg, 10, &chunk_size)) {
*error = "Invalid chunk size";
return -EINVAL;
}
*error = "Invalid chunk size";
return -EINVAL;
}
- if (!chunk_size
_ulong
) {
+ if (!chunk_size) {
store->chunk_size = store->chunk_mask = store->chunk_shift = 0;
return 0;
}
store->chunk_size = store->chunk_mask = store->chunk_shift = 0;
return 0;
}
- return dm_exception_store_set_chunk_size(store,
- (unsigned) chunk_size_ulong,
- error);
+ return dm_exception_store_set_chunk_size(store, chunk_size, error);
}
int dm_exception_store_set_chunk_size(struct dm_exception_store *store,
}
int dm_exception_store_set_chunk_size(struct dm_exception_store *store,
This page took
0.025444 seconds
and
5
git commands to generate.