From patchwork Tue Sep 12 08:53:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 13381099 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86C72CA0ECE for ; Tue, 12 Sep 2023 08:53:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232755AbjILIxq (ORCPT ); Tue, 12 Sep 2023 04:53:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231764AbjILIxp (ORCPT ); Tue, 12 Sep 2023 04:53:45 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CCCEAA for ; Tue, 12 Sep 2023 01:53:41 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9DE7DC433C7; Tue, 12 Sep 2023 08:53:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694508821; bh=92GrbNhMeOm0FkBMLNfGmmN07iLUeG1Qt8qOEXDMo9U=; h=From:To:Subject:Date:In-Reply-To:References:From; b=IQqINhNYVqQUlrzUoWhOfJJWQR91vpdDOgzyab0+5nW+07jyP19cnWuzeuFipBJpA qV0aXI/XgEm3MNWiPAAEaUxzhzLknPynELmomJwAh2JSMGz2Be8Bfe2nYtU0sA7l45 mArEdSRwBh9EF3CxVvTHz5ENpZAXo16ay2pv4Kh/ihYPfJJOUxgYkD1bBIjff3gpTA iwnXF0Xo047fEjf4PMilgScPP1FHzZ7NdcpoLljXfhry1v3KZmGXD21rWdkM4PCdaC DLxj4uuVhLnayWPhQd3e69zcTf/BFEKPlxGrlELgJ44ZqLfGeAdXJ9VC33Ke46FWeN yAJ0ggffxsBJw== From: Damien Le Moal To: linux-scsi@vger.kernel.org, "Martin K . Petersen" , John Garry Subject: [PATCH v2 1/3] scsi: libsas: Move local functions declarations to sas_internal.h Date: Tue, 12 Sep 2023 17:53:36 +0900 Message-ID: <20230912085338.434381-2-dlemoal@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230912085338.434381-1-dlemoal@kernel.org> References: <20230912085338.434381-1-dlemoal@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Move the declarations of functions used only within libsas from include/scsi/libsas.h to drivers/scsi/libsas/sas_internal.h Signed-off-by: Damien Le Moal Reviewed-by: John Garry --- drivers/scsi/libsas/sas_internal.h | 12 ++++++++++++ include/scsi/libsas.h | 14 -------------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/drivers/scsi/libsas/sas_internal.h b/drivers/scsi/libsas/sas_internal.h index a6dc7dc07fce..cfc921e2765c 100644 --- a/drivers/scsi/libsas/sas_internal.h +++ b/drivers/scsi/libsas/sas_internal.h @@ -39,6 +39,18 @@ struct sas_phy_data { struct sas_work enable_work; }; +void sas_hash_addr(u8 *hashed, const u8 *sas_addr); + +int sas_discover_root_expander(struct domain_device *dev); + +int sas_ex_revalidate_domain(struct domain_device *dev); +void sas_unregister_domain_devices(struct asd_sas_port *port, int gone); +void sas_init_disc(struct sas_discovery *disc, struct asd_sas_port *port); +void sas_discover_event(struct asd_sas_port *, enum discover_event ev); + +void sas_init_dev(struct domain_device *dev); +void sas_unregister_dev(struct asd_sas_port *port, struct domain_device *dev); + void sas_scsi_recover_host(struct Scsi_Host *shost); int sas_register_phys(struct sas_ha_struct *sas_ha); diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 8a43534eea5c..2e800690b127 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h @@ -404,8 +404,6 @@ cmd_to_domain_dev(struct scsi_cmnd *cmd) return sdev_to_domain_dev(cmd->device); } -void sas_hash_addr(u8 *hashed, const u8 *sas_addr); - /* Before calling a notify event, LLDD should use this function * when the link is severed (possibly from its tasklet). * The idea is that the Class only reads those, while the LLDD, @@ -699,20 +697,8 @@ extern struct scsi_transport_template * sas_domain_attach_transport(struct sas_domain_function_template *); extern struct device_attribute dev_attr_phy_event_threshold; -int sas_discover_root_expander(struct domain_device *); - -int sas_ex_revalidate_domain(struct domain_device *); - -void sas_unregister_domain_devices(struct asd_sas_port *port, int gone); -void sas_init_disc(struct sas_discovery *disc, struct asd_sas_port *); -void sas_discover_event(struct asd_sas_port *, enum discover_event ev); - int sas_discover_end_dev(struct domain_device *); -void sas_unregister_dev(struct asd_sas_port *port, struct domain_device *); - -void sas_init_dev(struct domain_device *); - void sas_task_abort(struct sas_task *); int sas_eh_abort_handler(struct scsi_cmnd *cmd); int sas_eh_device_reset_handler(struct scsi_cmnd *cmd); From patchwork Tue Sep 12 08:53:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 13381100 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15AD2CA0ECA for ; Tue, 12 Sep 2023 08:53:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232827AbjILIxu (ORCPT ); Tue, 12 Sep 2023 04:53:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232362AbjILIxq (ORCPT ); Tue, 12 Sep 2023 04:53:46 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D044AA for ; Tue, 12 Sep 2023 01:53:42 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B153C433CA; Tue, 12 Sep 2023 08:53:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694508822; bh=8GIY0hX/apECJAkq9UrWe0jcYTY0W5t9faqRFMBlVAU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=jNisUFFEwf3D+N3BbHahpQdoh4l8Mu4sNWa+ygMKvBhS4+H5afaqeCsIeAllK4WyW sekXQxWaTyWuEfFxKyPQU/8XR/Fl+A0z/1CvWh/rz6f70+p6M9pm3CMZv+hESKwhzN gs7ST+gAZKCgez/vE/CIF58o+sqJZy4KfGCubWXXAtZ8RIE5tT4rW72Ed7khsNEbBB XcwKm2gf6urWjyNpQYhQvJnDJQPQgA3oojSNK/vcsi1fJYl5Zql5m+92X2Z7s81t30 qxzHRy73Lx2Pojxjbog2ocIhcgVYwykb459gOowurCkPsO3u5HG3cbL2Gi3tBfDNzc ao+i9UQjDMf8A== From: Damien Le Moal To: linux-scsi@vger.kernel.org, "Martin K . Petersen" , John Garry Subject: [PATCH v2 2/3] scsi: libsas: Declare sas_set_phy_speed() static Date: Tue, 12 Sep 2023 17:53:37 +0900 Message-ID: <20230912085338.434381-3-dlemoal@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230912085338.434381-1-dlemoal@kernel.org> References: <20230912085338.434381-1-dlemoal@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org sas_set_phy_speed() is used only within sas_init.c. Declare this function as static. Signed-off-by: Damien Le Moal Reviewed-by: John Garry --- drivers/scsi/libsas/sas_init.c | 4 ++-- include/scsi/libsas.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/libsas/sas_init.c b/drivers/scsi/libsas/sas_init.c index 8586dc79f2a0..9c8cc723170d 100644 --- a/drivers/scsi/libsas/sas_init.c +++ b/drivers/scsi/libsas/sas_init.c @@ -315,8 +315,8 @@ int sas_phy_reset(struct sas_phy *phy, int hard_reset) } EXPORT_SYMBOL_GPL(sas_phy_reset); -int sas_set_phy_speed(struct sas_phy *phy, - struct sas_phy_linkrates *rates) +static int sas_set_phy_speed(struct sas_phy *phy, + struct sas_phy_linkrates *rates) { int ret; diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 2e800690b127..d3ace28ee41f 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h @@ -679,7 +679,6 @@ extern void sas_resume_ha(struct sas_ha_struct *sas_ha); extern void sas_resume_ha_no_sync(struct sas_ha_struct *sas_ha); extern void sas_suspend_ha(struct sas_ha_struct *sas_ha); -int sas_set_phy_speed(struct sas_phy *phy, struct sas_phy_linkrates *rates); int sas_phy_reset(struct sas_phy *phy, int hard_reset); int sas_phy_enable(struct sas_phy *phy, int enable); extern int sas_queuecommand(struct Scsi_Host *, struct scsi_cmnd *); From patchwork Tue Sep 12 08:53:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 13381101 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D8FFCA0EC3 for ; Tue, 12 Sep 2023 08:53:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232941AbjILIxv (ORCPT ); Tue, 12 Sep 2023 04:53:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231764AbjILIxr (ORCPT ); Tue, 12 Sep 2023 04:53:47 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64622E79 for ; Tue, 12 Sep 2023 01:53:43 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 75DD6C433C9; Tue, 12 Sep 2023 08:53:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694508823; bh=h9V/TxWvkCsPWm4aDXzjcBB9gkQayI8njTw8esu6BCk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nm1f4y1OZOKCQlge1/EOGyftBtt1HhSM+OJRClhw424c7iWCpOt9KOumsXmG7F8Ri zkh5c/muN4XyBwLIYk2HjGnVlJ3RGkyNALVFJJ15uDq67oTNwqSwBGzITyZV4u4/uL XgJL41U6Jy/6Xf5X+fEMPxbsZlkJdxIfNyeMJPMVSQgEi7Twav9LdbUx46SqeBDj6A X4HEKkuvgt/IOW2xN8iJ+h/52Eds5sxjUUYiVceSTxJbgT7CUZHFFQ1faxKKdqSgGm nXMEEwA1+TuXqRmpuM3qM/FMu8TJwTUA+SoJ4wbT5tPkk9yVgQYuvBhpvftAd6TE7r hbw0MB9VIqXSQ== From: Damien Le Moal To: linux-scsi@vger.kernel.org, "Martin K . Petersen" , John Garry Subject: [PATCH v2 3/3] scsi: libsas: Declare sas_discover_end_dev() static Date: Tue, 12 Sep 2023 17:53:38 +0900 Message-ID: <20230912085338.434381-4-dlemoal@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230912085338.434381-1-dlemoal@kernel.org> References: <20230912085338.434381-1-dlemoal@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org sas_discover_end_dev() is defined and used used only in sas_discover.c. Define this function as static. Signed-off-by: Damien Le Moal Reviewed-by: John Garry --- drivers/scsi/libsas/sas_discover.c | 2 +- include/scsi/libsas.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/scsi/libsas/sas_discover.c b/drivers/scsi/libsas/sas_discover.c index ff7b63b10aeb..8fb7c41c0962 100644 --- a/drivers/scsi/libsas/sas_discover.c +++ b/drivers/scsi/libsas/sas_discover.c @@ -275,7 +275,7 @@ static void sas_resume_devices(struct work_struct *work) * * See comment in sas_discover_sata(). */ -int sas_discover_end_dev(struct domain_device *dev) +static int sas_discover_end_dev(struct domain_device *dev) { return sas_notify_lldd_dev_found(dev); } diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index d3ace28ee41f..f5257103fdb6 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h @@ -696,8 +696,6 @@ extern struct scsi_transport_template * sas_domain_attach_transport(struct sas_domain_function_template *); extern struct device_attribute dev_attr_phy_event_threshold; -int sas_discover_end_dev(struct domain_device *); - void sas_task_abort(struct sas_task *); int sas_eh_abort_handler(struct scsi_cmnd *cmd); int sas_eh_device_reset_handler(struct scsi_cmnd *cmd);