[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <66030ba9d82d6_4a98a2949f@dwillia2-mobl3.amr.corp.intel.com.notmuch>
Date: Tue, 26 Mar 2024 10:53:45 -0700
From: Dan Williams <dan.j.williams@...el.com>
To: Dan Williams <dan.j.williams@...el.com>, <peterz@...radead.org>,
<torvalds@...ux-foundation.org>
CC: Bjorn Helgaas <bhelgaas@...gle.com>, Ira Weiny <ira.weiny@...el.com>,
Jonathan Cameron <jonathan.cameron@...wei.com>, Jesse Brandeburg
<jesse.brandeburg@...el.com>, Ilpo Järvinen
<ilpo.jarvinen@...ux.intel.com>, Lukas Wunner <lukas@...ner.de>, "Jonathan
Corbet" <corbet@....net>, <linux-pci@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <gregkh@...uxfoundation.org>,
<linux-doc@...r.kernel.org>
Subject: Re: [PATCH v2] cleanup: Add usage and style documentation
Dan Williams wrote:
[..]
> diff --git a/include/linux/cleanup.h b/include/linux/cleanup.h
> index c2d09bc4f976..8ef2d91c2cbf 100644
> --- a/include/linux/cleanup.h
> +++ b/include/linux/cleanup.h
> @@ -4,6 +4,157 @@
>
> #include <linux/compiler.h>
>
> +/**
> + * DOC: scope-based cleanup helpers
> + *
> + * The "goto error" pattern is notorious for introducing subtle resource
> + * leaks. It is tedious and error prone to add new resource acquisition
> + * constraints into code paths that already have several unwind
> + * conditions. The "cleanup" helpers enable the compiler to help with
> + * this tedium and can aid in maintaining FILO (first in last out)
Missed this FILO => LIFO conversion per Bjorn.
Powered by blists - more mailing lists