From patchwork Wed Apr 17 21:44:16 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: 10906209 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 DECB817E0 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 CC0342867C for ; Wed, 17 Apr 2019 21:45:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C0D9A287C8; 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 69CEC2867C for ; Wed, 17 Apr 2019 21:45:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387923AbfDQVpF (ORCPT ); Wed, 17 Apr 2019 17:45:05 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:37807 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387767AbfDQVpD (ORCPT ); Wed, 17 Apr 2019 17:45:03 -0400 Received: by mail-pf1-f195.google.com with SMTP id 8so83563pfr.4 for ; Wed, 17 Apr 2019 14:45:03 -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=PJmOr0xcRv8xSnNsDGeocx7CfB1IFlxtegRSdGV+bUc=; b=hOJjGyTi2x538YnkrHv06xPuLU5PIZkkNC+he0cLYjqRT5xHG43jouy620z4XJPB7p j7E2mkGOy/a99E/VL4kicn4Fp8zI25o6fN0wKCvMx0tFUm+8098OpaY+q8Q1aFYmiZO3 XlJsL715Q1475vtDvFGEG25xWru3DzyTA1/gQ6mELR1zVQif20VsozUvRlLNuI4xeMIu oAN4qVEsV3J/H7CU9MWZ7Q02m1l3X+rOILbzaEw4yIw6VVq8hpsPVM4u+bj0XDG/Aiw4 5mS/MhX0Agxw58I6wIo21MxoRS0wpnpmOG6h4A+JKv0aOIYoMVl+rdV0J3Idk8Ripid6 HaYw== X-Gm-Message-State: APjAAAVY5z1OAxbTTxMslUZd0ItRfvMorU2SFmkHvJWn8cJVVxvIrSCI 1VctV26dYqGJjArwydafuXzAlvA5 X-Google-Smtp-Source: APXvYqw+IzzTklv/PDgKN9cLn4EAaWJSaV6F214fzITT8gS+MIQzTgMc0bZ5JIwZ7ulZBPDEb+eakQ== X-Received: by 2002:a63:7f0b:: with SMTP id a11mr1251936pgd.234.1555537502577; Wed, 17 Apr 2019 14:45:02 -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.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Apr 2019 14:45:01 -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 07/34] qla2xxx: Move qla2x00_is_reserved_id() from qla_inline.h into qla_init.c Date: Wed, 17 Apr 2019 14:44:16 -0700 Message-Id: <20190417214443.243152-8-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 The previous patch moved all qla2x00_is_reserved_id() callers into qla_init.c. Hence also move the qla2x00_is_reserved_id() definition into qla_init.c. Cc: Himanshu Madhani Cc: Giridhar Malavali Signed-off-by: Bart Van Assche --- drivers/scsi/qla2xxx/qla_init.c | 11 +++++++++++ drivers/scsi/qla2xxx/qla_inline.h | 11 ----------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index bba37820d226..241ff5ae26f0 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -514,6 +514,17 @@ qla2x00_async_adisc(struct scsi_qla_host *vha, fc_port_t *fcport, return rval; } +static bool qla2x00_is_reserved_id(scsi_qla_host_t *vha, uint16_t loop_id) +{ + struct qla_hw_data *ha = vha->hw; + + if (IS_FWI2_CAPABLE(ha)) + return loop_id > NPH_LAST_HANDLE; + + return (loop_id > ha->max_loop_id && loop_id < SNS_FIRST_LOOP_ID) || + loop_id == MANAGEMENT_SERVER || loop_id == BROADCAST; +} + /** * qla2x00_find_new_loop_id - scan through our port list and find a new usable loop ID * @vha: adapter state pointer. diff --git a/drivers/scsi/qla2xxx/qla_inline.h b/drivers/scsi/qla2xxx/qla_inline.h index 57b7e38e3056..cf34df8807ff 100644 --- a/drivers/scsi/qla2xxx/qla_inline.h +++ b/drivers/scsi/qla2xxx/qla_inline.h @@ -90,17 +90,6 @@ host_to_adap(uint8_t *src, uint8_t *dst, uint32_t bsize) *odest++ = cpu_to_le32(*isrc); } -static inline int -qla2x00_is_reserved_id(scsi_qla_host_t *vha, uint16_t loop_id) -{ - struct qla_hw_data *ha = vha->hw; - if (IS_FWI2_CAPABLE(ha)) - return (loop_id > NPH_LAST_HANDLE); - - return ((loop_id > ha->max_loop_id && loop_id < SNS_FIRST_LOOP_ID) || - loop_id == MANAGEMENT_SERVER || loop_id == BROADCAST); -} - static inline void qla2x00_clean_dsd_pool(struct qla_hw_data *ha, struct crc_context *ctx) {