From: Yuval Shaia Date: Thu, 19 Jan 2017 14:48:31 +0000 (+0200) Subject: IB/mad: Add port_num to error message X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f57e8ca50e23b9e69b2d9f057ca07f9817daab09;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git IB/mad: Add port_num to error message Print the invalid port number to ease troubleshooting. Signed-off-by: Yuval Shaia Reviewed-by: Leon Romanovsky Reviewed-by: Johannes Thumshirn Reviewed-by: Ira Weiny Signed-off-by: Doug Ledford --- diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c index a009f7132c73..57f231f1c721 100644 --- a/drivers/infiniband/core/mad.c +++ b/drivers/infiniband/core/mad.c @@ -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; }