From patchwork Tue Dec 17 16:48:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Upinder Malhi (umalhi)" X-Patchwork-Id: 3362841 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 133AFC0D4A for ; Tue, 17 Dec 2013 16:58:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0A54620381 for ; Tue, 17 Dec 2013 16:58:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DF8842031C for ; Tue, 17 Dec 2013 16:58:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754877Ab3LQQ62 (ORCPT ); Tue, 17 Dec 2013 11:58:28 -0500 Received: from mtv-iport-4.cisco.com ([173.36.130.15]:8556 "EHLO mtv-iport-4.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754565Ab3LQQ61 (ORCPT ); Tue, 17 Dec 2013 11:58:27 -0500 X-Greylist: delayed 573 seconds by postgrey-1.27 at vger.kernel.org; Tue, 17 Dec 2013 11:58:27 EST DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=2099; q=dns/txt; s=iport; t=1387299507; x=1388509107; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=JHTQF5ujs8lz8Y/KQaPzzSQiVFjXv3HnXtmx0MmviI0=; b=Dr8RuZHONmapbfrouZRsteyDjEJAt59qAgoZfMOb4IwWuVyJv690UFYg aL/1GrxFbZn0tlrmhlo0MitA0kltAcO9Xs23eIdHHAhf+iSptu/BLT6sQ vNGj4/Lp3nYOoSFBuyunr9qS2dk7VnWE/4Lx/NKU4G0JIqGK7HW+hPHis w=; X-IronPort-AV: E=Sophos;i="4.95,502,1384300800"; d="scan'208";a="100782424" Received: from mtv-core-3.cisco.com ([171.68.58.8]) by mtv-iport-4.cisco.com with ESMTP; 17 Dec 2013 16:49:04 +0000 Received: from sjc-savbu-bld03.cisco.com (sjc-savbu-bld03.cisco.com [171.71.188.58]) by mtv-core-3.cisco.com (8.14.5/8.14.5) with ESMTP id rBHGn3V4016722; Tue, 17 Dec 2013 16:49:03 GMT Received: by sjc-savbu-bld03.cisco.com (Postfix, from userid 246720) id 8EAAD3F5AF; Tue, 17 Dec 2013 08:49:03 -0800 (PST) From: Upinder Malhi To: linux-rdma@vger.kernel.org Cc: Upinder Malhi Subject: [PATCH for-next 2/9] IB/usnic: Fix format not a string literal warnings Date: Tue, 17 Dec 2013 08:48:30 -0800 Message-Id: <1387298917-7365-3-git-send-email-umalhi@cisco.com> X-Mailer: git-send-email 1.8.0-rc0 In-Reply-To: <1387298917-7365-1-git-send-email-umalhi@cisco.com> References: <1387298917-7365-1-git-send-email-umalhi@cisco.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-15.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY, USER_IN_DEF_DKIM_WL autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Few printks in usnic are called w/o a string literal. Intel GCC is throwing warnings and this patch provides a fix for these. Signed-off-by: Upinder Malhi --- 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 --git a/drivers/infiniband/hw/usnic/usnic_ib_main.c b/drivers/infiniband/hw/usnic/usnic_ib_main.c index 1771eec..4d8cadc 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; }