Commit 75fe230b authored by Damien Le Moal's avatar Damien Le Moal Committed by Martin K. Petersen
Browse files

scsi: libsas: Use a bool for sas_deform_port() second argument



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: default avatarDamien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20250725015818.171252-6-dlemoal@kernel.org


Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: default avatarJohn Garry <john.g.garry@oracle.com>
Reviewed-by: default avatarJason Yan <yanaijie@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 704ed03a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;

+2 −2
Original line number Diff line number Diff line
@@ -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);
+3 −3
Original line number Diff line number Diff line
@@ -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);
}


+6 −7
Original line number Diff line number Diff line
@@ -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] = {