Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp466437ybt; Fri, 19 Jun 2020 06:13:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEsI0xL2RK11E/+/GzAvznkstVo6lgWcjlAU02T1LkmPUSPLaFIcMB+USkFYmf+YzGUr5/ X-Received: by 2002:a05:6402:17ce:: with SMTP id s14mr3225067edy.53.1592572425115; Fri, 19 Jun 2020 06:13:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592572425; cv=none; d=google.com; s=arc-20160816; b=t+kEnPs7OstZXxWReo0PWKgXpQyxud5Yna2X8qGxuv4biCQX2s/XUcxYWMD6YBbri7 nkIZhf3Z1tLXZr4syU6S2h0HwRebiMoITbVJxzc6VLiyfsVQQRyNG48GT2+ZmiiPPRDC u7Ge8aF2MXLXcgFkBHQYuSVS0NVzfTAgji3j+JMfnXS8Ox8JHuAxSbc0pVO8swyUoqcD 3Frx+SqXrllZUaATAjIFtuIB+rkCNYIRXmffjA0WcPVZ8o5Csaxaq8Iqi8RkZ6Ke6aO6 ffk6KyHaFRonPFexA+yFpruT4Y2OU2gk6zHiJToVMjz6WRss5PgSYmg81QguG4M3+BL6 90zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=JP6uPpMAgWXgeAfAgXoDQSBoCbrd27SovfuK6ZrWwSg=; b=GWURKRF8nhTEbFT77AezF3LDYAXdVFmxh7OYnQlJweK8XOxhrhhCHP195e1WrInVNB LsMWZcLf/ogI/ZeIRM79lWq1GM8n/DnSejvBN2jQ0w2eudzh+u1kl0MpAVUrRU26njXQ qVS/JAXJAqQXaKfQDuDuDm9GWmSqnFnHrkK4NMTgmQOAV1Q5M2rhTl+UAaX8zC/5IHlk Tr5He/Uew+pj8RiMRJ+NOpxWGxTxn66efZPh75Hcan1qyeEUmFdB35G/prdDQQBAWUyF k0q3h32n5pllxzgQCAjehZeXm/6oJ3EycPHRa/7pQEofipQV413fwwLunXRihlJuM1O2 fsWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VkGlO6Ux; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a22si3676284ejr.529.2020.06.19.06.13.22; Fri, 19 Jun 2020 06:13:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VkGlO6Ux; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731053AbgFSNLL (ORCPT + 99 others); Fri, 19 Jun 2020 09:11:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725974AbgFSNLG (ORCPT ); Fri, 19 Jun 2020 09:11:06 -0400 Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C4FCC06174E; Fri, 19 Jun 2020 06:11:05 -0700 (PDT) Received: by mail-ed1-x543.google.com with SMTP id w7so7595659edt.1; Fri, 19 Jun 2020 06:11:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=JP6uPpMAgWXgeAfAgXoDQSBoCbrd27SovfuK6ZrWwSg=; b=VkGlO6UxVIVq50qO62el0VgTbxXcwkOviiDL5bINq0+1IFLBt9orv8eo19RfPfDNMA LBeli6jfa3SY21Vv8XGflFLxzPb49ba6FFnjsfDQBz71Icnw3ygT5xFDaFr06Rm3fN3x u6j5D2Iky8+vhG229y9fXT4rSCxtFxExMzCI84flIdh63Ov7h6Ogk1A21LlwYQL/jIx7 LE3RTqmaDcfcpSFo+BZGN/YqHs6ug48AldeXdeV4WFM2sK2BoiEI5YmHXeyAJIAiQu/B SRTH3a+nQNuoE8tUEKUQUAEQzoBVUNAeg4T/9hPSjzkBmK1f53T1BbnIw8Ih0axLMGOE J9RA== 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; bh=JP6uPpMAgWXgeAfAgXoDQSBoCbrd27SovfuK6ZrWwSg=; b=e4xlfBP/Sp70mIaB7++pwNPE9sQoUUZi3CX3FrriKEBOYf9JfUR8TIdJjpKx5hdJx5 D6RbmkPKpBNDRIHelSTV5eHrYsS+TfUuNkCsogCHMoIXlW1Q1WHY+gO9w3XIdiz/PWFk QEed0lmbK3mBQzEf60Z/F7dUEb1cXr6L538dtFtYMVnaYlcrfe1V7fPY8EtEEk/qMDVY rtD+PLflHN4IYbUZTQfF0R7cJVvPiPBIsWsOhTn4oPIEt2G2GTRRF3B78USO+OkdOzVF xLJwTa+brh+U08NlIsHvUg2++FL7ZlfAsw9wx5hehvITpT4Y0bZBiIYKYEi0IBi1pUiv MtJg== X-Gm-Message-State: AOAM532zOQ2cdaVh0J0aCEk7GQZURGM0LBaIdhIu0Rav8cJVo049IPih 9sIpldAuZwN1o9iP6E7T/WJxeEK51ynk3g== X-Received: by 2002:a05:6402:6d6:: with SMTP id n22mr3367940edy.362.1592572264186; Fri, 19 Jun 2020 06:11:04 -0700 (PDT) Received: from ubuntu-laptop.micron.com ([165.225.203.62]) by smtp.gmail.com with ESMTPSA id m30sm4610677eda.16.2020.06.19.06.11.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jun 2020 06:11:03 -0700 (PDT) From: Bean Huo To: jejb@linux.ibm.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: beanhuo@micron.com, bvanassche@acm.org Subject: [RFC PATCH ] scsi: remove scsi_sdb_cache Date: Fri, 19 Jun 2020 15:10:42 +0200 Message-Id: <20200619131042.10759-1-huobean@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bean Huo After 'commit f664a3cc17b7 ("scsi: kill off the legacy IO path")', scsi_sdb_cache not be used any more, remove it. Signed-off-by: Bean Huo --- drivers/scsi/scsi.c | 3 --- drivers/scsi/scsi_lib.c | 18 +----------------- drivers/scsi/scsi_priv.h | 1 - 3 files changed, 1 insertion(+), 21 deletions(-) diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index 56c24a73e0c7..24619c3bebd5 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c @@ -754,9 +754,6 @@ static int __init init_scsi(void) { int error; - error = scsi_init_queue(); - if (error) - return error; error = scsi_init_procfs(); if (error) goto cleanup_queue; diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 0ba7a65e7c8d..3fadfe9447e8 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -52,7 +52,6 @@ #define SCSI_INLINE_SG_CNT 2 #endif -static struct kmem_cache *scsi_sdb_cache; static struct kmem_cache *scsi_sense_cache; static struct kmem_cache *scsi_sense_isadma_cache; static DEFINE_MUTEX(scsi_sense_cache_mutex); @@ -1955,24 +1954,10 @@ void scsi_unblock_requests(struct Scsi_Host *shost) } EXPORT_SYMBOL(scsi_unblock_requests); -int __init scsi_init_queue(void) -{ - scsi_sdb_cache = kmem_cache_create("scsi_data_buffer", - sizeof(struct scsi_data_buffer), - 0, 0, NULL); - if (!scsi_sdb_cache) { - printk(KERN_ERR "SCSI: can't init scsi sdb cache\n"); - return -ENOMEM; - } - - return 0; -} - void scsi_exit_queue(void) { kmem_cache_destroy(scsi_sense_cache); kmem_cache_destroy(scsi_sense_isadma_cache); - kmem_cache_destroy(scsi_sdb_cache); } /** @@ -2039,7 +2024,6 @@ scsi_mode_select(struct scsi_device *sdev, int pf, int sp, int modepage, real_buffer[1] = data->medium_type; real_buffer[2] = data->device_specific; real_buffer[3] = data->block_descriptor_length; - cmd[0] = MODE_SELECT; cmd[4] = len; @@ -2227,7 +2211,7 @@ scsi_device_set_state(struct scsi_device *sdev, enum scsi_device_state state) goto illegal; } break; - + case SDEV_RUNNING: switch (oldstate) { case SDEV_CREATED: diff --git a/drivers/scsi/scsi_priv.h b/drivers/scsi/scsi_priv.h index 22b6585e28b4..d12ada035961 100644 --- a/drivers/scsi/scsi_priv.h +++ b/drivers/scsi/scsi_priv.h @@ -93,7 +93,6 @@ extern struct request_queue *scsi_mq_alloc_queue(struct scsi_device *sdev); extern void scsi_start_queue(struct scsi_device *sdev); extern int scsi_mq_setup_tags(struct Scsi_Host *shost); extern void scsi_mq_destroy_tags(struct Scsi_Host *shost); -extern int scsi_init_queue(void); extern void scsi_exit_queue(void); extern void scsi_evt_thread(struct work_struct *work); struct request_queue; -- 2.17.1