From patchwork Thu Jan 4 12:57:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suganath Prabu S X-Patchwork-Id: 10144707 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 3FA366034B for ; Thu, 4 Jan 2018 12:58:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D73E2817F for ; Thu, 4 Jan 2018 12:58:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2263D28635; Thu, 4 Jan 2018 12:58:03 +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 CB7982817F for ; Thu, 4 Jan 2018 12:58:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752793AbeADM5r (ORCPT ); Thu, 4 Jan 2018 07:57:47 -0500 Received: from mail-qt0-f195.google.com ([209.85.216.195]:38992 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752764AbeADM5q (ORCPT ); Thu, 4 Jan 2018 07:57:46 -0500 Received: by mail-qt0-f195.google.com with SMTP id k19so1722530qtj.6 for ; Thu, 04 Jan 2018 04:57:46 -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=quU+tW4D7NfG2P4jesGUV6OqXxJ9gd8rzOlgNIRP2+E=; b=LVFlzU2Ov6O5WEcJaU1/ZpKQvklTqWdfNllVhcR/4ttR6Y2p1JpN6Ye8tmPzhEW7FP wPSNKGNqTKA1E6awX6ywZs86IeTdjR9rq+SsnYS36bcz5weZuMR/ahxtk94B7JnkuOIQ NaXcMfcB5sEger2NOhdSAEjP1CJWXg/ymQfJs= 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=quU+tW4D7NfG2P4jesGUV6OqXxJ9gd8rzOlgNIRP2+E=; b=B90Wa25uJrLmYwM0TRZsVxixoLK7PgFvubN0kJpV9zhFOJeZbgJ6+mlSYZ3TC8o+WK LxR5mmwtkJmt3XZTneOKAFqUcQrEbx1DxNG6/hMGBhq0n5ZfHG0tbkrMCk7EvzkRKQUc wF61e/P8t9CsQzX+qb1I3orMMPzf0wPOGYvWpgDBAnC9nmfuBTjmWBO4BPeATQzXzDDy y6UuWwh42nlsGOrdj5jaCT4saWYOsCVROLuJYAx8uBJJz1V+i2uDXZTPDFQwspumYm5X 8Su348tK+YNJjyUU+M4aNHoaJ/OtasSHYFAYobHx4ejOS/htXUlG2ldOz4QcV3c1+19R TnWg== X-Gm-Message-State: AKGB3mIv4YkISyZg7xl0msjZyJS2JIvrY1ATdkT2jHGAKq4RZ6nzIrOP gDDqGHp+KD4rKLSP9Vz93pvryabR X-Google-Smtp-Source: ACJfBovISKH+vu6ml8xbcRW2d12IiaEL/VOAC4GmD/KxEGanx10l8vDa5vi9cwJVYF8Q9Y6rqMrcGA== X-Received: by 10.237.35.146 with SMTP id j18mr5629311qtc.271.1515070665466; Thu, 04 Jan 2018 04:57:45 -0800 (PST) Received: from dhcp-135-24-192-103.dhcp.broadcom.net ([192.19.239.250]) by smtp.googlemail.com with ESMTPSA id v58sm2064328qtk.18.2018.01.04.04.57.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Jan 2018 04:57:44 -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, chaitra.basappa@broadcom.com, Hannes Reinecke , Hannes Reinecke , Suganath Prabu S Subject: [Resend 04/11] mpt3sas: open-code _scsih_scsi_lookup_get() Date: Thu, 4 Jan 2018 04:57:04 -0800 Message-Id: <1515070631-14740-5-git-send-email-suganath-prabu.subramani@broadcom.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1515070631-14740-1-git-send-email-suganath-prabu.subramani@broadcom.com> References: <1515070631-14740-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: Hannes Reinecke Signed-off-by: Suganath Prabu S --- 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 9a2cede..e482fa2 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 @@ -7543,7 +7530,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;