From: Rob Herring <robh@kernel.org>
To: Saravana Kannan <saravanak@google.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Jonathan Cameron <Jonathan.Cameron@huawei.com>
Subject: [PATCH v2 0/3] of: Use __free() based cleanups
Date: Tue, 09 Apr 2024 13:59:38 -0500 [thread overview]
Message-ID: <20240409-dt-cleanup-free-v2-0-5b419a4af38d@kernel.org> (raw)
This small series converts the DT code to use __free() based cleanups
for kfree() and of_node_put(). Using __free() simplifies function exit
handling. Initial support for struct device_node was added in commit
9448e55d032d ("of: Add cleanup.h based auto release via
__free(device_node) markings").
Signed-off-by: Rob Herring <robh@kernel.org>
---
Changes in v2:
- Also use cleanup for 'dev' in __of_translate_address()
- Further simplify of_dma_is_coherent() and of_mmio_is_nonposted()
- Link to v1: https://lore.kernel.org/r/20240404-dt-cleanup-free-v1-0-c60e6cba8da9@kernel.org
---
Rob Herring (3):
of: Add a helper to free property struct
of: Use scope based kfree() cleanups
of: Use scope based of_node_put() cleanups
drivers/of/address.c | 113 +++++++++++++++++-------------------------------
drivers/of/base.c | 34 ++++-----------
drivers/of/dynamic.c | 37 +++++++---------
drivers/of/of_private.h | 1 +
drivers/of/overlay.c | 11 ++---
drivers/of/property.c | 22 +++-------
drivers/of/resolver.c | 35 ++++++---------
drivers/of/unittest.c | 12 ++---
8 files changed, 90 insertions(+), 175 deletions(-)
---
base-commit: 4cece764965020c22cff7665b18a012006359095
change-id: 20240404-dt-cleanup-free-6d5334b4b368
Best regards,
--
Rob Herring <robh@kernel.org>
next reply other threads:[~2024-04-09 18:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-09 18:59 Rob Herring [this message]
2024-04-09 18:59 ` [PATCH v2 1/3] of: Add a helper to free property struct Rob Herring
2024-04-09 18:59 ` [PATCH v2 2/3] of: Use scope based kfree() cleanups Rob Herring
2024-04-09 18:59 ` [PATCH v2 3/3] of: Use scope based of_node_put() cleanups Rob Herring
2024-04-14 16:55 ` Jonathan Cameron
2024-04-14 17:11 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240409-dt-cleanup-free-v2-0-5b419a4af38d@kernel.org \
--to=robh@kernel.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=saravanak@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).