summaryrefslogtreecommitdiffstats
path: root/lib/test_firmware.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-06-08 15:50:36 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-06-08 15:50:36 -0400
commit1ce2c85137b1db5b0e4158d558cb93dcff7674df (patch)
tree37f62adbc031e12747ba71f14b304edb8445fa82 /lib/test_firmware.c
parent902b2edfca34f88b04b86e605087e200e7e79880 (diff)
parente7bf2ce837475445bfd44ac1193ced0684a70d96 (diff)
Merge tag 'char-misc-5.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver fixes from Greg KH: "Here are some small char and misc driver fixes for 5.2-rc4 to resolve a number of reported issues. The most "notable" one here is the kernel headers in proc^Wsysfs fixes. Those changes move the header file info into sysfs and fixes the build issues that you reported. Other than that, a bunch of small habanalabs driver fixes, some fpga driver fixes, and a few other tiny driver fixes. All of these have been in linux-next for a while with no reported issues" * tag 'char-misc-5.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: habanalabs: Read upper bits of trace buffer from RWPHI habanalabs: Fix virtual address access via debugfs for 2MB pages fpga: zynqmp-fpga: Correctly handle error pointer habanalabs: fix bug in checking huge page optimization habanalabs: Avoid using a non-initialized MMU cache mutex habanalabs: fix debugfs code uapi/habanalabs: add opcode for enable/disable device debug mode habanalabs: halt debug engines on user process close test_firmware: Use correct snprintf() limit genwqe: Prevent an integer overflow in the ioctl parport: Fix mem leak in parport_register_dev_model fpga: dfl: expand minor range when registering chrdev region fpga: dfl: Add lockdep classes for pdata->lock fpga: dfl: afu: Pass the correct device to dma_mapping_error() fpga: stratix10-soc: fix use-after-free on s10_init() w1: ds2408: Fix typo after 49695ac46861 (reset on output_write retry with readback) kheaders: Do not regenerate archive if config is not changed kheaders: Move from proc to sysfs lkdtm/bugs: Adjust recursion test to avoid elision lkdtm/usercopy: Moves the KERNEL_DS test to non-canonical
Diffstat (limited to 'lib/test_firmware.c')
-rw-r--r--lib/test_firmware.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/test_firmware.c b/lib/test_firmware.c
index 787c146eb485..83ea6c4e623c 100644
--- a/lib/test_firmware.c
+++ b/lib/test_firmware.c
@@ -224,30 +224,30 @@ static ssize_t config_show(struct device *dev,
224 224
225 mutex_lock(&test_fw_mutex); 225 mutex_lock(&test_fw_mutex);
226 226
227 len += snprintf(buf, PAGE_SIZE, 227 len += scnprintf(buf, PAGE_SIZE - len,
228 "Custom trigger configuration for: %s\n", 228 "Custom trigger configuration for: %s\n",
229 dev_name(dev)); 229 dev_name(dev));
230 230
231 if (test_fw_config->name) 231 if (test_fw_config->name)
232 len += snprintf(buf+len, PAGE_SIZE, 232 len += scnprintf(buf+len, PAGE_SIZE - len,
233 "name:\t%s\n", 233 "name:\t%s\n",
234 test_fw_config->name); 234 test_fw_config->name);
235 else 235 else
236 len += snprintf(buf+len, PAGE_SIZE, 236 len += scnprintf(buf+len, PAGE_SIZE - len,
237 "name:\tEMTPY\n"); 237 "name:\tEMTPY\n");
238 238
239 len += snprintf(buf+len, PAGE_SIZE, 239 len += scnprintf(buf+len, PAGE_SIZE - len,
240 "num_requests:\t%u\n", test_fw_config->num_requests); 240 "num_requests:\t%u\n", test_fw_config->num_requests);
241 241
242 len += snprintf(buf+len, PAGE_SIZE, 242 len += scnprintf(buf+len, PAGE_SIZE - len,
243 "send_uevent:\t\t%s\n", 243 "send_uevent:\t\t%s\n",
244 test_fw_config->send_uevent ? 244 test_fw_config->send_uevent ?
245 "FW_ACTION_HOTPLUG" : 245 "FW_ACTION_HOTPLUG" :
246 "FW_ACTION_NOHOTPLUG"); 246 "FW_ACTION_NOHOTPLUG");
247 len += snprintf(buf+len, PAGE_SIZE, 247 len += scnprintf(buf+len, PAGE_SIZE - len,
248 "sync_direct:\t\t%s\n", 248 "sync_direct:\t\t%s\n",
249 test_fw_config->sync_direct ? "true" : "false"); 249 test_fw_config->sync_direct ? "true" : "false");
250 len += snprintf(buf+len, PAGE_SIZE, 250 len += scnprintf(buf+len, PAGE_SIZE - len,
251 "read_fw_idx:\t%u\n", test_fw_config->read_fw_idx); 251 "read_fw_idx:\t%u\n", test_fw_config->read_fw_idx);
252 252
253 mutex_unlock(&test_fw_mutex); 253 mutex_unlock(&test_fw_mutex);