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, 19 May 2024 19:03:20 -0400
From: Kent Overstreet <kent.overstreet@...ux.dev>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Kuan-Wei Chiu <visitorckw@...il.com>, colyli@...e.de, 
	msakai@...hat.com, mingo@...hat.com, acme@...nel.org, namhyung@...nel.org, 
	akpm@...ux-foundation.org, bfoster@...hat.com, mark.rutland@....com, 
	alexander.shishkin@...ux.intel.com, jolsa@...nel.org, irogers@...gle.com, adrian.hunter@...el.com, 
	bagasdotme@...il.com, jserv@...s.ncku.edu.tw, linux-bcache@...r.kernel.org, 
	linux-kernel@...r.kernel.org, dm-devel@...ts.linux.dev, linux-bcachefs@...r.kernel.org, 
	linux-perf-users@...r.kernel.org
Subject: Re: [RESEND PATCH v5 11/16] lib min_heap: Update min_heap_push() and
 min_heap_pop() to return bool values

On Wed, May 15, 2024 at 10:37:55AM +0200, Peter Zijlstra wrote:
> On Tue, May 14, 2024 at 04:47:19PM +0800, Kuan-Wei Chiu wrote:
> > Modify the min_heap_push() and min_heap_pop() to return a boolean
> > value. They now return false when the operation fails and true when it
> > succeeds.
> 
> But why ?!

like Kuan said, it makes for cleaner code.

It's also what the bcache/bcachefs heap (and fifo) implementations do,
which we're consolidating.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ