From patchwork Mon Mar 20 23:38:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dasaratharaman Chandramouli X-Patchwork-Id: 9635527 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 2839360216 for ; Mon, 20 Mar 2017 23:44:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1A04927A98 for ; Mon, 20 Mar 2017 23:44:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0ECD827B81; Mon, 20 Mar 2017 23:44:14 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 865312768C for ; Mon, 20 Mar 2017 23:44:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755946AbdCTXoL (ORCPT ); Mon, 20 Mar 2017 19:44:11 -0400 Received: from mga04.intel.com ([192.55.52.120]:34412 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754691AbdCTXoG (ORCPT ); Mon, 20 Mar 2017 19:44:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490053446; x=1521589446; h=from:to:subject:date:message-id:in-reply-to:references; bh=qRRv3H1Hds1uFBNLTPuR8Aq2XeTfEMA9F39kKyAJQdE=; b=AKoN11gNBoPcRXkXDQQQ+tCjM9I6azUv/U4bPtfR/XtBYtPKMYedDOqy 2vg+FlVX1p5Hb6zdE7e0fwY3be/Gnw==; Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Mar 2017 16:44:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,196,1486454400"; d="scan'208";a="79181700" Received: from phwtpriv01.ph.intel.com ([10.228.208.76]) by fmsmga006.fm.intel.com with ESMTP; 20 Mar 2017 16:44:05 -0700 From: Dasaratharaman Chandramouli To: Don Hiatt , Ira Weiny , Doug Ledford , linux-rdma Subject: [PATCH v2 1/7] IB/SA: Fix lines longer than 80 columns Date: Mon, 20 Mar 2017 19:38:04 -0400 Message-Id: <1490053090-32840-2-git-send-email-dasaratharaman.chandramouli@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1490053090-32840-1-git-send-email-dasaratharaman.chandramouli@intel.com> References: <1490053090-32840-1-git-send-email-dasaratharaman.chandramouli@intel.com> 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 This fixes a checkpatch issue. The fix is needed so that some of these functions can be moved around in the forthcoming patches Reviewed-by: Don Hiatt Reviewed-by: Ira Weiny Signed-off-by: Dasaratharaman Chandramouli --- drivers/infiniband/core/sa_query.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/infiniband/core/sa_query.c b/drivers/infiniband/core/sa_query.c index 81b742c..60c0405 100644 --- a/drivers/infiniband/core/sa_query.c +++ b/drivers/infiniband/core/sa_query.c @@ -963,8 +963,10 @@ static void update_sm_ah(struct work_struct *work) ah_attr.port_num = port->port_num; if (port_attr.grh_required) { ah_attr.ah_flags = IB_AH_GRH; - ah_attr.grh.dgid.global.subnet_prefix = cpu_to_be64(port_attr.subnet_prefix); - ah_attr.grh.dgid.global.interface_id = cpu_to_be64(IB_SA_WELL_KNOWN_GUID); + ah_attr.grh.dgid.global.subnet_prefix = + cpu_to_be64(port_attr.subnet_prefix); + ah_attr.grh.dgid.global.interface_id = + cpu_to_be64(IB_SA_WELL_KNOWN_GUID); } new_ah->ah = ib_create_ah(port->agent->qp->pd, &ah_attr); @@ -979,10 +981,10 @@ static void update_sm_ah(struct work_struct *work) kref_put(&port->sm_ah->ref, free_sm_ah); port->sm_ah = new_ah; spin_unlock_irq(&port->ah_lock); - } -static void ib_sa_event(struct ib_event_handler *handler, struct ib_event *event) +static void ib_sa_event(struct ib_event_handler *handler, + struct ib_event *event) { if (event->event == IB_EVENT_PORT_ERR || event->event == IB_EVENT_PORT_ACTIVE || @@ -993,8 +995,8 @@ static void ib_sa_event(struct ib_event_handler *handler, struct ib_event *event unsigned long flags; struct ib_sa_device *sa_dev = container_of(handler, typeof(*sa_dev), event_handler); - struct ib_sa_port *port = - &sa_dev->port[event->element.port_num - sa_dev->start_port]; + u8 port_num = event->element.port_num - sa_dev->start_port; + struct ib_sa_port *port = &sa_dev->port[port_num]; if (!rdma_cap_ib_sa(handler->device, port->port_num)) return; @@ -1012,8 +1014,7 @@ static void ib_sa_event(struct ib_event_handler *handler, struct ib_event *event port->classport_info.valid = false; spin_unlock_irqrestore(&port->classport_lock, flags); } - queue_work(ib_wq, &sa_dev->port[event->element.port_num - - sa_dev->start_port].update_task); + queue_work(ib_wq, &sa_dev->port[port_num].update_task); } }