Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1302887ybb; Sat, 4 Apr 2020 00:34:00 -0700 (PDT) X-Google-Smtp-Source: APiQypKC15aQ0p+cHfOYFf+RnP95XjJM+NsydTJtiFM+eP4iD5TjODQbb1aMo7g8d3KP9X33PdOi X-Received: by 2002:a05:6830:4025:: with SMTP id i5mr10033559ots.203.1585985640505; Sat, 04 Apr 2020 00:34:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585985640; cv=none; d=google.com; s=arc-20160816; b=CEOTggInSDgnqje6GZyzx5F8L/HAtVKLVI/gx/unSug7WfX8VvNrfrJPuZoLYO1Nws rgNxvMn0LjRxA1/dYIzZ8vpUB4EwZqe4da3VTiKJ8NpmoegL4bPla9vK8j1CbFs0vT8V BO8Zz6zIUqRBwy+YqHv6R+7biLFhvVJ+9ebs0pbMhyd2cKhQZh838qKPu2mUj4VaqM3Q 9e1wO/QvL9qo/LL3jVmtjCK5C5vPqA/Eg16P/qqtVrvcB48ZMbmFaZA5uBm+TUMLWcDS Leto5lbx3dW0fb8bLaRcebjPOrO/mD03VHH3g0RuH8ZCUGkoiiLBSAOMwv68BAHw7qGK rwLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=48bgmIC7P0k4WqoMKtIKT6TqPnKQM4JrqDfrBmPfJWE=; b=hRoXFmypQtGvRFJcGTX8MzydA8v+RjSE45Qj13EkW4aSKk5IwlthKM63iyZWS6GmdT p0h4uhOWkdZMnbbONQpviImJT401o7e1avvZMkHa7XdhkEekjFTDJLp9N+jdrsvQ2ARU FJZMhB/TO5tZzAeQUevbqSQolF4pnEd7quBzbI+9rltlgB5sas3VEu1gb2KdT1DIZYYU 0Zok/1b2ame4ph/nsVYurGTA3h94ZpG+Q4+49icKKX4Jbxh6Tu2QO1+TUJXegLMWKxxI iQ7d2iv2TOugwa2Lu4p+PqMvbtrOuM1Sp+fIw3nh62t5Bbp37i3Jvr6HKn0Fd33Dayx+ Eu4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@verdurent-com.20150623.gappssmtp.com header.s=20150623 header.b="Fr1/98+y"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c130si4812481oig.98.2020.04.04.00.33.47; Sat, 04 Apr 2020 00:34:00 -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=@verdurent-com.20150623.gappssmtp.com header.s=20150623 header.b="Fr1/98+y"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726437AbgDDHbo (ORCPT + 99 others); Sat, 4 Apr 2020 03:31:44 -0400 Received: from mail-vs1-f66.google.com ([209.85.217.66]:34852 "EHLO mail-vs1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725872AbgDDHbn (ORCPT ); Sat, 4 Apr 2020 03:31:43 -0400 Received: by mail-vs1-f66.google.com with SMTP id u11so6505095vsg.2 for ; Sat, 04 Apr 2020 00:31:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=verdurent-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=48bgmIC7P0k4WqoMKtIKT6TqPnKQM4JrqDfrBmPfJWE=; b=Fr1/98+ylP6lUUNN0lwT6j0DbCTEZqQvajyZwNhEL46JKpLa9djlu+7gVWNL0ZpF98 QGjmcGzS3gsIz9cimSB93YZAFsENs/jQsu3sm7X3RWchoFLDlL6FqfW5wRFCbUgfXsqr pOgjsqYIivNCC6oyZyK8VbdfpYPkWElbN1fAra8JGznbxVkn4kHmzpeyxlNzymxEz3sp XpCZcslb3XDF25E/1KzFhtHp9dkH0l5axGteq6zYJnvrE2LsephNAUvc1vo+R8gFx3An Gy4xTUunBTdtBSjlKDJCq2Ivho3il+e7Rb9gQFzeD5w3d2SB3+AWah321MKIirLeIYzd ziPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=48bgmIC7P0k4WqoMKtIKT6TqPnKQM4JrqDfrBmPfJWE=; b=cGRi3fCioAim0tr9t/YJeF8Skd9oGqp/eRLIDAeVlFBcoSgSrZsQtdTRzDKDUZmr+t RUY5U67NYaY/lMM1kCp/uUFaPsAnJaj739IPnxZ5FoeSZ0q92dWPJ9A8HHyZ5mgVdiq/ LbWwoVd+ObL/Lfo3kyrccbGdd6C+0KMuiUz5LhgLewsLOdWrpW1nnoQtxGeKfwEYMPhm Dpkgp/Zi1sNJYMUq5bzUTYOV7ocZDNfE4nVPiT92oZq6Pb6n5OSGAA6KnQz9yVes/zwY HHqvQBNCGXMs6IgGravcK70BjxvjOL+tH8uK6uTx4z0kABMlBSg+1UGdga3BJqc7qm6E kLWA== X-Gm-Message-State: AGi0PuZ9MEIk+6D2kqNYOTRX+xYqcBOIRxAi0Qwu1j0DvGnKiZ8WHgXX S18kVRAIIn9MSFTsfry4p9gSNYms3SKPMcQ3fMfB/KiY1XZUTEct X-Received: by 2002:a67:b147:: with SMTP id z7mr9276115vsl.27.1585985502657; Sat, 04 Apr 2020 00:31:42 -0700 (PDT) MIME-Version: 1.0 References: <20200402142747.8307-1-daniel.lezcano@linaro.org> <20200402142747.8307-6-daniel.lezcano@linaro.org> In-Reply-To: <20200402142747.8307-6-daniel.lezcano@linaro.org> From: Amit Kucheria Date: Sat, 4 Apr 2020 13:00:00 +0530 Message-ID: Subject: Re: [PATCH V2 6/9] thermal: Move get_thermal_instance to the internal header To: Daniel Lezcano Cc: Zhang Rui , "open list:THERMAL" , open list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 2, 2020 at 7:58 PM Daniel Lezcano wrote: > > 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 Reviewed-by: Amit Kucheria > --- > drivers/thermal/thermal_core.h | 5 +++++ > include/linux/thermal.h | 6 ------ > 2 files changed, 5 insertions(+), 6 deletions(-) > > diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h > index 5fb2bd9c7034..c95689586e19 100644 > --- a/drivers/thermal/thermal_core.h > +++ b/drivers/thermal/thermal_core.h > @@ -74,6 +74,11 @@ struct thermal_trip { > > int get_tz_trend(struct thermal_zone_device *tz, int trip); > > +struct thermal_instance * > +get_thermal_instance(struct thermal_zone_device *tz, > + struct thermal_cooling_device *cdev, > + 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 8006ba5de855..47e745c5dfca 100644 > --- a/include/linux/thermal.h > +++ b/include/linux/thermal.h > @@ -414,8 +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); > > -struct thermal_instance *get_thermal_instance(struct thermal_zone_device *, > - struct thermal_cooling_device *, int); > void thermal_cdev_update(struct thermal_cooling_device *); > void thermal_notify_framework(struct thermal_zone_device *, int); > #else > @@ -473,10 +471,6 @@ static inline int thermal_zone_get_offset( > struct thermal_zone_device *tz) > { return -ENODEV; } > > -static inline struct thermal_instance * > -get_thermal_instance(struct thermal_zone_device *tz, > - struct thermal_cooling_device *cdev, int trip) > -{ return ERR_PTR(-ENODEV); } > static inline void thermal_cdev_update(struct thermal_cooling_device *cdev) > { } > static inline void thermal_notify_framework(struct thermal_zone_device *tz, > -- > 2.17.1 >