Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2791652rda; Wed, 25 Oct 2023 12:22:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFYBEqwERGYYHmwLwMIuac8EnmuDdCFWrlIu6YGLi74u3PXiczt0ZBYE4Pb+HfsXDnQF7PZ X-Received: by 2002:a05:6808:1803:b0:3ad:fdfb:d384 with SMTP id bh3-20020a056808180300b003adfdfbd384mr20328098oib.53.1698261744244; Wed, 25 Oct 2023 12:22:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698261744; cv=none; d=google.com; s=arc-20160816; b=tRht5afULXYQe6tLfEJyX335o6jKfLKm5WwOBBb3pXIt2X4XYaYbVbkDjVxuR1CRXW 9JBvso3Mh9d1eCMKe+oKbLXV9FBX2LVkL6rbzNcCdSZ9bjOET0ujuFagOxTv28+j5iLl y8/W4trkTggNbK6jhiu55OgIWnBXQMc5ZAr2xyWGXlZmE3AdSkIZYLbjiUXh2Z7TawdX 7nvlmUFF5mPmpH2NgD4nI9KgqWj/RfWxFv+0UiCS6/RJqMKP0Hs7vrcMGRCcYLT5YSgi n4tQ3osgoEy1TylxRghreFXvmG7rWwY2dK3rv7XtibPDsSr+WRIORvpblUiQSR/RLcLp y4xA== 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; bh=PhLzl5M7a07SmisOuE7GwCDt+1m6e5j4VQ0cP165jHU=; fh=8IgpUQ2T6XGOjA/qDosxdUSIIBz0a6nQ23NA8pgv1Tg=; b=lk8JmB6MIP+yxuZQf6bAEffOW7PSlzad8Po86VWOO87rM/VvOTy43UM1RExlT4Ytbg VxeV/uBsQjS2uH8Wo5a5wGWOTE67ubqxlRAx3/7iQG1LR9XXNkOPXXPaUjGTgnk8mvtJ Jbj29R3H60GM2hbfhUjqnr4u6Hd02UO8kIDrbo4/wrdclwCnAARfSHDFwIXi19fRpaFM /30R5onbE2sPUzGd81Bgk9BAz2eICgBlSiDW9DKGyQeflPz2vQHZB/3Skif8mPB7e/4g s7yFsDib3v0x7XqmwwqP7JothOFMS6mauSBETfOxeBysjhgrXHSikMpPGL0qG+reqWHP 1hAQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id z37-20020a25ada5000000b00d865a8a8297si11114094ybi.74.2023.10.25.12.22.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 12:22:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 0D26B8153E41; Wed, 25 Oct 2023 12:22:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233766AbjJYTV5 (ORCPT + 99 others); Wed, 25 Oct 2023 15:21:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232076AbjJYTVu (ORCPT ); Wed, 25 Oct 2023 15:21:50 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 55750181; Wed, 25 Oct 2023 12:21:48 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C77EA1474; Wed, 25 Oct 2023 12:22:29 -0700 (PDT) Received: from e129166.arm.com (unknown [10.57.81.88]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id E62753F738; Wed, 25 Oct 2023 12:21:46 -0700 (PDT) From: Lukasz Luba To: linux-kernel@vger.kernel.org, daniel.lezcano@linaro.org, rafael@kernel.org Cc: linux-pm@vger.kernel.org, rui.zhang@intel.com, lukasz.luba@arm.com Subject: [PATCH 5/7] thermal: gov_power_allocator: Use shorter variable when possible Date: Wed, 25 Oct 2023 20:22:23 +0100 Message-Id: <20231025192225.468228-6-lukasz.luba@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231025192225.468228-1-lukasz.luba@arm.com> References: <20231025192225.468228-1-lukasz.luba@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 25 Oct 2023 12:22:19 -0700 (PDT) The 'cdev' pointer is initialed, so there is no need to use 'instance->cdev'. This change is not expected to alter the general functionality. Signed-off-by: Lukasz Luba --- drivers/thermal/gov_power_allocator.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/gov_power_allocator.c b/drivers/thermal/gov_power_allocator.c index 79621b42ead38..0f7f8278eacc5 100644 --- a/drivers/thermal/gov_power_allocator.c +++ b/drivers/thermal/gov_power_allocator.c @@ -560,7 +560,7 @@ static void allow_maximum_power(struct thermal_zone_device *tz, bool update) continue; instance->target = 0; - mutex_lock(&instance->cdev->lock); + mutex_lock(&cdev->lock); /* * Call for updating the cooling devices local stats and avoid * periods of dozen of seconds when those have not been @@ -569,9 +569,9 @@ static void allow_maximum_power(struct thermal_zone_device *tz, bool update) cdev->ops->get_requested_power(cdev, &req_power); if (update) - __thermal_cdev_update(instance->cdev); + __thermal_cdev_update(cdev); - mutex_unlock(&instance->cdev->lock); + mutex_unlock(&cdev->lock); } } -- 2.25.1