From patchwork Wed Apr 17 21:44:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10906207 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5232D17E6 for ; Wed, 17 Apr 2019 21:45:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3FAAE2867C for ; Wed, 17 Apr 2019 21:45:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 343E5287C8; Wed, 17 Apr 2019 21:45:07 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 CA7912867C for ; Wed, 17 Apr 2019 21:45:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387924AbfDQVpG (ORCPT ); Wed, 17 Apr 2019 17:45:06 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:44720 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387577AbfDQVpC (ORCPT ); Wed, 17 Apr 2019 17:45:02 -0400 Received: by mail-pg1-f193.google.com with SMTP id i2so138705pgj.11 for ; Wed, 17 Apr 2019 14:45:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=z5wjEFF2B1Zxm+xyOqUNa2TxiH5hEKW7xMB/C+pftkA=; b=Ede68FybtNgZoN2tsvEo+KtzzPiUyLFflDbTWF2O+zNGK6g5VgzmXiCCoL20SMUp9r MYIahNNlAiNvMB6bkden64bH15YT4EYXMaRSWOuqFmmvxJpFOcw7AJNQRZW57wcDB/o9 DPE/0+AFPcdhdTNMMtkW8V4WEs3mpXFV0EfeIw/RGZ0N6vDAUFz7C2sRfWJeJ/CAvQkN 9avDo8/StMS+sNh7fR8IgVh9GBuaZtMuAD4OGLMz0Y6hvRmSnEUJeg3qisnNZnV2NTBP OaB7Bub5PI/lvvxeOhmiboB5t7kyJZ0v5sZtA5odSgf/qgRmdGIJnG0k7J3DQ62DzP9n Odug== X-Gm-Message-State: APjAAAXlXn4GOSvNvFu8IXf0ni05PbAwlKksZCVntQI6RbDkgCPsJFWb E1vA4RgTkDvSF9I5mqIYGFw= X-Google-Smtp-Source: APXvYqxn5H4nGH0rGtBoHz/1rgWv6J2yY/HphutEetS9S2S/zLfXf5HCKwZk6TDviHM5fyAedll1aQ== X-Received: by 2002:a62:2587:: with SMTP id l129mr92472926pfl.151.1555537501436; Wed, 17 Apr 2019 14:45:01 -0700 (PDT) Received: from desktop-bart.svl.corp.google.com ([2620:15c:2cd:203:5cdc:422c:7b28:ebb5]) by smtp.gmail.com with ESMTPSA id d68sm219314pfg.16.2019.04.17.14.45.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Apr 2019 14:45:00 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Christoph Hellwig , Bart Van Assche , Himanshu Madhani , Giridhar Malavali Subject: [PATCH 06/34] qla2xxx: Move qla2x00_clear_loop_id() from qla_inline.h into qla_init.c Date: Wed, 17 Apr 2019 14:44:15 -0700 Message-Id: <20190417214443.243152-7-bvanassche@acm.org> X-Mailer: git-send-email 2.20.GIT In-Reply-To: <20190417214443.243152-1-bvanassche@acm.org> References: <20190417214443.243152-1-bvanassche@acm.org> MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since qla2x00_clear_loop_id() is not in the hot path, uninline it. Cc: Himanshu Madhani Cc: Giridhar Malavali Signed-off-by: Bart Van Assche --- drivers/scsi/qla2xxx/qla_gbl.h | 1 + drivers/scsi/qla2xxx/qla_init.c | 12 ++++++++++++ drivers/scsi/qla2xxx/qla_inline.h | 12 ------------ 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h index 97be390e027d..3275c86087c4 100644 --- a/drivers/scsi/qla2xxx/qla_gbl.h +++ b/drivers/scsi/qla2xxx/qla_gbl.h @@ -38,6 +38,7 @@ extern int qla81xx_load_risc(scsi_qla_host_t *, uint32_t *); extern int qla2x00_perform_loop_resync(scsi_qla_host_t *); extern int qla2x00_loop_resync(scsi_qla_host_t *); +extern void qla2x00_clear_loop_id(fc_port_t *fcport); extern int qla2x00_fabric_login(scsi_qla_host_t *, fc_port_t *, uint16_t *); extern int qla2x00_local_device_login(scsi_qla_host_t *, fc_port_t *); diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 14edf3614614..bba37820d226 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -557,6 +557,18 @@ static int qla2x00_find_new_loop_id(scsi_qla_host_t *vha, fc_port_t *dev) return rval; } +void qla2x00_clear_loop_id(fc_port_t *fcport) +{ + struct qla_hw_data *ha = fcport->vha->hw; + + if (fcport->loop_id == FC_NO_LOOP_ID || + qla2x00_is_reserved_id(fcport->vha, fcport->loop_id)) + return; + + clear_bit(fcport->loop_id, ha->loop_id_map); + fcport->loop_id = FC_NO_LOOP_ID; +} + static void qla24xx_handle_gnl_done_event(scsi_qla_host_t *vha, struct event_arg *ea) { diff --git a/drivers/scsi/qla2xxx/qla_inline.h b/drivers/scsi/qla2xxx/qla_inline.h index d6808d3e0ccb..57b7e38e3056 100644 --- a/drivers/scsi/qla2xxx/qla_inline.h +++ b/drivers/scsi/qla2xxx/qla_inline.h @@ -101,18 +101,6 @@ qla2x00_is_reserved_id(scsi_qla_host_t *vha, uint16_t loop_id) loop_id == MANAGEMENT_SERVER || loop_id == BROADCAST); } -static inline void -qla2x00_clear_loop_id(fc_port_t *fcport) { - struct qla_hw_data *ha = fcport->vha->hw; - - if (fcport->loop_id == FC_NO_LOOP_ID || - qla2x00_is_reserved_id(fcport->vha, fcport->loop_id)) - return; - - clear_bit(fcport->loop_id, ha->loop_id_map); - fcport->loop_id = FC_NO_LOOP_ID; -} - static inline void qla2x00_clean_dsd_pool(struct qla_hw_data *ha, struct crc_context *ctx) {