Message ID | 1387298917-7365-3-git-send-email-umalhi@cisco.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
On 12/17/13 17:48, Upinder Malhi wrote: > Few printks in usnic are called w/o a string literal. > Intel GCC is throwing warnings and this patch provides a fix > for these. > > [ ... ] > @@ -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); > } The old code printed a warning if found == 0. The new code prints a warning if found != 0. If this is on purpose I think this change should be in a separate patch. Bart. -- 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
Bart, This has been fixed in the latest patchset: http://www.spinics.net/lists/linux-rdma/msg18170.html http://www.spinics.net/lists/linux-rdma/msg18171.html Upinder On Dec 21, 2013, at 1:58 AM, Bart Van Assche <bvanassche@acm.org> wrote: > On 12/17/13 17:48, Upinder Malhi wrote: >> Few printks in usnic are called w/o a string literal. >> Intel GCC is throwing warnings and this patch provides a fix >> for these. >> >> [ ... ] >> @@ -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); >> } > > The old code printed a warning if found == 0. The new code prints a > warning if found != 0. If this is on purpose I think this change should > be in a separate patch. > > Bart. > -- > 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 -- 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; }
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 <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