diff mbox series

[1/3] scsi: libsas: Move local functions declarations to sas_internal.h

Message ID 20230912074715.424062-2-dlemoal@kernel.org (mailing list archive)
State Superseded
Headers show
Series Minor cleanups | expand

Commit Message

Damien Le Moal Sept. 12, 2023, 7:47 a.m. UTC
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 <dlemoal@kernel.org>
---
 drivers/scsi/libsas/sas_internal.h | 11 +++++++++++
 include/scsi/libsas.h              | 12 ------------
 2 files changed, 11 insertions(+), 12 deletions(-)

Comments

John Garry Sept. 12, 2023, 8:19 a.m. UTC | #1
On 12/09/2023 08:47, Damien Le Moal wrote:
> 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 <dlemoal@kernel.org>

Reviewed-by: John Garry <john.g.garry@oracle.com>

>   
> -void sas_unregister_dev(struct asd_sas_port *port, struct domain_device *);
> -
>   void sas_init_dev(struct domain_device *);

I think that this guy can also be relocated

>   
>   void sas_task_abort(struct sas_task *);
Damien Le Moal Sept. 12, 2023, 8:41 a.m. UTC | #2
On 9/12/23 17:19, John Garry wrote:
> On 12/09/2023 08:47, Damien Le Moal wrote:
>> 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 <dlemoal@kernel.org>
> 
> Reviewed-by: John Garry <john.g.garry@oracle.com>
> 
>>   
>> -void sas_unregister_dev(struct asd_sas_port *port, struct domain_device *);
>> -
>>   void sas_init_dev(struct domain_device *);
> 
> I think that this guy can also be relocated

ah! yes. My grep hit hisi_sas, but that was another function.
Adding it.

> 
>>   
>>   void sas_task_abort(struct sas_task *);
>
diff mbox series

Patch

diff --git a/drivers/scsi/libsas/sas_internal.h b/drivers/scsi/libsas/sas_internal.h
index a6dc7dc07fce..e597c1620205 100644
--- a/drivers/scsi/libsas/sas_internal.h
+++ b/drivers/scsi/libsas/sas_internal.h
@@ -39,6 +39,17 @@  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_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..87f194925b3c 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,18 +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 *);