Commit 55623260 authored by Scott Branden's avatar Scott Branden Committed by Greg Kroah-Hartman

test_firmware: remove unnecessary test_fw_mutex in test_dev_config_show_xxx

Remove unnecessary use of test_fw_mutex in test_dev_config_show_xxx
functions that show simple bool, int, and u8.
Signed-off-by: default avatarScott Branden <scott.branden@broadcom.com>
Reviewed-by: default avatarKees Cook <keescook@chromium.org>
Reviewed-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Link: https://lore.kernel.org/r/20200415002517.4328-1-scott.branden@broadcom.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ab7c1e16
......@@ -310,27 +310,13 @@ static int test_dev_config_update_bool(const char *buf, size_t size,
return ret;
}
static ssize_t
test_dev_config_show_bool(char *buf,
bool config)
static ssize_t test_dev_config_show_bool(char *buf, bool val)
{
bool val;
mutex_lock(&test_fw_mutex);
val = config;
mutex_unlock(&test_fw_mutex);
return snprintf(buf, PAGE_SIZE, "%d\n", val);
}
static ssize_t test_dev_config_show_int(char *buf, int cfg)
static ssize_t test_dev_config_show_int(char *buf, int val)
{
int val;
mutex_lock(&test_fw_mutex);
val = cfg;
mutex_unlock(&test_fw_mutex);
return snprintf(buf, PAGE_SIZE, "%d\n", val);
}
......@@ -354,14 +340,8 @@ static int test_dev_config_update_u8(const char *buf, size_t size, u8 *cfg)
return size;
}
static ssize_t test_dev_config_show_u8(char *buf, u8 cfg)
static ssize_t test_dev_config_show_u8(char *buf, u8 val)
{
u8 val;
mutex_lock(&test_fw_mutex);
val = cfg;
mutex_unlock(&test_fw_mutex);
return snprintf(buf, PAGE_SIZE, "%u\n", val);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment