2023-12-01 19:39:47

by Nick Spooner

[permalink] [raw]
Subject: [PATCH] scsi: libsas: fix whitespace formatting

Resolve whitespace issues reported by checkpatch.pl:

WARNING: Missing a blank line after declarations
CHECK: Blank lines aren't necessary before a close brace '}'
CHECK: spaces preferred around that '|' (ctx:VxV)

Signed-off-by: Nick Spooner <[email protected]>
---
drivers/scsi/libsas/sas_init.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/libsas/sas_init.c b/drivers/scsi/libsas/sas_init.c
index 9c8cc723170d..91946f56b236 100644
--- a/drivers/scsi/libsas/sas_init.c
+++ b/drivers/scsi/libsas/sas_init.c
@@ -309,6 +309,7 @@ int sas_phy_reset(struct sas_phy *phy, int hard_reset)
} else {
struct sas_rphy *rphy = dev_to_rphy(phy->dev.parent);
struct domain_device *ddev = sas_find_dev_by_rphy(rphy);
+
ret = sas_smp_phy_control(ddev, phy->number, reset_type, NULL);
}
return ret;
@@ -346,9 +347,9 @@ static int sas_set_phy_speed(struct sas_phy *phy,
} else {
struct sas_rphy *rphy = dev_to_rphy(phy->dev.parent);
struct domain_device *ddev = sas_find_dev_by_rphy(rphy);
+
ret = sas_smp_phy_control(ddev, phy->number,
PHY_FUNC_LINK_RESET, rates);
-
}

return ret;
@@ -612,7 +613,7 @@ static inline ssize_t phy_event_threshold_store(struct device *dev,
}

DEVICE_ATTR(phy_event_threshold,
- S_IRUGO|S_IWUSR,
+ S_IRUGO | S_IWUSR,
phy_event_threshold_show,
phy_event_threshold_store);
EXPORT_SYMBOL_GPL(dev_attr_phy_event_threshold);
--
2.34.1


2023-12-06 02:24:13

by Martin K. Petersen

[permalink] [raw]
Subject: Re: [PATCH] scsi: libsas: fix whitespace formatting


Nick,

> Resolve whitespace issues reported by checkpatch.pl:

checkpatch.pl is for validating patches. We only adjust formatting for
existing code when we have to change the code for functional reasons.

--
Martin K. Petersen Oracle Linux Engineering