From patchwork Sat Oct 12 06:52:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 176048 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1777828ill; Fri, 11 Oct 2019 23:53:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqzI7m14HirdJIG/bKCYehDO3a+anF3MZR9zOFcJU3Y/B03Szizrm+ogCF/E/ZfEQet49h94 X-Received: by 2002:a05:6402:13d6:: with SMTP id a22mr17435706edx.165.1570863198936; Fri, 11 Oct 2019 23:53:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570863198; cv=none; d=google.com; s=arc-20160816; b=mPrFvqTWMGTk9kkE5nReMQnqeG8PmTdCwc/KOVMTA3n2+CoatF5D9fZnMd40UbpkS8 rl+y1OhDHiSd6QhXt0hVZuiM1N7+9Qqv0nF/Uhj7CIWPZGo7TGMLobgueZ3qJp1/F1Ij YaQfiODUVXmet4jpgIXxpY63+8QdIjvHDseglTn5K0E1jKNe3Owc9sPITsUSwFzM6dPi ZukAHKxA5zgPBMzkgC9l9enLxB0H6HAslT/kv9yodrxrPsC+p6Gy3OFYYiTGdIoSctpD ZVSkv67NFq7x74ZMTNo+w/vKPrkCipW6uYCmqS7KsO7aLN7DmXSGSg2MeqaX/PQK0wX2 jiYw== 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=oJUJQi9oxDEyvIdLCMbq2uvVsNGsqyuKnnHa3VxGyMs=; b=FgVh7tX+8BS/YWRlShktS3g+OdkgifPMzxwwqMwVya/AwB/U+Ez88QoHNL4hApY8FY ABTsuApNzMuLP3QpXZh3ZJ7X9Zg5soXsA1c97AxwEOvfoLnk08fNhbEQgvU0dWAsVCST y8OyGn04AJr4K1aAxshxJq4GpWp60L5BXv1pybs4bCfjGoVYGDNEO8q2pwQZ5QSsxipc FzgeaID43jjONysDiCXWhqmPRC8oN0x07EhmNHouqFGHCDwtXuMYTY73paiWSUCGDIUq yuCz97wmwi16TgBkHBZD+tUwM+gR7pbmdxv+ovGYa2N3i3LvuoVDaoetBgoP8/VzITrl wMJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rru5RL0f; 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 f26si7033787eji.55.2019.10.11.23.53.18; Fri, 11 Oct 2019 23:53:18 -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=rru5RL0f; 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 S1729085AbfJLGxP (ORCPT + 21 others); Sat, 12 Oct 2019 02:53:15 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:38401 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728878AbfJLGxM (ORCPT ); Sat, 12 Oct 2019 02:53:12 -0400 Received: by mail-wm1-f65.google.com with SMTP id 3so12064724wmi.3 for ; Fri, 11 Oct 2019 23:53:10 -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=oJUJQi9oxDEyvIdLCMbq2uvVsNGsqyuKnnHa3VxGyMs=; b=rru5RL0fM2DXupCKMZjiKQnH7iBHl3J3DsZqG5oDOaFs798N28j7GMQLZw/EmiBao/ gt1F3O6LsGkIY+olovxz6Pssclf7fzyN9yGBi+Uvo7x2C4lw6TK82JQRoa6oRK/Elge6 b5sd+3y47Ae4NokPD2QFHEWJ3ttBXxgJLcuFiqyXpPkfXtr+PNuQoYRoEQYDkO1VJWG1 axj15r/FNybiPwx/ombb4umc0lERtlTh9etngpSc7VbvHmcPey6c7VpQp09fSS/V6D7Y VoGmOS3xJjXiDJleeW6dsowLv09ME5fyLgh9/tX9GNXTb59vP9/e9jfcIOrIGEAbn8Uu 9ENg== 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=oJUJQi9oxDEyvIdLCMbq2uvVsNGsqyuKnnHa3VxGyMs=; b=DCP7dIwp5ReOjNpfyi0Vgk04CL3GZ6TAireNesl/a4g2KaQA/a4XHmVg8LFyf6pF/w v0waxVDEVx9i4tTqIJfQW42sdxKi7OD6lyTBei/Tole/RxP34kc9w9G/MVb3Sufg8ocv USwA7j0U1t22plBh6RYJrGFxX7zoDZz9YNZGSTIdppbe84z845RkoHTvnxPzcr0HvWwJ QMaQv8uZODWDQfCQmQgyCHU5CXhFck0+sin9mdrs8PD7C34TAmzq2Xf36UocZOon6VhS oitTSQZ7wSTWu+ssn8eQ2QxZVV2DpGfuIjbveEYQZ6w9927ipfYS836FqC9nzyiqXR47 c61g== X-Gm-Message-State: APjAAAXgHSk8GWQEVk5ItuQ6zHoVkIsODscuxsqzR/3o6hE2pCeIMCvc YUJ4Y52mPd67T+uuRmK3NwYDGPf9C2U= X-Received: by 2002:a1c:444:: with SMTP id 65mr6430067wme.84.1570863190047; Fri, 11 Oct 2019 23:53:10 -0700 (PDT) Received: from mai.imgcgcw.net ([2a01:e34:ed2f:f020:f437:29a8:ed69:7bab]) by smtp.gmail.com with ESMTPSA id z5sm17450497wrs.54.2019.10.11.23.53.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2019 23:53:09 -0700 (PDT) From: Daniel Lezcano To: rui.zhang@intel.com, edubezval@gmail.com Cc: daniel.lezcano@linaro.org, linux-kernel@vger.kernel.org, amit.kucheria@linaro.org Subject: [PATCH 06/11] thermal: Move get_tz_trend to the internal header Date: Sat, 12 Oct 2019 08:52:50 +0200 Message-Id: <20191012065255.23249-6-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191012065255.23249-1-daniel.lezcano@linaro.org> References: <20191012065255.23249-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 in other place 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 its the definition in 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(-) -- 2.17.1 diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h index 301f5603def1..c03a07164ca7 100644 --- a/drivers/thermal/thermal_core.h +++ b/drivers/thermal/thermal_core.h @@ -74,6 +74,8 @@ struct thermal_trip { void thermal_zone_set_trips(struct thermal_zone_device *tz); +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 761d77571533..a87f551d114d 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -415,7 +415,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 *); @@ -474,8 +473,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)