Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1793600ybb; Thu, 2 Apr 2020 07:29:53 -0700 (PDT) X-Google-Smtp-Source: APiQypJgU43c1ymuMvvs5i1jOrwHABUJOnqOcXoOikSqnSIvu1j4biB9eG243l4QEvi/fti/zBwI X-Received: by 2002:aca:4b56:: with SMTP id y83mr2493323oia.142.1585837793218; Thu, 02 Apr 2020 07:29:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585837793; cv=none; d=google.com; s=arc-20160816; b=YlFO9kxvhCPBTPct6tGDl3U2XaNr1dLO5FPVc+KUbDVtji3BDVDLibBZelpfH4XHqW FgLDe+yAtwthGxrZmF1PPbLcsEssOaVLqvFf8ybXklckhOmhX5rZ6uKOC3MYdyMCIqII alUOdFlvtMsVp5n25JIFIrl9b1zyE/1lh6M0eCJjT9pbcfmusosPsBQqv4OZbqQeBlBW qst49fMsElBBUpg4F83HGGPI/tgKL97ZK7tbwPKsYpBht7tP89bu8wZLr0VZbj/ovjVI 8zuoswSUOTyuRYyMBILT1SIAg1QBXmbpZbW5CX5fyPKqyHEYVGw6wr/TVb0xO7WY6PEL hu2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=IRbhPZus5ePLwsnnR/FLUI/loMrHCnubDThlTfowdJE=; b=So2AZOTCtCJP/lJyLep5Lm21uVtMViuEr8VAIxOsW6a1O5geBxME+DCx3RGjGdX/my mAA22mIkcaDz2axv3LZx6545R26goH+zpDt3FkepfaqAMJe/d271GrID/L+CGo8nEj35 XSriH0hk+kK3qng2NWsNoLriVGnJh2X/QNMGjR727muMjgNscDv7QCxISFS87YlTt5ZB s2FVkdnKsD6igqj3Sq1QQodtjKqqtk4Q2MQQov0s7J5QkkJV/sORQlNmgUtB19Wfkdfb 6iBzYnhuJEUCXobp3R6AoIuPLTi0BmlqY8pBZSkdh+fpovOABUs46AmvShhcKwf4oFUa wIMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NFl7TC+a; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r70si2426782oor.49.2020.04.02.07.29.40; Thu, 02 Apr 2020 07:29:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NFl7TC+a; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S2388334AbgDBO20 (ORCPT + 99 others); Thu, 2 Apr 2020 10:28:26 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:35673 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387732AbgDBO2J (ORCPT ); Thu, 2 Apr 2020 10:28:09 -0400 Received: by mail-wr1-f67.google.com with SMTP id g3so2159638wrx.2 for ; Thu, 02 Apr 2020 07:28:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=IRbhPZus5ePLwsnnR/FLUI/loMrHCnubDThlTfowdJE=; b=NFl7TC+azwhOe/7urYy+7eOYrC7ACMCVAA9nMMJtjl34LIpAK8x2yxcdQB1fYxkRY4 BP1w3O/jmbITRQ0YFfN7hdI2NC9XQ8XhB25dE8slVVaqmLX0YdNUMg1x9VJ8MeSQmTK6 WSTYM9yr+/rE90fTLsob948PY5WZgmRxYVNx4/VHv6j5BsvtzmwAQDXPlrE8myMrZAxb 8k9I4E8oqw+K94coZFjyhgaA1GWHWSILNk5T24JMnJY//M+eEhqFlJCdL1Bd29wdK481 yQEiboUChPwfiC/rZcl31auKBYhc7skf0kDWvblsflXdbnZUpSTsLMP3aJQqxha5U0vZ vZrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=IRbhPZus5ePLwsnnR/FLUI/loMrHCnubDThlTfowdJE=; b=Eql21b6lhyBgM1Ut9spieP1wEEpzUrUBTA3SnxgvoXUMwgpZ5AzszcFG32GORYAlZt hkH5z3C6wTV4t5cZJR7NNloKzklbtNlaAyrb95aRJPdvaA3S6owLkBwNeet3BZwsXU5K 14kzgsiv08pXBYDxzDkthncyKmHIJB6/jlHTsAcRkKBbUFMvspDHj9rqUZY66K9aqWHE e2U5arfyNJ9eNZRmrkyGmF2FMLlWfJp7m+io/fcuQfQMSnH3lIcL6Ng5RuQfokym/Gcr QETGRbfY/7hymCyuFfCvScQ9yo5WM+6+jiuIuRAhjIl7sRKGxYBVEjkWSB1S1Cp0IKby W+0g== X-Gm-Message-State: AGi0PuYsWqfRHeuOErtJ0CFLYTcUQTQ/mf6L9X+BnXvQoDSah2euQChc cfT5t1SdJ8uUCbzyYB1Fd8lOQw== X-Received: by 2002:adf:e946:: with SMTP id m6mr3944587wrn.187.1585837686998; Thu, 02 Apr 2020 07:28:06 -0700 (PDT) Received: from mai.imgcgcw.net ([2a01:e34:ed2f:f020:4b2:e366:e86f:261a]) by smtp.gmail.com with ESMTPSA id a7sm7045186wmm.34.2020.04.02.07.28.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 07:28:06 -0700 (PDT) From: Daniel Lezcano To: daniel.lezcano@linaro.org, rui.zhang@intel.com Cc: amit.kucheria@verdurent.com, linux-pm@vger.kernel.org (open list:THERMAL), linux-kernel@vger.kernel.org (open list) Subject: [PATCH V2 5/9] thermal: Move get_tz_trend to the internal header Date: Thu, 2 Apr 2020 16:27:43 +0200 Message-Id: <20200402142747.8307-5-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200402142747.8307-1-daniel.lezcano@linaro.org> References: <20200402142747.8307-1-daniel.lezcano@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The function is not used any place other than the thermal directory. It does not make sense to export its definition in the global header as there is no use of it. Move the definition to the internal header and allow better self-encapsulation. Take the opportunity to add the parameter names to make checkpatch happy and remove the pointless stubs. Signed-off-by: Daniel Lezcano --- drivers/thermal/thermal_core.h | 2 ++ include/linux/thermal.h | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h index d37de708c28a..5fb2bd9c7034 100644 --- a/drivers/thermal/thermal_core.h +++ b/drivers/thermal/thermal_core.h @@ -72,6 +72,8 @@ struct thermal_trip { enum thermal_trip_type type; }; +int get_tz_trend(struct thermal_zone_device *tz, int trip); + /* * This structure is used to describe the behavior of * a certain cooling device on a certain trip point diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 7adbfe092281..8006ba5de855 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -414,7 +414,6 @@ int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp); int thermal_zone_get_slope(struct thermal_zone_device *tz); int thermal_zone_get_offset(struct thermal_zone_device *tz); -int get_tz_trend(struct thermal_zone_device *, int); struct thermal_instance *get_thermal_instance(struct thermal_zone_device *, struct thermal_cooling_device *, int); void thermal_cdev_update(struct thermal_cooling_device *); @@ -473,8 +472,7 @@ static inline int thermal_zone_get_slope( static inline int thermal_zone_get_offset( struct thermal_zone_device *tz) { return -ENODEV; } -static inline int get_tz_trend(struct thermal_zone_device *tz, int trip) -{ return -ENODEV; } + static inline struct thermal_instance * get_thermal_instance(struct thermal_zone_device *tz, struct thermal_cooling_device *cdev, int trip) -- 2.17.1