diff mbox

IB/mad: Add porn_num to error message

Message ID 1484830805-7324-1-git-send-email-yuval.shaia@oracle.com (mailing list archive)
State Superseded
Headers show

Commit Message

Yuval Shaia Jan. 19, 2017, 1 p.m. UTC
Print the invalid port number to ease troubleshooting.

Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
---
 drivers/infiniband/core/mad.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Johannes Thumshirn Jan. 19, 2017, 1:09 p.m. UTC | #1
On Thu, Jan 19, 2017 at 03:00:05PM +0200, Yuval Shaia wrote:
> Print the invalid port number to ease troubleshooting.
> 
> Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
> ---

s/porn_num/port_num in Subject?
diff mbox

Patch

diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c
index a009f71..57f231f 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;
 	}