From patchwork Mon Jan 23 15:27:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 47224 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1674723wrn; Mon, 23 Jan 2023 07:41:31 -0800 (PST) X-Google-Smtp-Source: AMrXdXujSVD40nX4wKa8MaVMOFJD/GMKqoglEXAxxl4VEuPZxFf3Wdxt47IHZzflg88r1seplDR3 X-Received: by 2002:a17:907:a056:b0:870:7e7d:97a2 with SMTP id gz22-20020a170907a05600b008707e7d97a2mr26288899ejc.66.1674488491124; Mon, 23 Jan 2023 07:41:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674488491; cv=none; d=google.com; s=arc-20160816; b=EKmZRUfOk9RIGH6ZICeOi7DQ9AuhNKoxHipUsUIGz5fAxWAwVYml00vYe78RaGIJLv uBZ5vwN5kZlaLZYkVQfAhWelufiokluUw3gjLcqJS0vwAGBfiJomEWTXcdE7K4wNAOMn eJf3anYvUAC0mL7uUTXmcu6wsZYaOYBk0iPjhJvZdB1kN5gc2ARui0U6Zg2BUmCGYuEt zNd2hCWNY3r0dESzX22aHeyCEzUIuPGfwfiatojw+1dARNHoyNBmsDNReavU+HhmQ7xc oCEnK42mD4iB1w7xpH7tLReNuZhdJl9Bux+KS07vCY9fPoLc1vyEXoCZcqme7Hqy8KhS OXNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hCSbK/tUS4YMZH0NcLQxGFkztwrDFcL8VnBPGZktFY8=; b=P5LNpQGK/p/j24GD3XpngNPZ3h6B8aOyOIyL4IAMdZSDuoMePKgJNuC7upfIDtOzO2 Wz9WAnFqHgD7kYUB5n8OQ7lV5VV0ZP6I1F0TSVrrXc+UzyiWdtE0wxvDjR9LVQYX73Ko FhkJOea5FIRW8NHM2PROvspLs+F8HwH1EaWu9HPXUmdt99y6lH/clUPn915fofdd9ba9 kEm0w4pF9h6ctAVsqotm0tJSI/FwD5XRUYp3EI0Bp6yO68bMoE8BhCzZCL/dPhXAgkgG Y+Y2+9agba7gOVthSx+RT/eJAHfjMfUjsjPn+rIpMUCJumouyU+tnN0ldFZbWoJLylH9 6PiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uyaRiBmI; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hw9-20020a170907a0c900b008774ec3fe91si21453977ejc.647.2023.01.23.07.41.07; Mon, 23 Jan 2023 07:41:31 -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; dkim=pass header.i=@linaro.org header.s=google header.b=uyaRiBmI; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232251AbjAWP2Z (ORCPT + 99 others); Mon, 23 Jan 2023 10:28:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232168AbjAWP2V (ORCPT ); Mon, 23 Jan 2023 10:28:21 -0500 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A99975247 for ; Mon, 23 Jan 2023 07:28:19 -0800 (PST) Received: by mail-wm1-x330.google.com with SMTP id l8so9308095wms.3 for ; Mon, 23 Jan 2023 07:28:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hCSbK/tUS4YMZH0NcLQxGFkztwrDFcL8VnBPGZktFY8=; b=uyaRiBmICBscn5Hvad+35Hy9+6kvUZMcyuWmCN6ldtS0KNu7c9HY0LDYJ1AwewYgDM kb1h3iTr1di9kumeJgH/g/EPDztoTRFe1XSTlaVGtE2RJPmYA44NTD9n7wMpjq9YDi1Z in66J8z9Iyik0qM/+Om942KRYa9f51CJCwvtgz70+lSy1iLyjriGJ1JtYcub70DLj+eg 7ocU9iGyG7B6EaBa/T08NMVjCJbY1D3xRgceevr58wqeALKg5DC6vNoE7OTT4M3R+fGF kimqAwIxO8upbHfOXwxyy7Y7lr1OOONEItI/YFZiZH67Jr9flZoDYyTbQRhkO5x4hs60 464g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hCSbK/tUS4YMZH0NcLQxGFkztwrDFcL8VnBPGZktFY8=; b=BkzaeQ5cqgOUf8QpMoY+1SQYDoyZL6WjDkNrJTWvQpDvxaBESaFYrG+SGS3+Ua345d ej0zbVqXtoO1qkAxlkOG+09/tJEiHly8k8ZJdwBAkarhjHeCRZJH7Z0fIEevWChV2NXQ t2xBfv5OvHaCPV0kdi3s8ChP5d4O7r89z9btjZ4/U2iej0dCkPZeZDZgiC8qWOVAmiF5 Vq+XictTWYVWZYbjdqBW2nRxeRiqqixeCpUQthZYzjxH2zkyfKBPnI2e/5faWuS353lf vO6u3ZHPB+GO1QiY/wd+CKfGwlslZTC91AOB3OTQx2ME9QnEuaA5r7Rf6WbavOpD//mD 5D4Q== X-Gm-Message-State: AFqh2kpMKzS7fbcF+rW0o1V/zDGwJTBfvGLCUQlwsy1UpA9xglnjlCQ3 cJJgORIYRbWyFpNHoVRS+AC/qg== X-Received: by 2002:a05:600c:510d:b0:3da:f719:50cd with SMTP id o13-20020a05600c510d00b003daf71950cdmr23287652wms.18.1674487697983; Mon, 23 Jan 2023 07:28:17 -0800 (PST) Received: from mai.. (146725694.box.freepro.com. [130.180.211.218]) by smtp.gmail.com with ESMTPSA id t13-20020a1c770d000000b003db1ca20170sm10673096wmi.37.2023.01.23.07.28.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Jan 2023 07:28:17 -0800 (PST) From: Daniel Lezcano To: daniel.lezcano@linaro.org, rui.zhang@intel.com, rafael@kernel.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Amit Kucheria Subject: [PATCH v2 2/3] thermal/core: Remove unneeded ida_destroy() Date: Mon, 23 Jan 2023 16:27:55 +0100 Message-Id: <20230123152756.4031574-3-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230123152756.4031574-1-daniel.lezcano@linaro.org> References: <20230123152756.4031574-1-daniel.lezcano@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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?1755828444124181219?= X-GMAIL-MSGID: =?utf-8?q?1755828444124181219?= As per documentation for the ida_destroy() function: "If the IDA is already empty, there is no need to call this function." The thermal framework is in the init sequence, so the ida was not yet used and consequently it is empty in case of error. There is no need to call ida_destroy(), let's remove the calls. Signed-off-by: Daniel Lezcano Reviewed-by: Zhang Rui --- drivers/thermal/thermal_core.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index fddafcee5e6f..fad0c4a07d16 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -1624,8 +1624,6 @@ static int __init thermal_init(void) unregister_netlink: thermal_netlink_exit(); error: - ida_destroy(&thermal_tz_ida); - ida_destroy(&thermal_cdev_ida); mutex_destroy(&thermal_list_lock); mutex_destroy(&thermal_governor_lock); return result;