diff mbox

[v1] IB/mad: Add port_num to error message

Message ID 1484837311-13206-1-git-send-email-yuval.shaia@oracle.com (mailing list archive)
State Accepted
Headers show

Commit Message

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

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

Comments

Leon Romanovsky Jan. 19, 2017, 3:10 p.m. UTC | #1
On Thu, Jan 19, 2017 at 04:48:31PM +0200, Yuval Shaia wrote:
> Print the invalid port number to ease troubleshooting.
>
> Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
> ---
> v0 -> v1:
> 	* Fix typo in commit header
> ---
>  drivers/infiniband/core/mad.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>

Thanks,
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Johannes Thumshirn Jan. 19, 2017, 3:40 p.m. UTC | #2
On Thu, Jan 19, 2017 at 04:48:31PM +0200, Yuval Shaia wrote:
> Print the invalid port number to ease troubleshooting.
> 
> Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
> ---
> v0 -> v1:
> 	* Fix typo in commit header
> ---

Somehow liked the typo :-D
Anyways,
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Ira Weiny Jan. 19, 2017, 5:05 p.m. UTC | #3
> Print the invalid port number to ease troubleshooting.
> 
> Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>

Reviewed-by: Ira Weiny <ira.weiny@intel.com>

> ---
> v0 -> v1:
> 	* Fix typo in commit header
> ---
>  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
> 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;
>  	}
> --
> 1.8.3.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
Doug Ledford Jan. 24, 2017, 7:22 p.m. UTC | #4
On Thu, 2017-01-19 at 16:48 +0200, Yuval Shaia wrote:
> Print the invalid port number to ease troubleshooting.
> 
> Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
> ---
> v0 -> v1:
> 	* Fix typo in commit header

I chuckled ;-)

Applied to -next area, thanks.
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;
 	}