From patchwork Fri Nov 18 06:32:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wangshaobo (bobo)" X-Patchwork-Id: 22120 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp28965wrr; Thu, 17 Nov 2022 22:38:01 -0800 (PST) X-Google-Smtp-Source: AA0mqf6Rx6L5rjJ9izfd4XZEMrmR/usQhz+D04QE0kLAnmqBx77ymFAkz4vuK9WQ9zYkX42h68bU X-Received: by 2002:a17:906:4684:b0:7ad:a2ef:c62 with SMTP id a4-20020a170906468400b007ada2ef0c62mr4879570ejr.126.1668753481314; Thu, 17 Nov 2022 22:38:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668753481; cv=none; d=google.com; s=arc-20160816; b=qg/84gC2AHdSvHbRThxXQsaiv3b9HhiqjJRDBaxrhzQdKGyjUGEZGjjOT5IhcT1ylO FE1/NfD20T95B7W1k9++SutXjEJUkSTEWYXR/45bJWqRDgGmkSWdE/vF0gIRAWbjy3H9 BmENerxakjVNo+YgSvy+wc1DrYSPogw0exPYFwz0sxb2KHlKE6hFy4dn7EoUmlXMffYo Y4YfGqOI4GPWSH0DMrAA8g8SW7IcHtX3iL6sHEpY0OTD1uILhlTX0kmuYjOD9GHKelxT XWhWR+CEOUsE5zAhK6YFD9sGldd7DSO4v3jkQkP8h+mdss3ae766X9N73m/XGenJuu69 gA+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from; bh=8gbgupm0A6qCGZunsm2jflgTALygpL4rFmhyMyq0uhw=; b=i9EKoghjrt1/qXMjjPyNBj0N7awTWO1/IXalyT8PnB50vvgwtTO9O4VDEDsuCFT4Or zNtJS462no3329M7y6lsUEsE6/yShx53/MGpCpv04E7LGO+QjJUuFJ+TdwLxpOot3QVC 62yLC5jECSR00yNYsxQqyyCQBu4YpBuB3OFaGWe6qT6fpa1gNcJAYLdSsEJEFfVElAGl dswzG7qwPvDbLx6qQWPaxS6vgguwJ+vb7ttxs8BZkKlAE/CNz8ANs0ZJatU8/C2hwJC+ Bs9YPY3EFu8dJFoxHIIM07uo5GWt1NPHm83hCT/jkba2sKLKZ06vg9I+O6Go2njhqF1F E7lw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n10-20020a05640205ca00b004680dcb8900si2856310edx.213.2022.11.17.22.37.37; Thu, 17 Nov 2022 22:38:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241060AbiKRGeG (ORCPT + 99 others); Fri, 18 Nov 2022 01:34:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240866AbiKRGd6 (ORCPT ); Fri, 18 Nov 2022 01:33:58 -0500 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70D356455C; Thu, 17 Nov 2022 22:33:57 -0800 (PST) Received: from dggpemm500022.china.huawei.com (unknown [172.30.72.53]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4ND6Nh665nzJnpd; Fri, 18 Nov 2022 14:30:44 +0800 (CST) Received: from dggpemm500015.china.huawei.com (7.185.36.181) by dggpemm500022.china.huawei.com (7.185.36.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 18 Nov 2022 14:33:53 +0800 Received: from huawei.com (10.175.103.91) by dggpemm500015.china.huawei.com (7.185.36.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 18 Nov 2022 14:33:53 +0800 From: Wang ShaoBo CC: , , , , , , , Subject: [PATCH 1/2] ACPI: pfr_telemetry: use ACPI_FREE() to free acpi_object Date: Fri, 18 Nov 2022 14:32:18 +0800 Message-ID: <20221118063219.2612473-2-bobo.shaobowang@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221118063219.2612473-1-bobo.shaobowang@huawei.com> References: <20221118063219.2612473-1-bobo.shaobowang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.103.91] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm500015.china.huawei.com (7.185.36.181) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749814850509744791?= X-GMAIL-MSGID: =?utf-8?q?1749814850509744791?= acpi_evaluate_dsm_typed()/acpi_evaluate_dsm() should be coupled with ACPI_FREE() to free the ACPI memory, because we need to track the allocation of acpi_object when ACPI_DBG_TRACK_ALLOCATIONS enabled, so use ACPI_FREE() instead of kfree(). Fixes: b0013e037a8b ("ACPI: Introduce Platform Firmware Runtime Telemetry driver") Signed-off-by: Wang ShaoBo Reviewed-by: Chen Yu --- drivers/acpi/pfr_telemetry.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/pfr_telemetry.c b/drivers/acpi/pfr_telemetry.c index 9abf350bd7a5..27fb6cdad75f 100644 --- a/drivers/acpi/pfr_telemetry.c +++ b/drivers/acpi/pfr_telemetry.c @@ -144,7 +144,7 @@ static int get_pfrt_log_data_info(struct pfrt_log_data_info *data_info, ret = 0; free_acpi_buffer: - kfree(out_obj); + ACPI_FREE(out_obj); return ret; } @@ -180,7 +180,7 @@ static int set_pfrt_log_level(int level, struct pfrt_log_device *pfrt_log_dev) ret = -EBUSY; } - kfree(out_obj); + ACPI_FREE(out_obj); return ret; } @@ -218,7 +218,7 @@ static int get_pfrt_log_level(struct pfrt_log_device *pfrt_log_dev) ret = obj->integer.value; free_acpi_buffer: - kfree(out_obj); + ACPI_FREE(out_obj); return ret; }