From f57e8ca50e23b9e69b2d9f057ca07f9817daab09 Mon Sep 17 00:00:00 2001 From: Yuval Shaia Date: Thu, 19 Jan 2017 16:48:31 +0200 Subject: [PATCH] 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 --- drivers/infiniband/core/mad.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- 2.20.1