OSDN Git Service

IB/mad: Add port_num to error message
authorYuval Shaia <yuval.shaia@oracle.com>
Thu, 19 Jan 2017 14:48:31 +0000 (16:48 +0200)
committerDoug Ledford <dledford@redhat.com>
Tue, 24 Jan 2017 19:20:42 +0000 (14:20 -0500)
Print the invalid port number to ease troubleshooting.

Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/mad.c

index a009f71..57f231f 100644 (file)
@@ -316,7 +316,9 @@ struct ib_mad_agent *ib_register_mad_agent(struct ib_device *device,
        /* Validate device and port */
        port_priv = ib_get_mad_port(device, port_num);
        if (!port_priv) {
-               dev_notice(&device->dev, "ib_register_mad_agent: Invalid port\n");
+               dev_notice(&device->dev,
+                          "ib_register_mad_agent: Invalid port %d\n",
+                          port_num);
                ret = ERR_PTR(-ENODEV);
                goto error1;
        }