Skip to content

Commit 75fe230

Browse files
damien-lemoalmartinkpetersen
authored andcommitted
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: Damien Le Moal <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: John Garry <[email protected]> Reviewed-by: Jason Yan <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 704ed03 commit 75fe230

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
lines changed

drivers/scsi/libsas/sas_discover.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ void sas_unregister_dev(struct asd_sas_port *port, struct domain_device *dev)
406406
}
407407
}
408408

409-
void sas_unregister_domain_devices(struct asd_sas_port *port, int gone)
409+
void sas_unregister_domain_devices(struct asd_sas_port *port, bool gone)
410410
{
411411
struct domain_device *dev, *n;
412412

drivers/scsi/libsas/sas_internal.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void sas_hash_addr(u8 *hashed, const u8 *sas_addr);
4444
int sas_discover_root_expander(struct domain_device *dev);
4545

4646
int sas_ex_revalidate_domain(struct domain_device *dev);
47-
void sas_unregister_domain_devices(struct asd_sas_port *port, int gone);
47+
void sas_unregister_domain_devices(struct asd_sas_port *port, bool gone);
4848
void sas_init_disc(struct sas_discovery *disc, struct asd_sas_port *port);
4949
void sas_discover_event(struct asd_sas_port *port, enum discover_event ev);
5050

@@ -70,7 +70,7 @@ void sas_enable_revalidation(struct sas_ha_struct *ha);
7070
void sas_queue_deferred_work(struct sas_ha_struct *ha);
7171
void __sas_drain_work(struct sas_ha_struct *ha);
7272

73-
void sas_deform_port(struct asd_sas_phy *phy, int gone);
73+
void sas_deform_port(struct asd_sas_phy *phy, bool gone);
7474

7575
void sas_porte_bytes_dmaed(struct work_struct *work);
7676
void sas_porte_broadcast_rcvd(struct work_struct *work);

drivers/scsi/libsas/sas_phy.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ static void sas_phye_loss_of_signal(struct work_struct *work)
2020
struct asd_sas_phy *phy = ev->phy;
2121

2222
phy->error = 0;
23-
sas_deform_port(phy, 1);
23+
sas_deform_port(phy, true);
2424
}
2525

2626
static void sas_phye_oob_done(struct work_struct *work)
@@ -40,7 +40,7 @@ static void sas_phye_oob_error(struct work_struct *work)
4040
struct sas_internal *i =
4141
to_sas_internal(sas_ha->shost->transportt);
4242

43-
sas_deform_port(phy, 1);
43+
sas_deform_port(phy, true);
4444

4545
if (!port && phy->enabled && i->dft->lldd_control_phy) {
4646
phy->error++;
@@ -85,7 +85,7 @@ static void sas_phye_resume_timeout(struct work_struct *work)
8585

8686
phy->error = 0;
8787
phy->suspended = 0;
88-
sas_deform_port(phy, 1);
88+
sas_deform_port(phy, true);
8989
}
9090

9191

drivers/scsi/libsas/sas_port.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ static void sas_form_port(struct asd_sas_phy *phy)
113113

114114
if (port) {
115115
if (!phy_is_wideport_member(port, phy))
116-
sas_deform_port(phy, 0);
116+
sas_deform_port(phy, false);
117117
else if (phy->suspended) {
118118
phy->suspended = 0;
119119
sas_resume_port(phy);
@@ -206,7 +206,7 @@ static void sas_form_port(struct asd_sas_phy *phy)
206206
* This is called when the physical link to the other phy has been
207207
* lost (on this phy), in Event thread context. We cannot delay here.
208208
*/
209-
void sas_deform_port(struct asd_sas_phy *phy, int gone)
209+
void sas_deform_port(struct asd_sas_phy *phy, bool gone)
210210
{
211211
struct sas_ha_struct *sas_ha = phy->ha;
212212
struct asd_sas_port *port = phy->port;
@@ -301,23 +301,23 @@ void sas_porte_link_reset_err(struct work_struct *work)
301301
struct asd_sas_event *ev = to_asd_sas_event(work);
302302
struct asd_sas_phy *phy = ev->phy;
303303

304-
sas_deform_port(phy, 1);
304+
sas_deform_port(phy, true);
305305
}
306306

307307
void sas_porte_timer_event(struct work_struct *work)
308308
{
309309
struct asd_sas_event *ev = to_asd_sas_event(work);
310310
struct asd_sas_phy *phy = ev->phy;
311311

312-
sas_deform_port(phy, 1);
312+
sas_deform_port(phy, true);
313313
}
314314

315315
void sas_porte_hard_reset(struct work_struct *work)
316316
{
317317
struct asd_sas_event *ev = to_asd_sas_event(work);
318318
struct asd_sas_phy *phy = ev->phy;
319319

320-
sas_deform_port(phy, 1);
320+
sas_deform_port(phy, true);
321321
}
322322

323323
/* ---------- SAS port registration ---------- */
@@ -358,8 +358,7 @@ void sas_unregister_ports(struct sas_ha_struct *sas_ha)
358358

359359
for (i = 0; i < sas_ha->num_phys; i++)
360360
if (sas_ha->sas_phy[i]->port)
361-
sas_deform_port(sas_ha->sas_phy[i], 0);
362-
361+
sas_deform_port(sas_ha->sas_phy[i], false);
363362
}
364363

365364
const work_func_t sas_port_event_fns[PORT_NUM_EVENTS] = {

0 commit comments

Comments
 (0)