Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9f6a240

Browse files
JoePerchestorvalds
authored andcommitted
power: wakeup: remove use of seq_printf return value
The seq_printf return value, because it's frequently misused, will eventually be converted to void. See: commit 1f33c41 ("seq_file: Rename seq_overflow() to seq_has_overflowed() and make public") Signed-off-by: Joe Perches <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: Pavel Machek <[email protected]> Cc: Len Brown <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 3ac62bc commit 9f6a240

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

drivers/base/power/wakeup.c

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,6 @@ static int print_wakeup_source_stats(struct seq_file *m,
843843
unsigned long active_count;
844844
ktime_t active_time;
845845
ktime_t prevent_sleep_time;
846-
int ret;
847846

848847
spin_lock_irqsave(&ws->lock, flags);
849848

@@ -866,17 +865,16 @@ static int print_wakeup_source_stats(struct seq_file *m,
866865
active_time = ktime_set(0, 0);
867866
}
868867

869-
ret = seq_printf(m, "%-12s\t%lu\t\t%lu\t\t%lu\t\t%lu\t\t"
870-
"%lld\t\t%lld\t\t%lld\t\t%lld\t\t%lld\n",
871-
ws->name, active_count, ws->event_count,
872-
ws->wakeup_count, ws->expire_count,
873-
ktime_to_ms(active_time), ktime_to_ms(total_time),
874-
ktime_to_ms(max_time), ktime_to_ms(ws->last_time),
875-
ktime_to_ms(prevent_sleep_time));
868+
seq_printf(m, "%-12s\t%lu\t\t%lu\t\t%lu\t\t%lu\t\t%lld\t\t%lld\t\t%lld\t\t%lld\t\t%lld\n",
869+
ws->name, active_count, ws->event_count,
870+
ws->wakeup_count, ws->expire_count,
871+
ktime_to_ms(active_time), ktime_to_ms(total_time),
872+
ktime_to_ms(max_time), ktime_to_ms(ws->last_time),
873+
ktime_to_ms(prevent_sleep_time));
876874

877875
spin_unlock_irqrestore(&ws->lock, flags);
878876

879-
return ret;
877+
return 0;
880878
}
881879

882880
/**

0 commit comments

Comments
 (0)