drivers/ptp/ptp_clock.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
There are unnecessary brace used in the conditional statement where
ptp_vclock_in_use() is used in ptp_clock_unregister(). This should be
removed.
Signed-off-by: Jeongjun Park <aha310510@gmail.com>
---
drivers/ptp/ptp_clock.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/ptp/ptp_clock.c b/drivers/ptp/ptp_clock.c
index 35a5994bf64f..0ae9f074fc52 100644
--- a/drivers/ptp/ptp_clock.c
+++ b/drivers/ptp/ptp_clock.c
@@ -412,9 +412,8 @@ static int unregister_vclock(struct device *dev, void *data)
int ptp_clock_unregister(struct ptp_clock *ptp)
{
- if (ptp_vclock_in_use(ptp)) {
+ if (ptp_vclock_in_use(ptp))
device_for_each_child(&ptp->dev, NULL, unregister_vclock);
- }
ptp->defunct = 1;
wake_up_interruptible(&ptp->tsev_wq);
--
On Fri, 6 Jun 2025 19:36:59 +0900 Jeongjun Park wrote: > There are unnecessary brace used in the conditional statement where > ptp_vclock_in_use() is used in ptp_clock_unregister(). This should be > removed. Quoting documentation: Clean-up patches ~~~~~~~~~~~~~~~~ Netdev discourages patches which perform simple clean-ups, which are not in the context of other work. For example: * Addressing ``checkpatch.pl`` warnings * Addressing :ref:`Local variable ordering<rcs>` issues * Conversions to device-managed APIs (``devm_`` helpers) This is because it is felt that the churn that such changes produce comes at a greater cost than the value of such clean-ups. Conversely, spelling and grammar fixes are not discouraged. See: https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#clean-up-patches -- pw-bot: reject
© 2016 - 2025 Red Hat, Inc.