Skip to contentSkip to conversation

ptp: remove unnecessary brace in ptp_clock_unregister()

PATCH In review Jeongjun Park 2 participants 2 messages Jun 6, 2025 – Jun 9, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ptp: remove unnecessary brace in ptp_clock_unregister()

There are unnecessary brace used in the conditional statement where ptp_vclock_in_use() is used in ptp_clock_unregister(). This should be removed.

---
 drivers/ptp/ptp_clock.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/ptp/ptp_clock.c +1 -2
index 35a5994bf64f..0ae9f074fc52 100644
@@ -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);

--

maintainer
#1 lore raw
Quoted 3 lines · 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

Signature · 1 line
pw-bot: reject