From patchwork Fri Apr 19 16:47:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiju Jose X-Patchwork-Id: 13636607 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32B00C4345F for ; Fri, 19 Apr 2024 16:48:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6F5B86B009D; Fri, 19 Apr 2024 12:47:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 67CBB6B009E; Fri, 19 Apr 2024 12:47:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4CFAD6B009F; Fri, 19 Apr 2024 12:47:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 2739C6B009D for ; Fri, 19 Apr 2024 12:47:53 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id C9D4F41558 for ; Fri, 19 Apr 2024 16:47:52 +0000 (UTC) X-FDA: 82026863184.08.D857CD3 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by imf29.hostedemail.com (Postfix) with ESMTP id 1C30D120003 for ; Fri, 19 Apr 2024 16:47:50 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf29.hostedemail.com: domain of shiju.jose@huawei.com designates 185.176.79.56 as permitted sender) smtp.mailfrom=shiju.jose@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1713545271; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SOofkS9an8esAlIqVCeKxDe8nSRltImo6xWb2Ab6CkY=; b=S8AaSuIm7rgTK7kUAJJQtfkzAXMJifL6vr4m8JBTW6zYAZICnZj+n4OxNrON9jMuIXqFtn rNWA3L5DGt9gZTZYFzp4WPZ9kvvP3k+imv8WoxQ3onQ9WwAxtO1pt0Hxjx9aKbDDVSa2Io Z8lZaWX9E3NIBPPDtmgXMEZmVN7GVYc= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1713545271; a=rsa-sha256; cv=none; b=mPv/Dhsgq07PTtH6ENFvl+RkgAbsHy//i8LBW35lO7v8lBhJZ4Fv7jP4Qkfb1nnMjB1TVS Iklx6V21nvNpXMiMqwU0R+gUayUfYmjQ7HBh2L/SaUMbMLAVSa8TN2R8uBpa1Gg8SsW8wX hq6pRAbNqSryaLgFT9fQotI9krYrSa0= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf29.hostedemail.com: domain of shiju.jose@huawei.com designates 185.176.79.56 as permitted sender) smtp.mailfrom=shiju.jose@huawei.com Received: from mail.maildlp.com (unknown [172.18.186.231]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4VLgWB0pdKz6JBJF; Sat, 20 Apr 2024 00:45:42 +0800 (CST) Received: from lhrpeml500006.china.huawei.com (unknown [7.191.161.198]) by mail.maildlp.com (Postfix) with ESMTPS id 17014140D1D; Sat, 20 Apr 2024 00:47:48 +0800 (CST) Received: from SecurePC30232.china.huawei.com (10.122.247.234) by lhrpeml500006.china.huawei.com (7.191.161.198) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 19 Apr 2024 17:47:46 +0100 From: To: , , , , , , , , , CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [RFC PATCH v8 06/10] ACPICA: Add __free() based cleanup function for acpi_put_table Date: Sat, 20 Apr 2024 00:47:15 +0800 Message-ID: <20240419164720.1765-7-shiju.jose@huawei.com> X-Mailer: git-send-email 2.35.1.windows.2 In-Reply-To: <20240419164720.1765-1-shiju.jose@huawei.com> References: <20240419164720.1765-1-shiju.jose@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.122.247.234] X-ClientProxiedBy: lhrpeml500006.china.huawei.com (7.191.161.198) To lhrpeml500006.china.huawei.com (7.191.161.198) X-Stat-Signature: mouaery1qew9p4aqah8doikoj3wtg9as X-Rspamd-Queue-Id: 1C30D120003 X-Rspamd-Server: rspam06 X-Rspam-User: X-HE-Tag: 1713545270-732147 X-HE-Meta: U2FsdGVkX18BEbbUOD7OQ3uNlh5nHNuhHr3Fk8PsKJ7deWU2NCy/0BWjXlrpzItF1WkQsPNTfKDxAfCDJopJ76kGYnCYewB6yF94jeQRJ3qzQ2MB5RGg1D1NQ+SMU4naaTGueishPVgpxHHoXe2BcYWg/Y3QcOkzleX1I4THUYl3YEw2owi++wXussRzoMmBtUPL5qhws6PadCscwqwXjzHLdr1d5pgljmG9YOMnB6hzKGMwtLwloGmOZToXOJui2KWRtP5+OrlunqQb4QpYwvbJN6RC4In3+tACQ6jJ8G4YvXUnQnTIh5tr10POEo36OuYPamA5mEMcy1uJR39OZEAVlZEb0acJwA0OVexUjRlHEBrvXl7fhR89eCUDNhj9N+laL2e0bm+TAEPGqfPZdzViZdHrouU/Xf2Wt/cOXV4RSMEWrmgvaCYy7IUytl2bwcOtHdqzyeQxU7Yeh+CUMeXlzz8xlvvNiFFQx/Qe3/R2Ue9OSiY4RDMLiBYz60+qgRifrvRQ6LmtxYklECjrpuk33gxBSe19ctlaA7mfj7g6ToLJFOWMtr380LOEEC4lKNNEc5FbtiQ96Fdup2tyV8D4zytXKNgVIkPN5QxLRbKzabZ1z7WMV0aLPcaGPF3+AiSCTa+x/vPHtqqQIeL7pm+958uLShiR4IOGQrEwbDSefh8F+gXE6+i/BsTw1EtqzzkNs1l6QqlSscULKFWsM+4ejyBB9pdYvw3SHUhj00ACT2YW0dHNpoDV4wJ9dPd2ZDfRWQVay9ieEGgs/UnVv76jC5aYNGm+r9xq7TR3dmYZbKyDNpjxPdcWkumMwIcT/kDbE9o2tvaQzfxcSgth7DrfPAw3MQQ72v1LRGLfhpLWV/cJ64iT20UOFtrZC7xqcTTRKVuc23A0dgw0zKA+Iz1OvgNbYuOZsDDF2WENSTgNPFQ1v5oR0agvPXzhQ1U6RJ/2xZu8mbuxO3VKSC2 y4g== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: From: Jonathan Cameron Add __free() based cleanup function for acpi_put_table. Signed-off-by: Jonathan Cameron Signed-off-by: Shiju Jose --- include/acpi/acpixf.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 3d90716f9522..fc64d903a703 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -492,6 +492,8 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status **out_table)) ACPI_EXTERNAL_RETURN_VOID(void acpi_put_table(struct acpi_table_header *table)) +DEFINE_FREE(acpi_put_table, struct acpi_table_header *, if (!IS_ERR_OR_NULL(_T)) acpi_put_table(_T)) + ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_get_table_by_index(u32 table_index, struct acpi_table_header