summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/hfi1/qsfp.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2016-08-01 19:34:01 +0200
committerBjorn Helgaas <bhelgaas@google.com>2016-08-01 19:34:01 +0200
commit9454c23852ca6d7aec89fd6fd46a046c323caac3 (patch)
tree794be65345027b5adea3720a43124fee338333a5 /drivers/infiniband/hw/hfi1/qsfp.c
parentMerge branches 'pci/host-aardvark', 'pci/host-altera', 'pci/host-dra7xx', 'pc... (diff)
parentPCI: Spread interrupt vectors in pci_alloc_irq_vectors() (diff)
downloadlinux-9454c23852ca6d7aec89fd6fd46a046c323caac3.tar.xz
linux-9454c23852ca6d7aec89fd6fd46a046c323caac3.zip
Merge branch 'pci/msi-affinity' into next
Conflicts: drivers/nvme/host/pci.c
Diffstat (limited to 'drivers/infiniband/hw/hfi1/qsfp.c')
-rw-r--r--drivers/infiniband/hw/hfi1/qsfp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/hfi1/qsfp.c b/drivers/infiniband/hw/hfi1/qsfp.c
index 2441669f0817..9fb561682c66 100644
--- a/drivers/infiniband/hw/hfi1/qsfp.c
+++ b/drivers/infiniband/hw/hfi1/qsfp.c
@@ -579,7 +579,8 @@ int qsfp_dump(struct hfi1_pportdata *ppd, char *buf, int len)
if (ppd->qsfp_info.cache_valid) {
if (QSFP_IS_CU(cache[QSFP_MOD_TECH_OFFS]))
- sprintf(lenstr, "%dM ", cache[QSFP_MOD_LEN_OFFS]);
+ snprintf(lenstr, sizeof(lenstr), "%dM ",
+ cache[QSFP_MOD_LEN_OFFS]);
power_byte = cache[QSFP_MOD_PWR_OFFS];
sofar += scnprintf(buf + sofar, len - sofar, "PWR:%.3sW\n",