Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp4174576rwi; Mon, 17 Oct 2022 02:33:16 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4JXuPHUsOTX3YUTkUmmjfr5eG/sHI9n9UIivu3x8st2gMQaH/ydpRCdpxDqA1HSAFn1N0w X-Received: by 2002:a17:902:c952:b0:184:ba4f:af39 with SMTP id i18-20020a170902c95200b00184ba4faf39mr11055952pla.58.1665999196467; Mon, 17 Oct 2022 02:33:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665999196; cv=none; d=google.com; s=arc-20160816; b=L0f6dGy3KiuQz9tkRDPHK0l9ez2HFBTZZfv1pPRaW0WJ+BfE2rsHVTWjyAifD0NInx C9RiGuLgwGPaLmKx4jrNc9kqKQ3Mv2RNRKEIi7ITHRSd+NqFr/EEvn5X3q6VUF4Tz29o DOGOQrLykoDgABWuf+QfnloFubTvLlEB9LZ08tNmQYj6o/z11X36+ypQFPFwg3rsbXpn +CgzhO3dfldeatKCpIC8VdWFmm682Uiy3tZRSiJ5zD5VNNcGQX49IioVKbdisFI/p4HJ ST9fVwuzLgKxVeH7C/sQRA6Mw0sBB2NWgfiObYhzC+yfBQiwhYMpko77usP70anoShKz JpxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=PjzNOEJcBzq7KLRpez31B6Pu7ZWLiqqO2TFdkTFanM4=; b=FFmORmOFkuBCX4Ruw01W22cD1/t5HDcyYPaKEgCIfnlYIJp6O4dIu3d1eRpy1Y/AC/ G/wC9cmvq7yIUkp4/HmAn5Oy4IKn9GAupwgEvDWp4JFK5Q4BHZYxacJrqklvru3i4HHa TncH5BYkmpJw9naORc28UE2sBVpvA1lm5WkRE1r3cEowr997oU92FIR7N0HKxk64gfuC 4tENE9eAo7y2muWcXIxle1EvqxXbxfi7bDgDFio2HbwmN4zXR8h5F5t4/1PR8LZNuP4O bPvmD5/4zyYZ/y/qbUYdh21VVvaZxle5Cow+lxHcud9AiA2OPQUkqlLNb2ZH0jXexhHg i1hw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c65-20020a621c44000000b00562512ae9easi10634905pfc.159.2022.10.17.02.33.04; Mon, 17 Oct 2022 02:33:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230290AbiJQIu6 (ORCPT + 99 others); Mon, 17 Oct 2022 04:50:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230177AbiJQIui (ORCPT ); Mon, 17 Oct 2022 04:50:38 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D097317420; Mon, 17 Oct 2022 01:50:33 -0700 (PDT) Received: from fraeml737-chm.china.huawei.com (unknown [172.18.147.207]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4MrVzd5bQKz6HJYL; Mon, 17 Oct 2022 16:49:33 +0800 (CST) Received: from lhrpeml500003.china.huawei.com (7.191.162.67) by fraeml737-chm.china.huawei.com (10.206.15.218) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 17 Oct 2022 10:50:31 +0200 Received: from localhost.localdomain (10.69.192.58) by lhrpeml500003.china.huawei.com (7.191.162.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 17 Oct 2022 09:50:29 +0100 From: John Garry To: , , , CC: , , , , , "John Garry" Subject: [PATCH v6 7/8] scsi: libsas: Make sas_{alloc, alloc_slow, free}_task() private Date: Mon, 17 Oct 2022 17:20:34 +0800 Message-ID: <1665998435-199946-8-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1665998435-199946-1-git-send-email-john.garry@huawei.com> References: <1665998435-199946-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.58] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To lhrpeml500003.china.huawei.com (7.191.162.67) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We have no users outside libsas any longer, so make sas_alloc_task(), sas_alloc_slow_task(), and sas_free_task() private. Signed-off-by: John Garry Tested-by: Damien Le Moal Reviewed-by: Jason Yan Tested-by: Niklas Cassel # pm80xx --- drivers/scsi/libsas/sas_init.c | 3 --- drivers/scsi/libsas/sas_internal.h | 4 ++++ include/scsi/libsas.h | 4 ---- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/libsas/sas_init.c b/drivers/scsi/libsas/sas_init.c index e4f77072a58d..f2c05ebeb72f 100644 --- a/drivers/scsi/libsas/sas_init.c +++ b/drivers/scsi/libsas/sas_init.c @@ -35,7 +35,6 @@ struct sas_task *sas_alloc_task(gfp_t flags) return task; } -EXPORT_SYMBOL_GPL(sas_alloc_task); struct sas_task *sas_alloc_slow_task(gfp_t flags) { @@ -56,7 +55,6 @@ struct sas_task *sas_alloc_slow_task(gfp_t flags) return task; } -EXPORT_SYMBOL_GPL(sas_alloc_slow_task); void sas_free_task(struct sas_task *task) { @@ -65,7 +63,6 @@ void sas_free_task(struct sas_task *task) kmem_cache_free(sas_task_cache, task); } } -EXPORT_SYMBOL_GPL(sas_free_task); /*------------ SAS addr hash -----------*/ void sas_hash_addr(u8 *hashed, const u8 *sas_addr) diff --git a/drivers/scsi/libsas/sas_internal.h b/drivers/scsi/libsas/sas_internal.h index 8d0ad3abc7b5..b54bcf3c9a9d 100644 --- a/drivers/scsi/libsas/sas_internal.h +++ b/drivers/scsi/libsas/sas_internal.h @@ -52,6 +52,10 @@ void sas_unregister_phys(struct sas_ha_struct *sas_ha); struct asd_sas_event *sas_alloc_event(struct asd_sas_phy *phy, gfp_t gfp_flags); void sas_free_event(struct asd_sas_event *event); +struct sas_task *sas_alloc_task(gfp_t flags); +struct sas_task *sas_alloc_slow_task(gfp_t flags); +void sas_free_task(struct sas_task *task); + int sas_register_ports(struct sas_ha_struct *sas_ha); void sas_unregister_ports(struct sas_ha_struct *sas_ha); diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 2dbead74a2af..f86b56bf7833 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h @@ -639,10 +639,6 @@ struct sas_task_slow { #define SAS_TASK_STATE_ABORTED 4 #define SAS_TASK_NEED_DEV_RESET 8 -extern struct sas_task *sas_alloc_task(gfp_t flags); -extern struct sas_task *sas_alloc_slow_task(gfp_t flags); -extern void sas_free_task(struct sas_task *task); - static inline bool sas_is_internal_abort(struct sas_task *task) { return task->task_proto == SAS_PROTOCOL_INTERNAL_ABORT; -- 2.35.3