From patchwork Fri Dec 22 07:31:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suganath Prabu S X-Patchwork-Id: 10128903 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 51BD660318 for ; Fri, 22 Dec 2017 07:32:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 44EAF29EE0 for ; Fri, 22 Dec 2017 07:32:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 39CDB29FCE; Fri, 22 Dec 2017 07:32:31 +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.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, 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 996D629EE0 for ; Fri, 22 Dec 2017 07:32:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753590AbdLVHca (ORCPT ); Fri, 22 Dec 2017 02:32:30 -0500 Received: from mail-wr0-f194.google.com ([209.85.128.194]:39626 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753466AbdLVHc3 (ORCPT ); Fri, 22 Dec 2017 02:32:29 -0500 Received: by mail-wr0-f194.google.com with SMTP id a41so27096574wra.6 for ; Thu, 21 Dec 2017 23:32:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=vM3kSSW4oxLNAe1Qp8vAPJXlX8DlagsvWmW6V2nmSOc=; b=ck2KVkrVpXdnFs8cH/nUhndJKTjDVIX/liwj74V1a1xGUlWSsF1zV0z+IqugNaX3aQ xD821gVsRwAJlo6FpFckzeamWfPKXwaozVx2wccinB+c34HrKC4dFuLaccIJY5+Ylj6N xnR/zWiUKcyBB9QiRjsuhim4CI0wrxzdxcNTc= 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; bh=vM3kSSW4oxLNAe1Qp8vAPJXlX8DlagsvWmW6V2nmSOc=; b=lqI2RwNtAzakjDJrCVeAyTSo/I+VFiaU6jh3VjcRORrsHxnii7WE8AjOVeF5nEXJNs ebKRioySZaWmVnKBs2k9YhogulkgDUI51Ur5LP6FymjfiFWhklfqeAfP6uDZzAY4YJLU 8mr/rNe09vNCaXWccuFZL1KN9PBST5G+RMf7D9P80qirPgn/+pcuFu75zD7krqq3qvcK ESu/Tpr3DbfmGXhy/ka+rKM2GS5rJPbpiIUlhqkzpSQRqDvjHFtATLcnCwO12TSbj4LF 08k93ZAVrKtk5EGLqu43FQPrdJ5RmdmcSNe3Q/+ofvxToONljBGXrFTRLbLCxXWcm32p zX5A== X-Gm-Message-State: AKGB3mJc7/dzRAw625d5xfXL5FxMyWR4w1Y8IQd9h2JSLWTQe93XlU0A SSSTjKDmS4bFhwAq05V1CdfEhB0k X-Google-Smtp-Source: ACJfBotI0L17XJ1MRpss0fepxtaVy2kVgin+TYNInFxvG9Xta3yUZyW5mLKRHTM+NUVjrGU6ErtyPQ== X-Received: by 10.223.133.230 with SMTP id 35mr7362849wru.188.1513927948035; Thu, 21 Dec 2017 23:32:28 -0800 (PST) Received: from dhcp-135-24-192-103.dhcp.broadcom.net ([192.19.239.250]) by smtp.googlemail.com with ESMTPSA id b7sm10379462wrd.69.2017.12.21.23.32.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Dec 2017 23:32:27 -0800 (PST) From: Suganath Prabu S To: linux-scsi@vger.kernel.org, linux-nvme@lists.infradead.org Cc: Sathya.Prakash@broadcom.com, sreekanth.reddy@broadcom.com, Hannes Reinecke , Suganath Prabu S , Chaitra P B Subject: [PATCH 04/11] mpt3sas: open-code _scsih_scsi_lookup_get() Date: Thu, 21 Dec 2017 23:31:40 -0800 Message-Id: <1513927907-19735-5-git-send-email-suganath-prabu.subramani@broadcom.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1513927907-19735-1-git-send-email-suganath-prabu.subramani@broadcom.com> References: <1513927907-19735-1-git-send-email-suganath-prabu.subramani@broadcom.com> 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 From: Hannes Reinecke Just a wrapper around the scsi lookup array and only used in one place, so open-code it. Signed-off-by: Suganath Prabu S Signed-off-by: Chaitra P B --- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c index 6fea5e6..7d76e8f 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c @@ -1445,19 +1445,6 @@ _scsih_is_nvme_device(u32 device_info) } /** - * _scsih_scsi_lookup_get - returns scmd entry - * @ioc: per adapter object - * @smid: system request message index - * - * Returns the smid stored scmd pointer. - */ -static struct scsi_cmnd * -_scsih_scsi_lookup_get(struct MPT3SAS_ADAPTER *ioc, u16 smid) -{ - return ioc->scsi_lookup[smid - 1].scmd; -} - -/** * __scsih_scsi_lookup_get_clear - returns scmd entry without * holding any lock. * @ioc: per adapter object @@ -7541,7 +7528,7 @@ _scsih_sas_broadcast_primitive_event(struct MPT3SAS_ADAPTER *ioc, for (smid = 1; smid <= ioc->scsiio_depth; smid++) { if (ioc->shost_recovery) goto out; - scmd = _scsih_scsi_lookup_get(ioc, smid); + scmd = ioc->scsi_lookup[smid - 1].scmd; if (!scmd) continue; sdev = scmd->device;