From patchwork Thu Jan 19 14:48:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuval Shaia X-Patchwork-Id: 9526063 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2DCFB60113 for ; Thu, 19 Jan 2017 14:50:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1F6E628503 for ; Thu, 19 Jan 2017 14:50:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 144E128531; Thu, 19 Jan 2017 14:50:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F0CD02853E for ; Thu, 19 Jan 2017 14:50:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751397AbdASOuc (ORCPT ); Thu, 19 Jan 2017 09:50:32 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:18732 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752855AbdASOtA (ORCPT ); Thu, 19 Jan 2017 09:49:00 -0500 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v0JEmeH3016576 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Jan 2017 14:48:40 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v0JEmenp030084 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Jan 2017 14:48:40 GMT Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v0JEmdt7024118; Thu, 19 Jan 2017 14:48:39 GMT Received: from yuval-lap.localdomain (/77.138.186.148) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 19 Jan 2017 06:48:38 -0800 From: Yuval Shaia To: dledford@redhat.com, sean.hefty@intel.com, hal.rosenstock@gmail.com, sagi@grimberg.me, ira.weiny@intel.com, bart.vanassche@sandisk.com, yuval.shaia@oracle.com, markb@mellanox.com, leon@kernel.org, linux-rdma@vger.kernel.org Subject: [PATCH v1] IB/mad: Add port_num to error message Date: Thu, 19 Jan 2017 16:48:31 +0200 Message-Id: <1484837311-13206-1-git-send-email-yuval.shaia@oracle.com> X-Mailer: git-send-email 1.8.3.1 X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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; }