From patchwork Fri Jun 23 09:10:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Christie X-Patchwork-Id: 9806021 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 A4B176088A for ; Fri, 23 Jun 2017 09:10:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 970312861F for ; Fri, 23 Jun 2017 09:10:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8B5BD28644; Fri, 23 Jun 2017 09:10:33 +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=-6.9 required=2.0 tests=BAYES_00,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 3AD652861F for ; Fri, 23 Jun 2017 09:10:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754396AbdFWJK0 (ORCPT ); Fri, 23 Jun 2017 05:10:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49760 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754352AbdFWJKX (ORCPT ); Fri, 23 Jun 2017 05:10:23 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 79198C0587EB; Fri, 23 Jun 2017 09:10:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 79198C0587EB Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=mchristi@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 79198C0587EB Received: from rh2.redhat.com (ovpn-120-27.rdu2.redhat.com [10.10.120.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id C875152351; Fri, 23 Jun 2017 09:10:22 +0000 (UTC) From: Mike Christie To: bart.vanassche@wdc.com, target-devel@vger.kernel.org, nab@linux-iscsi.org Cc: Mike Christie Subject: [RFC PATCH 4/4] target: drop scsi_get_new_index Date: Fri, 23 Jun 2017 04:10:17 -0500 Message-Id: <1498209017-25110-5-git-send-email-mchristi@redhat.com> In-Reply-To: <1498209017-25110-1-git-send-email-mchristi@redhat.com> References: <1498209017-25110-1-git-send-email-mchristi@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 23 Jun 2017 09:10:23 +0000 (UTC) Sender: target-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: target-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP scsi_get_new_index is not used anymore so drop it. Signed-off-by: Mike Christie --- drivers/target/target_core_internal.h | 1 - drivers/target/target_core_transport.c | 20 -------------------- include/target/target_core_base.h | 8 -------- 3 files changed, 29 deletions(-) diff --git a/drivers/target/target_core_internal.h b/drivers/target/target_core_internal.h index f30e8ac..a161d29 100644 --- a/drivers/target/target_core_internal.h +++ b/drivers/target/target_core_internal.h @@ -133,7 +133,6 @@ extern struct kmem_cache *se_tmr_req_cache; int init_se_kmem_caches(void); void release_se_kmem_caches(void); -u32 scsi_get_new_index(scsi_index_t); void transport_subsystem_check_init(void); int transport_cmd_finish_abort(struct se_cmd *, int); unsigned char *transport_dump_cmd_direction(struct se_cmd *); diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index a5ecec8..eee92a2 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -178,26 +178,6 @@ void release_se_kmem_caches(void) kmem_cache_destroy(t10_alua_lba_map_mem_cache); } -/* This code ensures unique mib indexes are handed out. */ -static DEFINE_SPINLOCK(scsi_mib_index_lock); -static u32 scsi_mib_index[SCSI_INDEX_TYPE_MAX]; - -/* - * Allocate a new row index for the entry type specified - */ -u32 scsi_get_new_index(scsi_index_t type) -{ - u32 new_index; - - BUG_ON((type < 0) || (type >= SCSI_INDEX_TYPE_MAX)); - - spin_lock(&scsi_mib_index_lock); - new_index = ++scsi_mib_index[type]; - spin_unlock(&scsi_mib_index_lock); - - return new_index; -} - void transport_subsystem_check_init(void) { int ret; diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index d275a39..220e360 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -214,14 +214,6 @@ enum tcm_tmrsp_table { TMR_FUNCTION_REJECTED = 5, }; -/* - * Used for target SCSI statistics - */ -typedef enum { - SCSI_INST_INDEX, - SCSI_INDEX_TYPE_MAX -} scsi_index_t; - struct se_cmd; struct t10_alua_lba_map_member {