summaryrefslogtreecommitdiffstats
path: root/drivers/staging/unisys/visorbus/visorchipset.c
diff options
context:
space:
mode:
authorDavid Binder2017-01-03 22:01:15 +0100
committerGreg Kroah-Hartman2017-01-05 18:48:03 +0100
commit746fb137c1d30fdc690df3df80bf12ff0dcc4fd2 (patch)
tree83f8137b0134c556a3f01651273e2496a5838cb9 /drivers/staging/unisys/visorbus/visorchipset.c
parentstaging: unisys: visorbus: Don't check for more than PAGE_SIZE length in viso... (diff)
downloadkernel-qcow2-linux-746fb137c1d30fdc690df3df80bf12ff0dcc4fd2.tar.gz
kernel-qcow2-linux-746fb137c1d30fdc690df3df80bf12ff0dcc4fd2.tar.xz
kernel-qcow2-linux-746fb137c1d30fdc690df3df80bf12ff0dcc4fd2.zip
staging: unisys: visorbus: visorchipset.c: Don't check for more than PAGE_SIZE length
Since a sysfs entry is allocated 1 page of memory (4096 bytes) by default, there is no need to enforce this limit in the driver. This patch corrects visorbus/visorchipset.c. Signed-off-by: David Binder <david.binder@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys/visorbus/visorchipset.c')
-rw-r--r--drivers/staging/unisys/visorbus/visorchipset.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index 7cbf80318b5c..501eb9e84a6a 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -188,7 +188,7 @@ static ssize_t toolaction_show(struct device *dev,
visorchannel_read(controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol,
tool_action), &tool_action, sizeof(u8));
- return scnprintf(buf, PAGE_SIZE, "%u\n", tool_action);
+ return sprintf(buf, "%u\n", tool_action);
}
static ssize_t toolaction_store(struct device *dev,
@@ -223,8 +223,7 @@ static ssize_t boottotool_show(struct device *dev,
offsetof(struct spar_controlvm_channel_protocol,
efi_spar_ind), &efi_spar_indication,
sizeof(struct efi_spar_indication));
- return scnprintf(buf, PAGE_SIZE, "%u\n",
- efi_spar_indication.boot_to_tool);
+ return sprintf(buf, "%u\n", efi_spar_indication.boot_to_tool);
}
static ssize_t boottotool_store(struct device *dev,
@@ -259,7 +258,7 @@ static ssize_t error_show(struct device *dev, struct device_attribute *attr,
offsetof(struct spar_controlvm_channel_protocol,
installation_error),
&error, sizeof(u32));
- return scnprintf(buf, PAGE_SIZE, "%i\n", error);
+ return sprintf(buf, "%i\n", error);
}
static ssize_t error_store(struct device *dev, struct device_attribute *attr,
@@ -292,7 +291,7 @@ static ssize_t textid_show(struct device *dev, struct device_attribute *attr,
offsetof(struct spar_controlvm_channel_protocol,
installation_text_id),
&text_id, sizeof(u32));
- return scnprintf(buf, PAGE_SIZE, "%i\n", text_id);
+ return sprintf(buf, "%i\n", text_id);
}
static ssize_t textid_store(struct device *dev, struct device_attribute *attr,
@@ -324,7 +323,7 @@ static ssize_t remaining_steps_show(struct device *dev,
offsetof(struct spar_controlvm_channel_protocol,
installation_remaining_steps),
&remaining_steps, sizeof(u16));
- return scnprintf(buf, PAGE_SIZE, "%hu\n", remaining_steps);
+ return sprintf(buf, "%hu\n", remaining_steps);
}
static ssize_t remaining_steps_store(struct device *dev,