diff mbox

[for-next,02/15] IB/usnic: Fix format not a string literal warning

Message ID 1387571206-8043-3-git-send-email-umalhi@cisco.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Upinder Malhi (umalhi) Dec. 20, 2013, 8:26 p.m. UTC
usNIC calls printk w/o string literal in some instances.
Change these instances so the call is made with string literal.

Signed-off-by: Upinder Malhi <umalhi@cisco.com>
---
 drivers/infiniband/hw/usnic/usnic_ib_main.c   | 5 ++---
 drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c | 2 +-
 drivers/infiniband/hw/usnic/usnic_vnic.c      | 2 --
 3 files changed, 3 insertions(+), 6 deletions(-)

--
1.8.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/infiniband/hw/usnic/usnic_ib_main.c b/drivers/infiniband/hw/usnic/usnic_ib_main.c
index 1771eec..696e401 100644
--- a/drivers/infiniband/hw/usnic/usnic_ib_main.c
+++ b/drivers/infiniband/hw/usnic/usnic_ib_main.c
@@ -75,7 +75,7 @@  void usnic_ib_log_vf(struct usnic_ib_vf *vf)
 {
 	char buf[1000];
 	usnic_ib_dump_vf(vf, buf, sizeof(buf));
-	usnic_dbg(buf);
+	usnic_dbg("%s\n", buf);
 }

 /* Start of netdev section */
@@ -372,8 +372,7 @@  static void usnic_ib_undiscover_pf(struct kref *kref)
 		}
 	}

-	if (!found)
-		WARN("Failed to remove PF %s\n", pci_name(dev));
+	WARN(!found, "Failed to remove PF %s\n", pci_name(dev));

 	mutex_unlock(&usnic_ib_ibdev_list_lock);
 }
diff --git a/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c b/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c
index 5ba8678..f647b6b 100644
--- a/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c
+++ b/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c
@@ -432,7 +432,7 @@  static void log_spec(const struct usnic_vnic_res_spec
 {
 	char buf[512];
 	usnic_vnic_spec_dump(buf, sizeof(buf), res_spec);
-	usnic_dbg(buf);
+	usnic_dbg("%s\n", buf);
 }

 struct usnic_ib_qp_grp *usnic_ib_qp_grp_create(struct usnic_fwd_dev *ufdev,
diff --git a/drivers/infiniband/hw/usnic/usnic_vnic.c b/drivers/infiniband/hw/usnic/usnic_vnic.c
index 11c2449..ff0b32d 100644
--- a/drivers/infiniband/hw/usnic/usnic_vnic.c
+++ b/drivers/infiniband/hw/usnic/usnic_vnic.c
@@ -182,8 +182,6 @@  int usnic_vnic_spec_dump(char *buf, int buf_sz, const struct usnic_vnic_res_spec
 				res_cnt);
 	}

-	offset += scnprintf(buf + offset, buf_sz - offset,
-				"\n");
 	return offset;
 }