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]
Date:	Sun, 14 Nov 2010 14:07:10 +0900 (JST)
From:	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
To:	Bruno Randolf <br1@...fach.org>
Cc:	kosaki.motohiro@...fujitsu.com,
	Stefan Richter <stefanr@...6.in-berlin.de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	randy.dunlap@...cle.com, peterz@...radead.org, blp@...stanford.edu,
	linux-kernel@...r.kernel.org, Lars_Ericsson@...ia.com,
	kevin.granade@...il.com,
	"John W. Linville" <linville@...driver.com>
Subject: Re: [PATCH v6] Add generic exponentially weighted moving average (EWMA) function

> > Why do ewma_init() and ewma_add() return their first argument?  They look
> > to me like they can be straight-forward void functions.
> 
> You are right, for ewma_init() it does not make sense.
> 
> For ewma_add() I think it does. This has been discussed before (e.g. 
> http://linux.derkeiler.com/Mailing-Lists/Kernel/2010-10/msg09124.html).
> Some people might want to get the value when they add a sample by using 
> ewma_get(ewma_add(&ewma, val));

	ewma_add(&ewma, val);
	ewma_get(&ewma);

is enough simpler and cleaner. I don't oppse this :)


--
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