From patchwork Thu Apr 11 21:53:25 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: 10896963 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 EE35914DB for ; Thu, 11 Apr 2019 21:53:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA96228E29 for ; Thu, 11 Apr 2019 21:53:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D91A028E3E; Thu, 11 Apr 2019 21:53:51 +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 6AE2F28E29 for ; Thu, 11 Apr 2019 21:53:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726895AbfDKVxu (ORCPT ); Thu, 11 Apr 2019 17:53:50 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:36035 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726739AbfDKVxu (ORCPT ); Thu, 11 Apr 2019 17:53:50 -0400 Received: by mail-pg1-f193.google.com with SMTP id 85so4142314pgc.3 for ; Thu, 11 Apr 2019 14:53:50 -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=FCV1O7uLPpy6O7Ni5wbwxb4r9G+65rOLSUs4ETOq8OQ=; b=sYZq7+2DSYjSxtAb+zrjayAUZIhL5wdsiU+g6bKRlb3wkmtJEhnzkumxxavcHjgSYU 4hYYNcZQpjlHAtv8FBgQ3aDgyMB4ss28CM2AcoDCd8x7azrDpzYch+alPZNAraEQ7ZgN ehnguK7vftunYhfFRRK3TQW5fOFWMsI7GG3M6A28hbh69KIbgpCaK+Tr8g6TBhSsAiYW 925QEf98yFYRw2ZWI/G6A5yDA9RRdKP10/LKMASDRtJ9fHcGrfBoOD4mmjNDHDjjyfb2 ODwyVRQF2Rc1BZau6OmmPj8fpiCH5Bdi+NNL2dEAaTXB9bPEssfyTJtnZBGgwYarJ6E+ MKaA== X-Gm-Message-State: APjAAAVe7/vGmnoHGD/49OtdLQ7R/c9K60BsRKyzLkSthwQyzyV6EEa0 7iPLdbZBMdieergbeXXkt0o= X-Google-Smtp-Source: APXvYqzZAxgaKans/sgX/uBxbPWmDwuwYxiJdXJW8bllzXiYh6Hbb0YodKBCYUfsf//2gLMCfK453g== X-Received: by 2002:a63:1912:: with SMTP id z18mr49964937pgl.115.1555019629701; Thu, 11 Apr 2019 14:53:49 -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 o67sm91651066pga.55.2019.04.11.14.53.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Apr 2019 14:53:48 -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 10/10] qla2xxx: Move qla2x00_set_fcport_state() from a .h into a .c file Date: Thu, 11 Apr 2019 14:53:25 -0700 Message-Id: <20190411215325.122837-11-bvanassche@acm.org> X-Mailer: git-send-email 2.20.GIT In-Reply-To: <20190411215325.122837-1-bvanassche@acm.org> References: <20190411215325.122837-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 The qla2x00_set_fcport_state() function is not in the hot path so move its definition from a .h into a .c file. 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 | 17 +++++++++++++++++ drivers/scsi/qla2xxx/qla_inline.h | 19 ------------------- 3 files changed, 18 insertions(+), 19 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h index 05c54cc4b78c..034cfc152336 100644 --- a/drivers/scsi/qla2xxx/qla_gbl.h +++ b/drivers/scsi/qla2xxx/qla_gbl.h @@ -80,6 +80,7 @@ int qla2x00_post_work(struct scsi_qla_host *vha, struct qla_work_evt *e); extern void *qla2x00_alloc_iocbs_ready(struct qla_qpair *, srb_t *); extern int qla24xx_update_fcport_fcp_prio(scsi_qla_host_t *, fc_port_t *); +extern void qla2x00_set_fcport_state(fc_port_t *fcport, int state); extern fc_port_t * qla2x00_alloc_fcport(scsi_qla_host_t *, gfp_t ); diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 66c78afb2718..984ae78194c6 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -4757,6 +4757,23 @@ qla2x00_rport_del(void *data) } } +void qla2x00_set_fcport_state(fc_port_t *fcport, int state) +{ + int old_state; + + old_state = atomic_read(&fcport->state); + atomic_set(&fcport->state, state); + + /* Don't print state transitions during initial allocation of fcport */ + if (old_state && old_state != state) { + ql_dbg(ql_dbg_disc, fcport->vha, 0x207d, + "FCPort %8phC state transitioned from %s to %s - portid=%02x%02x%02x.\n", + fcport->port_name, port_state_str[old_state], + port_state_str[state], fcport->d_id.b.domain, + fcport->d_id.b.area, fcport->d_id.b.al_pa); + } +} + /** * qla2x00_alloc_fcport() - Allocate a generic fcport. * @vha: HA context diff --git a/drivers/scsi/qla2xxx/qla_inline.h b/drivers/scsi/qla2xxx/qla_inline.h index 07c3f45d4bd7..7a67169d94a2 100644 --- a/drivers/scsi/qla2xxx/qla_inline.h +++ b/drivers/scsi/qla2xxx/qla_inline.h @@ -142,25 +142,6 @@ qla2x00_clean_dsd_pool(struct qla_hw_data *ha, struct crc_context *ctx) INIT_LIST_HEAD(&ctx->dsd_list); } -static inline void -qla2x00_set_fcport_state(fc_port_t *fcport, int state) -{ - int old_state; - - old_state = atomic_read(&fcport->state); - atomic_set(&fcport->state, state); - - /* Don't print state transitions during initial allocation of fcport */ - if (old_state && old_state != state) { - ql_dbg(ql_dbg_disc, fcport->vha, 0x207d, - "FCPort %8phC state transitioned from %s to %s - " - "portid=%02x%02x%02x.\n", fcport->port_name, - port_state_str[old_state], port_state_str[state], - fcport->d_id.b.domain, fcport->d_id.b.area, - fcport->d_id.b.al_pa); - } -} - static inline int qla2x00_hba_err_chk_enabled(srb_t *sp) {