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: <201011151650.12406.br1@einfach.org>
Date:	Mon, 15 Nov 2010 16:50:12 +0900
From:	Bruno Randolf <br1@...fach.org>
To:	Stefan Richter <stefanr@...6.in-berlin.de>
Cc:	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	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

On Mon November 15 2010 16:38:39 Stefan Richter wrote:
> On Nov 15 Bruno Randolf wrote:
> > On Sun November 14 2010 17:51:08 Stefan Richter wrote:
> > > BTW, isn't "get" more usually used as a prefix for these kinds of
> > > functions in kernel APIs?  "get" as a suffix more often means "get
> > > a reference" alias increase reference count rather than "get the
> > > value".
> > 
> > Umm. I don't know and honstly I don't care. I think the API ewma_* is
> > consistent. If you have a good reason to change it please let me
> > know, otherwise i'd just leave it like it is now.
> 
> It is not about consistency of the API in itself but about consistency
> with the rest of the kernel.  Cf. skb_get vs. get_unaligned and many
> more.  I for one immediately think of "something is having its
> reference count incremented here" when I come across a something_get
> when reading code.
> 
> I don't know of such a convention being documented anywhere.  But for an
> overkill of examples of "get" as prefix and suffix, grep for get_ and
> _get( in include/.  The same convention exists IME with "put" that
> either writes a value or drops a reference.
> 
> Sorry for bringing this up so late but it is IMO not a trivial point.

That's allright, and I have no problem changing it.

So what would you prefer? And what is the opinion of other people?

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