Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp167884rwb; Thu, 17 Nov 2022 22:54:38 -0800 (PST) X-Google-Smtp-Source: AA0mqf5dYCA5i9Tp7vlHUFuDOpkEGL0/yDWV9FFI300aqmZLml1wIVBW3FohnxVw99ZiYcOjVnV0 X-Received: by 2002:a17:902:edd0:b0:188:bd82:861a with SMTP id q16-20020a170902edd000b00188bd82861amr6223282plk.56.1668754478447; Thu, 17 Nov 2022 22:54:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668754478; cv=none; d=google.com; s=arc-20160816; b=ZK+MB299TQKTd/WupE5OpSIir2VjDiipZowHpfTanFqkoIEw81tWrF9utZSt3GbMY1 IZYKJsxsgGHy8iUawoNI8l1TlcWWYaGeG/75QcCIcsC0rcPEEx1yhphkkkkrIiCgzU6G Fdqqkc92bdRfc4FgVF972z6BkZG/BLsRmOW/lRE7HmeXwDq3fD8Ceejig5ZzQH5W8ms/ tZmWHnuvUbe94oTS8N7AaZ3vwEVlhOU8XO0SZIDnVWYASgV4Brs7ptGTKJOvwsZDyO14 zCx8tDYaZG6A20/m+so4IPK83d6Z07WdjAjFnmZtzA/qVtl+ZJcwT+I+7l7GMV8TlHi7 nsDQ== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ij30-20020a170902ab5e00b00188ec2857dfsi2761532plb.275.2022.11.17.22.54.27; Thu, 17 Nov 2022 22:54:38 -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 + 91 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 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII 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 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 --- 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; } -- 2.25.1