Skip to contentSkip to conversation

time: clocksource: Remove unnecessary ‘0’ values from count

PATCH New Li zeming 1 participant 1 message Aug 15, 2023 Timekeeping, clocksource core, NTP, alarmtimer

lore
Share & tools
lore

Li zeming

author
#0 lore raw

PATCH 1/1 time: clocksource: Remove unnecessary ‘0’ values from count

count is assigned first, so it does not need to initialize the assignment.

---
 kernel/time/clocksource.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/time/clocksource.c +1 -1
index 961c8a79b87a..40eb83d9db28 100644
@@ -1312,7 +1312,7 @@ static ssize_t current_clocksource_show(struct device *dev,
 					struct device_attribute *attr,
 					char *buf)
 {
-	ssize_t count = 0;
+	ssize_t count;
 
 	mutex_lock(&clocksource_mutex);
 	count = snprintf(buf, PAGE_SIZE, "%s\n", curr_clocksource->name);
Signature · 1 line
2.18.2