projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag '5.11-rc-smb3' of git://git.samba.org/sfrench/cifs-2.6
[linux-2.6-microblaze.git]
/
lib
/
test_kmod.c
diff --git
a/lib/test_kmod.c
b/lib/test_kmod.c
index
eab5277
..
38c250f
100644
(file)
--- a/
lib/test_kmod.c
+++ b/
lib/test_kmod.c
@@
-877,20
+877,17
@@
static int test_dev_config_update_uint_sync(struct kmod_test_device *test_dev,
int (*test_sync)(struct kmod_test_device *test_dev))
{
int ret;
int (*test_sync)(struct kmod_test_device *test_dev))
{
int ret;
- unsigned
long new
;
+ unsigned
int val
;
unsigned int old_val;
unsigned int old_val;
- ret = kstrtou
l(buf, 10, &new
);
+ ret = kstrtou
int(buf, 10, &val
);
if (ret)
return ret;
if (ret)
return ret;
- if (new > UINT_MAX)
- return -EINVAL;
-
mutex_lock(&test_dev->config_mutex);
old_val = *config;
mutex_lock(&test_dev->config_mutex);
old_val = *config;
- *(unsigned int *)config =
new
;
+ *(unsigned int *)config =
val
;
ret = test_sync(test_dev);
if (ret) {
ret = test_sync(test_dev);
if (ret) {
@@
-914,18
+911,18
@@
static int test_dev_config_update_uint_range(struct kmod_test_device *test_dev,
unsigned int min,
unsigned int max)
{
unsigned int min,
unsigned int max)
{
+ unsigned int val;
int ret;
int ret;
- unsigned long new;
- ret = kstrtou
l(buf, 10, &new
);
+ ret = kstrtou
int(buf, 10, &val
);
if (ret)
return ret;
if (ret)
return ret;
- if (
new < min || new
> max)
+ if (
val < min || val
> max)
return -EINVAL;
mutex_lock(&test_dev->config_mutex);
return -EINVAL;
mutex_lock(&test_dev->config_mutex);
- *config =
new
;
+ *config =
val
;
mutex_unlock(&test_dev->config_mutex);
/* Always return full write size even if we didn't consume all */
mutex_unlock(&test_dev->config_mutex);
/* Always return full write size even if we didn't consume all */
@@
-936,18
+933,15
@@
static int test_dev_config_update_int(struct kmod_test_device *test_dev,
const char *buf, size_t size,
int *config)
{
const char *buf, size_t size,
int *config)
{
+ int val;
int ret;
int ret;
- long new;
- ret = kstrto
l(buf, 10, &new
);
+ ret = kstrto
int(buf, 10, &val
);
if (ret)
return ret;
if (ret)
return ret;
- if (new < INT_MIN || new > INT_MAX)
- return -EINVAL;
-
mutex_lock(&test_dev->config_mutex);
mutex_lock(&test_dev->config_mutex);
- *config =
new
;
+ *config =
val
;
mutex_unlock(&test_dev->config_mutex);
/* Always return full write size even if we didn't consume all */
return size;
mutex_unlock(&test_dev->config_mutex);
/* Always return full write size even if we didn't consume all */
return size;