* [PATCH 0/4] libsas cleanups
@ 2025-07-23 5:38 Damien Le Moal
2025-07-23 5:39 ` [PATCH 1/4] scsi: libsas: Make sas_ata_wait_eh() inline Damien Le Moal
` (3 more replies)
0 siblings, 4 replies; 13+ messages in thread
From: Damien Le Moal @ 2025-07-23 5:38 UTC (permalink / raw)
To: linux-scsi, Martin K . Petersen, John Garry
Martin, John,
While debugging an issue with the pm8001 driver, I generated these
cleanup patches. No functional changes overall.
Damien Le Moal (4):
scsi: libsas: Make sas_ata_wait_eh() inline
scsi: libsas: Make sas_get_ata_info() static
scsi: libsas: Move declarations of internal functions to sas_internal.h
scsi: libsas: Use a bool for sas_deform_port() second argument
drivers/scsi/libsas/sas_ata.c | 13 +----
drivers/scsi/libsas/sas_discover.c | 2 +-
drivers/scsi/libsas/sas_internal.h | 84 +++++++++++++++++++++++++++++-
drivers/scsi/libsas/sas_phy.c | 6 +--
drivers/scsi/libsas/sas_port.c | 13 +++--
include/scsi/sas_ata.h | 74 +-------------------------
6 files changed, 94 insertions(+), 98 deletions(-)
--
2.50.1
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 1/4] scsi: libsas: Make sas_ata_wait_eh() inline
2025-07-23 5:38 [PATCH 0/4] libsas cleanups Damien Le Moal
@ 2025-07-23 5:39 ` Damien Le Moal
2025-07-23 6:12 ` Johannes Thumshirn
2025-07-23 5:39 ` [PATCH 2/4] scsi: libsas: Make sas_get_ata_info() static Damien Le Moal
` (2 subsequent siblings)
3 siblings, 1 reply; 13+ messages in thread
From: Damien Le Moal @ 2025-07-23 5:39 UTC (permalink / raw)
To: linux-scsi, Martin K . Petersen, John Garry
Simplify the code of sas_ata_wait_eh() and make this function inline,
moving its definition and stub definition to
drivers/scsi/libsas/sas_internal.h.
No functional changes.
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
---
drivers/scsi/libsas/sas_ata.c | 11 -----------
drivers/scsi/libsas/sas_internal.h | 12 ++++++++++++
include/scsi/sas_ata.h | 5 -----
3 files changed, 12 insertions(+), 16 deletions(-)
diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c
index 7b4e7a61965a..0afc9944d985 100644
--- a/drivers/scsi/libsas/sas_ata.c
+++ b/drivers/scsi/libsas/sas_ata.c
@@ -925,17 +925,6 @@ void sas_ata_schedule_reset(struct domain_device *dev)
}
EXPORT_SYMBOL_GPL(sas_ata_schedule_reset);
-void sas_ata_wait_eh(struct domain_device *dev)
-{
- struct ata_port *ap;
-
- if (!dev_is_sata(dev))
- return;
-
- ap = dev->sata_dev.ap;
- ata_port_wait_eh(ap);
-}
-
void sas_ata_device_link_abort(struct domain_device *device, bool force_reset)
{
struct ata_port *ap = device->sata_dev.ap;
diff --git a/drivers/scsi/libsas/sas_internal.h b/drivers/scsi/libsas/sas_internal.h
index 03d6ec1eb970..b7d8c0da0ad2 100644
--- a/drivers/scsi/libsas/sas_internal.h
+++ b/drivers/scsi/libsas/sas_internal.h
@@ -222,4 +222,16 @@ static inline void sas_put_device(struct domain_device *dev)
kref_put(&dev->kref, sas_free_device);
}
+#ifdef CONFIG_SCSI_SAS_ATA
+static inline void sas_ata_wait_eh(struct domain_device *dev)
+{
+ if (dev_is_sata(dev))
+ ata_port_wait_eh(dev->sata_dev.ap);
+}
+#else
+static inline void sas_ata_wait_eh(struct domain_device *dev)
+{
+}
+#endif
+
#endif /* _SAS_INTERNAL_H_ */
diff --git a/include/scsi/sas_ata.h b/include/scsi/sas_ata.h
index 92e27e7bf088..4317c39f77bb 100644
--- a/include/scsi/sas_ata.h
+++ b/include/scsi/sas_ata.h
@@ -27,7 +27,6 @@ void sas_ata_task_abort(struct sas_task *task);
void sas_ata_strategy_handler(struct Scsi_Host *shost);
void sas_ata_eh(struct Scsi_Host *shost, struct list_head *work_q);
void sas_ata_schedule_reset(struct domain_device *dev);
-void sas_ata_wait_eh(struct domain_device *dev);
void sas_probe_sata(struct asd_sas_port *port);
void sas_suspend_sata(struct asd_sas_port *port);
void sas_resume_sata(struct asd_sas_port *port);
@@ -73,10 +72,6 @@ static inline void sas_ata_schedule_reset(struct domain_device *dev)
{
}
-static inline void sas_ata_wait_eh(struct domain_device *dev)
-{
-}
-
static inline void sas_probe_sata(struct asd_sas_port *port)
{
}
--
2.50.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 2/4] scsi: libsas: Make sas_get_ata_info() static
2025-07-23 5:38 [PATCH 0/4] libsas cleanups Damien Le Moal
2025-07-23 5:39 ` [PATCH 1/4] scsi: libsas: Make sas_ata_wait_eh() inline Damien Le Moal
@ 2025-07-23 5:39 ` Damien Le Moal
2025-07-23 6:13 ` Johannes Thumshirn
2025-07-23 7:49 ` John Garry
2025-07-23 5:39 ` [PATCH 3/4] scsi: libsas: Move declarations of internal functions to sas_internal.h Damien Le Moal
2025-07-23 5:39 ` [PATCH 4/4] scsi: libsas: Use a bool for sas_deform_port() second argument Damien Le Moal
3 siblings, 2 replies; 13+ messages in thread
From: Damien Le Moal @ 2025-07-23 5:39 UTC (permalink / raw)
To: linux-scsi, Martin K . Petersen, John Garry
The function sas_get_ata_info() is used only in
drivers/scsi/libsas/sas_ata.c. Remove its definition from
include/scsi/sas_ata.h and make this function static.
No functional changes.
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
---
drivers/scsi/libsas/sas_ata.c | 2 +-
include/scsi/sas_ata.h | 6 ------
2 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c
index 0afc9944d985..f10a37f1ee3e 100644
--- a/drivers/scsi/libsas/sas_ata.c
+++ b/drivers/scsi/libsas/sas_ata.c
@@ -252,7 +252,7 @@ static int sas_get_ata_command_set(struct domain_device *dev)
return ata_dev_classify(&tf);
}
-int sas_get_ata_info(struct domain_device *dev, struct ex_phy *phy)
+static int sas_get_ata_info(struct domain_device *dev, struct ex_phy *phy)
{
if (phy->attached_tproto & SAS_PROTOCOL_STP)
dev->tproto = phy->attached_tproto;
diff --git a/include/scsi/sas_ata.h b/include/scsi/sas_ata.h
index 4317c39f77bb..f8806de007ab 100644
--- a/include/scsi/sas_ata.h
+++ b/include/scsi/sas_ata.h
@@ -21,7 +21,6 @@ static inline int dev_is_sata(struct domain_device *dev)
dev->dev_type == SAS_SATA_PM_PORT || dev->dev_type == SAS_SATA_PENDING;
}
-int sas_get_ata_info(struct domain_device *dev, struct ex_phy *phy);
int sas_ata_init(struct domain_device *dev);
void sas_ata_task_abort(struct sas_task *task);
void sas_ata_strategy_handler(struct Scsi_Host *shost);
@@ -84,11 +83,6 @@ static inline void sas_resume_sata(struct asd_sas_port *port)
{
}
-static inline int sas_get_ata_info(struct domain_device *dev, struct ex_phy *phy)
-{
- return 0;
-}
-
static inline void sas_ata_end_eh(struct ata_port *ap)
{
}
--
2.50.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 3/4] scsi: libsas: Move declarations of internal functions to sas_internal.h
2025-07-23 5:38 [PATCH 0/4] libsas cleanups Damien Le Moal
2025-07-23 5:39 ` [PATCH 1/4] scsi: libsas: Make sas_ata_wait_eh() inline Damien Le Moal
2025-07-23 5:39 ` [PATCH 2/4] scsi: libsas: Make sas_get_ata_info() static Damien Le Moal
@ 2025-07-23 5:39 ` Damien Le Moal
2025-07-23 6:16 ` Johannes Thumshirn
2025-07-23 7:52 ` John Garry
2025-07-23 5:39 ` [PATCH 4/4] scsi: libsas: Use a bool for sas_deform_port() second argument Damien Le Moal
3 siblings, 2 replies; 13+ messages in thread
From: Damien Le Moal @ 2025-07-23 5:39 UTC (permalink / raw)
To: linux-scsi, Martin K . Petersen, John Garry
Move the declaration of all functions used only within libsas from
include/scsi/sas_ata.h to drivers/scsi/libsas/sas_internal.h.
No functional changes.
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
---
drivers/scsi/libsas/sas_internal.h | 68 ++++++++++++++++++++++++++++++
include/scsi/sas_ata.h | 63 +--------------------------
2 files changed, 69 insertions(+), 62 deletions(-)
diff --git a/drivers/scsi/libsas/sas_internal.h b/drivers/scsi/libsas/sas_internal.h
index b7d8c0da0ad2..90ec541a1f75 100644
--- a/drivers/scsi/libsas/sas_internal.h
+++ b/drivers/scsi/libsas/sas_internal.h
@@ -223,15 +223,83 @@ static inline void sas_put_device(struct domain_device *dev)
}
#ifdef CONFIG_SCSI_SAS_ATA
+
+int sas_ata_init(struct domain_device *dev);
+void sas_ata_task_abort(struct sas_task *task);
+int sas_discover_sata(struct domain_device *dev);
+int sas_ata_add_dev(struct domain_device *parent, struct ex_phy *phy,
+ struct domain_device *child, int phy_id);
+void sas_ata_strategy_handler(struct Scsi_Host *shost);
+void sas_ata_eh(struct Scsi_Host *shost, struct list_head *work_q);
+void sas_ata_end_eh(struct ata_port *ap);
+
static inline void sas_ata_wait_eh(struct domain_device *dev)
{
if (dev_is_sata(dev))
ata_port_wait_eh(dev->sata_dev.ap);
}
+
+void sas_probe_sata(struct asd_sas_port *port);
+void sas_suspend_sata(struct asd_sas_port *port);
+void sas_resume_sata(struct asd_sas_port *port);
+
#else
+
+static inline int sas_ata_init(struct domain_device *dev)
+{
+ return 0;
+}
+
+static inline void sas_ata_task_abort(struct sas_task *task)
+{
+}
+
+static inline void sas_ata_strategy_handler(struct Scsi_Host *shost)
+{
+}
+
+static inline void sas_ata_eh(struct Scsi_Host *shost, struct list_head *work_q)
+{
+}
+
+static inline void sas_ata_end_eh(struct ata_port *ap)
+{
+}
+
static inline void sas_ata_wait_eh(struct domain_device *dev)
{
}
+
+static inline void sas_probe_sata(struct asd_sas_port *port)
+{
+}
+
+static inline void sas_suspend_sata(struct asd_sas_port *port)
+{
+}
+
+static inline void sas_resume_sata(struct asd_sas_port *port)
+{
+}
+
+static inline void sas_ata_disabled_notice(void)
+{
+ pr_notice_once("ATA device seen but CONFIG_SCSI_SAS_ATA=N\n");
+}
+
+static inline int sas_discover_sata(struct domain_device *dev)
+{
+ sas_ata_disabled_notice();
+ return -ENXIO;
+}
+
+static inline int sas_ata_add_dev(struct domain_device *parent, struct ex_phy *phy,
+ struct domain_device *child, int phy_id)
+{
+ sas_ata_disabled_notice();
+ return -ENODEV;
+}
+
#endif
#endif /* _SAS_INTERNAL_H_ */
diff --git a/include/scsi/sas_ata.h b/include/scsi/sas_ata.h
index f8806de007ab..9df5607e1e6b 100644
--- a/include/scsi/sas_ata.h
+++ b/include/scsi/sas_ata.h
@@ -21,72 +21,24 @@ static inline int dev_is_sata(struct domain_device *dev)
dev->dev_type == SAS_SATA_PM_PORT || dev->dev_type == SAS_SATA_PENDING;
}
-int sas_ata_init(struct domain_device *dev);
-void sas_ata_task_abort(struct sas_task *task);
-void sas_ata_strategy_handler(struct Scsi_Host *shost);
-void sas_ata_eh(struct Scsi_Host *shost, struct list_head *work_q);
void sas_ata_schedule_reset(struct domain_device *dev);
-void sas_probe_sata(struct asd_sas_port *port);
-void sas_suspend_sata(struct asd_sas_port *port);
-void sas_resume_sata(struct asd_sas_port *port);
-void sas_ata_end_eh(struct ata_port *ap);
void sas_ata_device_link_abort(struct domain_device *dev, bool force_reset);
-int sas_execute_ata_cmd(struct domain_device *device, u8 *fis,
- int force_phy_id);
+int sas_execute_ata_cmd(struct domain_device *device, u8 *fis, int force_phy_id);
int smp_ata_check_ready_type(struct ata_link *link);
-int sas_discover_sata(struct domain_device *dev);
-int sas_ata_add_dev(struct domain_device *parent, struct ex_phy *phy,
- struct domain_device *child, int phy_id);
extern const struct attribute_group sas_ata_sdev_attr_group;
#else
-static inline void sas_ata_disabled_notice(void)
-{
- pr_notice_once("ATA device seen but CONFIG_SCSI_SAS_ATA=N\n");
-}
-
static inline int dev_is_sata(struct domain_device *dev)
{
return 0;
}
-static inline int sas_ata_init(struct domain_device *dev)
-{
- return 0;
-}
-static inline void sas_ata_task_abort(struct sas_task *task)
-{
-}
-
-static inline void sas_ata_strategy_handler(struct Scsi_Host *shost)
-{
-}
-
-static inline void sas_ata_eh(struct Scsi_Host *shost, struct list_head *work_q)
-{
-}
static inline void sas_ata_schedule_reset(struct domain_device *dev)
{
}
-static inline void sas_probe_sata(struct asd_sas_port *port)
-{
-}
-
-static inline void sas_suspend_sata(struct asd_sas_port *port)
-{
-}
-
-static inline void sas_resume_sata(struct asd_sas_port *port)
-{
-}
-
-static inline void sas_ata_end_eh(struct ata_port *ap)
-{
-}
-
static inline void sas_ata_device_link_abort(struct domain_device *dev,
bool force_reset)
{
@@ -103,19 +55,6 @@ static inline int smp_ata_check_ready_type(struct ata_link *link)
return 0;
}
-static inline int sas_discover_sata(struct domain_device *dev)
-{
- sas_ata_disabled_notice();
- return -ENXIO;
-}
-
-static inline int sas_ata_add_dev(struct domain_device *parent, struct ex_phy *phy,
- struct domain_device *child, int phy_id)
-{
- sas_ata_disabled_notice();
- return -ENODEV;
-}
-
#define sas_ata_sdev_attr_group ((struct attribute_group) {})
#endif
--
2.50.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 4/4] scsi: libsas: Use a bool for sas_deform_port() second argument
2025-07-23 5:38 [PATCH 0/4] libsas cleanups Damien Le Moal
` (2 preceding siblings ...)
2025-07-23 5:39 ` [PATCH 3/4] scsi: libsas: Move declarations of internal functions to sas_internal.h Damien Le Moal
@ 2025-07-23 5:39 ` Damien Le Moal
2025-07-23 6:15 ` Johannes Thumshirn
2025-07-23 8:03 ` John Garry
3 siblings, 2 replies; 13+ messages in thread
From: Damien Le Moal @ 2025-07-23 5:39 UTC (permalink / raw)
To: linux-scsi, Martin K . Petersen, John Garry
Change the type of the "gone" argument of sas_deform_port() from int to
bool. Simliarly, to be consistent, do the same change to the function
sas_unregister_domain_devices().
No functional changes.
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
---
drivers/scsi/libsas/sas_discover.c | 2 +-
drivers/scsi/libsas/sas_internal.h | 4 ++--
drivers/scsi/libsas/sas_phy.c | 6 +++---
drivers/scsi/libsas/sas_port.c | 13 ++++++-------
4 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/drivers/scsi/libsas/sas_discover.c b/drivers/scsi/libsas/sas_discover.c
index 951bdc554a10..b07062db50b2 100644
--- a/drivers/scsi/libsas/sas_discover.c
+++ b/drivers/scsi/libsas/sas_discover.c
@@ -406,7 +406,7 @@ void sas_unregister_dev(struct asd_sas_port *port, struct domain_device *dev)
}
}
-void sas_unregister_domain_devices(struct asd_sas_port *port, int gone)
+void sas_unregister_domain_devices(struct asd_sas_port *port, bool gone)
{
struct domain_device *dev, *n;
diff --git a/drivers/scsi/libsas/sas_internal.h b/drivers/scsi/libsas/sas_internal.h
index 90ec541a1f75..bb053286639e 100644
--- a/drivers/scsi/libsas/sas_internal.h
+++ b/drivers/scsi/libsas/sas_internal.h
@@ -44,7 +44,7 @@ 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_unregister_domain_devices(struct asd_sas_port *port, bool gone);
void sas_init_disc(struct sas_discovery *disc, struct asd_sas_port *port);
void sas_discover_event(struct asd_sas_port *port, enum discover_event ev);
@@ -70,7 +70,7 @@ void sas_enable_revalidation(struct sas_ha_struct *ha);
void sas_queue_deferred_work(struct sas_ha_struct *ha);
void __sas_drain_work(struct sas_ha_struct *ha);
-void sas_deform_port(struct asd_sas_phy *phy, int gone);
+void sas_deform_port(struct asd_sas_phy *phy, bool gone);
void sas_porte_bytes_dmaed(struct work_struct *work);
void sas_porte_broadcast_rcvd(struct work_struct *work);
diff --git a/drivers/scsi/libsas/sas_phy.c b/drivers/scsi/libsas/sas_phy.c
index 57494ac97076..635835c28ecd 100644
--- a/drivers/scsi/libsas/sas_phy.c
+++ b/drivers/scsi/libsas/sas_phy.c
@@ -20,7 +20,7 @@ static void sas_phye_loss_of_signal(struct work_struct *work)
struct asd_sas_phy *phy = ev->phy;
phy->error = 0;
- sas_deform_port(phy, 1);
+ sas_deform_port(phy, true);
}
static void sas_phye_oob_done(struct work_struct *work)
@@ -40,7 +40,7 @@ static void sas_phye_oob_error(struct work_struct *work)
struct sas_internal *i =
to_sas_internal(sas_ha->shost->transportt);
- sas_deform_port(phy, 1);
+ sas_deform_port(phy, true);
if (!port && phy->enabled && i->dft->lldd_control_phy) {
phy->error++;
@@ -85,7 +85,7 @@ static void sas_phye_resume_timeout(struct work_struct *work)
phy->error = 0;
phy->suspended = 0;
- sas_deform_port(phy, 1);
+ sas_deform_port(phy, true);
}
diff --git a/drivers/scsi/libsas/sas_port.c b/drivers/scsi/libsas/sas_port.c
index e3f2ed913419..de7556070048 100644
--- a/drivers/scsi/libsas/sas_port.c
+++ b/drivers/scsi/libsas/sas_port.c
@@ -113,7 +113,7 @@ static void sas_form_port(struct asd_sas_phy *phy)
if (port) {
if (!phy_is_wideport_member(port, phy))
- sas_deform_port(phy, 0);
+ sas_deform_port(phy, false);
else if (phy->suspended) {
phy->suspended = 0;
sas_resume_port(phy);
@@ -206,7 +206,7 @@ static void sas_form_port(struct asd_sas_phy *phy)
* This is called when the physical link to the other phy has been
* lost (on this phy), in Event thread context. We cannot delay here.
*/
-void sas_deform_port(struct asd_sas_phy *phy, int gone)
+void sas_deform_port(struct asd_sas_phy *phy, bool gone)
{
struct sas_ha_struct *sas_ha = phy->ha;
struct asd_sas_port *port = phy->port;
@@ -301,7 +301,7 @@ void sas_porte_link_reset_err(struct work_struct *work)
struct asd_sas_event *ev = to_asd_sas_event(work);
struct asd_sas_phy *phy = ev->phy;
- sas_deform_port(phy, 1);
+ sas_deform_port(phy, true);
}
void sas_porte_timer_event(struct work_struct *work)
@@ -309,7 +309,7 @@ void sas_porte_timer_event(struct work_struct *work)
struct asd_sas_event *ev = to_asd_sas_event(work);
struct asd_sas_phy *phy = ev->phy;
- sas_deform_port(phy, 1);
+ sas_deform_port(phy, true);
}
void sas_porte_hard_reset(struct work_struct *work)
@@ -317,7 +317,7 @@ void sas_porte_hard_reset(struct work_struct *work)
struct asd_sas_event *ev = to_asd_sas_event(work);
struct asd_sas_phy *phy = ev->phy;
- sas_deform_port(phy, 1);
+ sas_deform_port(phy, true);
}
/* ---------- SAS port registration ---------- */
@@ -358,8 +358,7 @@ void sas_unregister_ports(struct sas_ha_struct *sas_ha)
for (i = 0; i < sas_ha->num_phys; i++)
if (sas_ha->sas_phy[i]->port)
- sas_deform_port(sas_ha->sas_phy[i], 0);
-
+ sas_deform_port(sas_ha->sas_phy[i], false);
}
const work_func_t sas_port_event_fns[PORT_NUM_EVENTS] = {
--
2.50.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 1/4] scsi: libsas: Make sas_ata_wait_eh() inline
2025-07-23 5:39 ` [PATCH 1/4] scsi: libsas: Make sas_ata_wait_eh() inline Damien Le Moal
@ 2025-07-23 6:12 ` Johannes Thumshirn
0 siblings, 0 replies; 13+ messages in thread
From: Johannes Thumshirn @ 2025-07-23 6:12 UTC (permalink / raw)
To: Damien Le Moal, linux-scsi@vger.kernel.org, Martin K . Petersen,
John Garry
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/4] scsi: libsas: Make sas_get_ata_info() static
2025-07-23 5:39 ` [PATCH 2/4] scsi: libsas: Make sas_get_ata_info() static Damien Le Moal
@ 2025-07-23 6:13 ` Johannes Thumshirn
2025-07-23 7:49 ` John Garry
1 sibling, 0 replies; 13+ messages in thread
From: Johannes Thumshirn @ 2025-07-23 6:13 UTC (permalink / raw)
To: Damien Le Moal, linux-scsi@vger.kernel.org, Martin K . Petersen,
John Garry
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 4/4] scsi: libsas: Use a bool for sas_deform_port() second argument
2025-07-23 5:39 ` [PATCH 4/4] scsi: libsas: Use a bool for sas_deform_port() second argument Damien Le Moal
@ 2025-07-23 6:15 ` Johannes Thumshirn
2025-07-23 8:03 ` John Garry
1 sibling, 0 replies; 13+ messages in thread
From: Johannes Thumshirn @ 2025-07-23 6:15 UTC (permalink / raw)
To: Damien Le Moal, linux-scsi@vger.kernel.org, Martin K . Petersen,
John Garry
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 3/4] scsi: libsas: Move declarations of internal functions to sas_internal.h
2025-07-23 5:39 ` [PATCH 3/4] scsi: libsas: Move declarations of internal functions to sas_internal.h Damien Le Moal
@ 2025-07-23 6:16 ` Johannes Thumshirn
2025-07-23 7:52 ` John Garry
1 sibling, 0 replies; 13+ messages in thread
From: Johannes Thumshirn @ 2025-07-23 6:16 UTC (permalink / raw)
To: Damien Le Moal, linux-scsi@vger.kernel.org, Martin K . Petersen,
John Garry
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/4] scsi: libsas: Make sas_get_ata_info() static
2025-07-23 5:39 ` [PATCH 2/4] scsi: libsas: Make sas_get_ata_info() static Damien Le Moal
2025-07-23 6:13 ` Johannes Thumshirn
@ 2025-07-23 7:49 ` John Garry
1 sibling, 0 replies; 13+ messages in thread
From: John Garry @ 2025-07-23 7:49 UTC (permalink / raw)
To: Damien Le Moal, linux-scsi, Martin K . Petersen
On 23/07/2025 06:39, Damien Le Moal wrote:
> The function sas_get_ata_info() is used only in
> drivers/scsi/libsas/sas_ata.c. Remove its definition from
> include/scsi/sas_ata.h and make this function static.
>
> No functional changes.
>
> Signed-off-by: Damien Le Moal<dlemoal@kernel.org>
Reviewed-by: John Garry <john.g.garry@oracle.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 3/4] scsi: libsas: Move declarations of internal functions to sas_internal.h
2025-07-23 5:39 ` [PATCH 3/4] scsi: libsas: Move declarations of internal functions to sas_internal.h Damien Le Moal
2025-07-23 6:16 ` Johannes Thumshirn
@ 2025-07-23 7:52 ` John Garry
2025-07-23 8:06 ` Damien Le Moal
1 sibling, 1 reply; 13+ messages in thread
From: John Garry @ 2025-07-23 7:52 UTC (permalink / raw)
To: Damien Le Moal, linux-scsi, Martin K . Petersen
On 23/07/2025 06:39, Damien Le Moal wrote:
> void sas_ata_eh(struct Scsi_Host *shost, struct list_head *work_q);
> +void sas_ata_end_eh(struct ata_port *ap);
> +
> static inline void sas_ata_wait_eh(struct domain_device *dev)
> {
> if (dev_is_sata(dev))
> ata_port_wait_eh(dev->sata_dev.ap);
> }
this function stands out a bit now. Why make it inline?
> +
> +void sas_probe_sata(struct asd_sas_port *port);
Apart from comment, above, which is really a comment on an earlier patch:
Reviewed-by: John Garry <john.g.garry@oracle.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 4/4] scsi: libsas: Use a bool for sas_deform_port() second argument
2025-07-23 5:39 ` [PATCH 4/4] scsi: libsas: Use a bool for sas_deform_port() second argument Damien Le Moal
2025-07-23 6:15 ` Johannes Thumshirn
@ 2025-07-23 8:03 ` John Garry
1 sibling, 0 replies; 13+ messages in thread
From: John Garry @ 2025-07-23 8:03 UTC (permalink / raw)
To: Damien Le Moal, linux-scsi, Martin K . Petersen
On 23/07/2025 06:39, Damien Le Moal wrote:
> Change the type of the "gone" argument of sas_deform_port() from int to
> bool. Simliarly, to be consistent, do the same change to the function
> sas_unregister_domain_devices().
>
> No functional changes.
>
> Signed-off-by: Damien Le Moal<dlemoal@kernel.org>
Reviewed-by: John Garry <john.g.garry@oracle.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 3/4] scsi: libsas: Move declarations of internal functions to sas_internal.h
2025-07-23 7:52 ` John Garry
@ 2025-07-23 8:06 ` Damien Le Moal
0 siblings, 0 replies; 13+ messages in thread
From: Damien Le Moal @ 2025-07-23 8:06 UTC (permalink / raw)
To: John Garry, linux-scsi, Martin K . Petersen
On 7/23/25 4:52 PM, John Garry wrote:
> On 23/07/2025 06:39, Damien Le Moal wrote:
>> void sas_ata_eh(struct Scsi_Host *shost, struct list_head *work_q);
>> +void sas_ata_end_eh(struct ata_port *ap);
>> +
>> static inline void sas_ata_wait_eh(struct domain_device *dev)
>> {
>> if (dev_is_sata(dev))
>> ata_port_wait_eh(dev->sata_dev.ap);
>> }
>
> this function stands out a bit now. Why make it inline?
Because it is only 2 lines... But sure, the compiler will probably inline it
anyway, so I can keep it as it was.
>
>> +
>> +void sas_probe_sata(struct asd_sas_port *port);
>
> Apart from comment, above, which is really a comment on an earlier patch:
>
> Reviewed-by: John Garry <john.g.garry@oracle.com>
>
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2025-07-23 8:09 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-23 5:38 [PATCH 0/4] libsas cleanups Damien Le Moal
2025-07-23 5:39 ` [PATCH 1/4] scsi: libsas: Make sas_ata_wait_eh() inline Damien Le Moal
2025-07-23 6:12 ` Johannes Thumshirn
2025-07-23 5:39 ` [PATCH 2/4] scsi: libsas: Make sas_get_ata_info() static Damien Le Moal
2025-07-23 6:13 ` Johannes Thumshirn
2025-07-23 7:49 ` John Garry
2025-07-23 5:39 ` [PATCH 3/4] scsi: libsas: Move declarations of internal functions to sas_internal.h Damien Le Moal
2025-07-23 6:16 ` Johannes Thumshirn
2025-07-23 7:52 ` John Garry
2025-07-23 8:06 ` Damien Le Moal
2025-07-23 5:39 ` [PATCH 4/4] scsi: libsas: Use a bool for sas_deform_port() second argument Damien Le Moal
2025-07-23 6:15 ` Johannes Thumshirn
2025-07-23 8:03 ` John Garry
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).