lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150222213835.GA7817@amd>
Date:	Sun, 22 Feb 2015 22:38:35 +0100
From:	Pavel Machek <pavel@....cz>
To:	Joe Perches <joe@...ches.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	Len Brown <len.brown@...el.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 06/27] power: wakeup: Remove use of seq_printf return
 value

On Sat 2015-02-21 18:53:33, Joe Perches wrote:
> The seq_printf return value, because it's frequently misused,
> will eventually be converted to void.
> 
> See: commit 1f33c41c03da ("seq_file: Rename seq_overflow() to
>      seq_has_overflowed() and make public")

You've just removed overflow handling from
print_wakeup_source_stats. Can you explain why that is good idea?

								Pavel

> --- a/drivers/base/power/wakeup.c
> +++ b/drivers/base/power/wakeup.c
> @@ -842,7 +842,6 @@ static int print_wakeup_source_stats(struct seq_file *m,
>  	unsigned long active_count;
>  	ktime_t active_time;
>  	ktime_t prevent_sleep_time;
> -	int ret;
>  
>  	spin_lock_irqsave(&ws->lock, flags);
>  
> @@ -865,17 +864,16 @@ static int print_wakeup_source_stats(struct seq_file *m,
>  		active_time = ktime_set(0, 0);
>  	}
>  
> -	ret = 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",
> -			ws->name, active_count, ws->event_count,
> -			ws->wakeup_count, ws->expire_count,
> -			ktime_to_ms(active_time), ktime_to_ms(total_time),
> -			ktime_to_ms(max_time), ktime_to_ms(ws->last_time),
> -			ktime_to_ms(prevent_sleep_time));
> +	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",
> +		   ws->name, active_count, ws->event_count,
> +		   ws->wakeup_count, ws->expire_count,
> +		   ktime_to_ms(active_time), ktime_to_ms(total_time),
> +		   ktime_to_ms(max_time), ktime_to_ms(ws->last_time),
> +		   ktime_to_ms(prevent_sleep_time));
>  
>  	spin_unlock_irqrestore(&ws->lock, flags);
>  
> -	return ret;
> +	return 0;

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ