Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp367146ybb; Wed, 1 Apr 2020 01:22:52 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvu9TVDXwoOeFgGFmdfN2C1/OuGSiWNFTUWCt9gafvPDfeSjlTzg9JEFTRz0v0r+xGhfr3e X-Received: by 2002:a9d:6d09:: with SMTP id o9mr6383287otp.34.1585729372496; Wed, 01 Apr 2020 01:22:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585729372; cv=none; d=google.com; s=arc-20160816; b=X/Dd/l2p1v51u8H00A3xkbLK20dbHqH1DW32D9LbwzYfXB9PUXpzFGg3YhGDqKpA9T hsQzFLl43P30e5s2zs6PrR9aSHkGR9shthIMwVEX3zQSvplZSAuQZtEISOzifuSDsVny ZgqPAUTONDEOzrqURgsOCW0W5DywbFsc8s77p/rfHKKiAAcTuads34NXkeTjf/s9iDt6 8k/fzf48lPbrJjyAREzFJ2DDwrXswwq7k46DZpojwYPVlzHlxO5BXpU0TTlZZs4ohRdA uzPL4A4kSLd51FjrpFF7+iBFv5bXqLczlopNbZGup4ZhCqdA/hnY6gG3rcJtozfDwr1S qtgw== 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=TMiys8vgh/zVs+g/WqcrVmGnSmA9w/d7OqJQQ7up1M4=; b=SLRcd+rnnMIQ+5AhTyy3ZpPnEbAq6f0QXWQdxZThZpw3xitWl7v92Cyxzx+9/nBzxt nP/4932e4HyPQlOJa7OSizHXcrQIndUI4WbdoBFfFpsyLBjLoHsdyxJAWhHFWRqcluv7 dwKL1AOyIEO5CLhCd1uMYaHoq4rYubW8/i/2uKxtzCRWsRddmkUKhreE2G9JVDsN6xj/ ofaBWashdcT9TWYp/tWoJXicafkjPryI293zWF2mFbYawvzAcmj+vqelhwKKFAAGEwPF LWUwNsFRRPchDBHfZbAp5xA85NzsJ4DeH7UlbT3aBpZaXeHcySGbExFLS6oJRrTVosq9 7Adg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@verdurent-com.20150623.gappssmtp.com header.s=20150623 header.b=nOcgW+vJ; 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 s27si532216otg.229.2020.04.01.01.22.40; Wed, 01 Apr 2020 01:22:52 -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=nOcgW+vJ; 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 S1732089AbgDAIVd (ORCPT + 99 others); Wed, 1 Apr 2020 04:21:33 -0400 Received: from mail-vs1-f68.google.com ([209.85.217.68]:35074 "EHLO mail-vs1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729703AbgDAIVd (ORCPT ); Wed, 1 Apr 2020 04:21:33 -0400 Received: by mail-vs1-f68.google.com with SMTP id u11so15345560vsg.2 for ; Wed, 01 Apr 2020 01:21:32 -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=TMiys8vgh/zVs+g/WqcrVmGnSmA9w/d7OqJQQ7up1M4=; b=nOcgW+vJIDaeDBEdtqPJ13SjXnUQ8tvB/zXLpC8eEDmJa1qx0uTZpc4I94TQiNjE9T msVtL4CTE33K//fw+xBNn9GaFPpRVLqyj5PGNxcqEoozzzRecgBLsoLIzAt/5NSW01AE Ynl8VeIjsvYaiV6k4IVQfovLO0c12hxq3kZ41k3nh4TKrIk6ubCen/TswPapWoaThDNB 9A40s6iX1mVNOTpDe99mHNmQWlLJ2JxmLsTGu/yT5GmlhdDZoMZyZkyiPOJJq5FGqIcO ti5blWz6lQahfcXM/qyBmUasrIWl9sVGvCfjPhfLX4CFLf8PQa13p+ye9/v/eTpjxdgF Q1/Q== 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=TMiys8vgh/zVs+g/WqcrVmGnSmA9w/d7OqJQQ7up1M4=; b=KxQbxrrDY8bWbfRdHrI0n0MC2MWwPI3jMUAQ9ZV4kYMVXRUUDbgfvwE56e19lMqclU rZKun/1CHuOhzD47lRUufLIywjHpIwLKQCqihS1z9cIpF6GVKjJW1FuKBCLvaVQNRgGd O5+9fRzfnwETlmQ+bMuHUPti6jGTQIWHTyxSAzcUEvkS7Xqj8QSPQt3QWGNCRpsWROGj UynqtVXGXty+8FK1VK/33OEhL6EzP8UXwga34rPaqfpcsdmAZSvj5s9ExuRJbuc5WEoj ig8Cx+nhtRGSCQ/V+NjRqgz/ezE06Bn23Fj13xs6+XmcU/FZvBvpYgryDKekUmsNuWu/ CuoQ== X-Gm-Message-State: AGi0PuaeBTo7niRrjlstFmPTXUgJR0cOTNA0pmL05iPr5tW6M7MMm/gm akg1YXRvEAaKoaokg6aMgjLzxQ8wZJlTOsegXgQFpQ== X-Received: by 2002:a67:69d5:: with SMTP id e204mr14355392vsc.159.1585729291733; Wed, 01 Apr 2020 01:21:31 -0700 (PDT) MIME-Version: 1.0 References: <20200331165449.30355-1-daniel.lezcano@linaro.org> In-Reply-To: <20200331165449.30355-1-daniel.lezcano@linaro.org> From: Amit Kucheria Date: Wed, 1 Apr 2020 13:51:20 +0530 Message-ID: Subject: Re: [PATCH 1/2] thermal: core: Make thermal_zone_set_trips private 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 Tue, Mar 31, 2020 at 10:26 PM Daniel Lezcano wrote: > > The function thermal_zone_set_trips() is used by the thermal core code > in order to update the next trip points, there are no other users. > > Move the function definition in the thermal_core.h, remove the > EXPORT_SYMBOL_GPL and document the function. > > Signed-off-by: Daniel Lezcano Reviewed-by: Amit Kucheria > --- > drivers/thermal/thermal_core.h | 3 +++ > drivers/thermal/thermal_helpers.c | 13 ++++++++++++- > include/linux/thermal.h | 3 --- > 3 files changed, 15 insertions(+), 4 deletions(-) > > diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h > index a9bf00e91d64..37cd4e2bead2 100644 > --- a/drivers/thermal/thermal_core.h > +++ b/drivers/thermal/thermal_core.h > @@ -69,6 +69,9 @@ void thermal_zone_device_unbind_exception(struct thermal_zone_device *, > int thermal_zone_device_set_policy(struct thermal_zone_device *, char *); > int thermal_build_list_of_policies(char *buf); > > +/* Helpers */ > +void thermal_zone_set_trips(struct thermal_zone_device *tz); > + > /* sysfs I/F */ > int thermal_zone_create_device_groups(struct thermal_zone_device *, int); > void thermal_zone_destroy_device_groups(struct thermal_zone_device *); > diff --git a/drivers/thermal/thermal_helpers.c b/drivers/thermal/thermal_helpers.c > index 2ba756af76b7..59eaf2d0fdb3 100644 > --- a/drivers/thermal/thermal_helpers.c > +++ b/drivers/thermal/thermal_helpers.c > @@ -113,6 +113,18 @@ int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp) > } > EXPORT_SYMBOL_GPL(thermal_zone_get_temp); > > +/** > + * thermal_zone_set_trips - Computes the next trip points for the driver > + * @tz: a pointer to a thermal zone device structure > + * > + * The function computes the next temperature boundaries by browsing > + * the trip points. The result is the closer low and high trip points > + * to the current temperature. These values are passed to the backend > + * driver to let it set its own notification mechanism (usually an > + * interrupt). > + * > + * It does not return a value > + */ > void thermal_zone_set_trips(struct thermal_zone_device *tz) > { > int low = -INT_MAX; > @@ -161,7 +173,6 @@ void thermal_zone_set_trips(struct thermal_zone_device *tz) > exit: > mutex_unlock(&tz->lock); > } > -EXPORT_SYMBOL_GPL(thermal_zone_set_trips); > > void thermal_cdev_update(struct thermal_cooling_device *cdev) > { > diff --git a/include/linux/thermal.h b/include/linux/thermal.h > index c91b1e344d56..448841ab0dca 100644 > --- a/include/linux/thermal.h > +++ b/include/linux/thermal.h > @@ -439,7 +439,6 @@ int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int, > struct thermal_cooling_device *); > void thermal_zone_device_update(struct thermal_zone_device *, > enum thermal_notify_event); > -void thermal_zone_set_trips(struct thermal_zone_device *); > > struct thermal_cooling_device *thermal_cooling_device_register(const char *, > void *, const struct thermal_cooling_device_ops *); > @@ -497,8 +496,6 @@ static inline int thermal_zone_unbind_cooling_device( > static inline void thermal_zone_device_update(struct thermal_zone_device *tz, > enum thermal_notify_event event) > { } > -static inline void thermal_zone_set_trips(struct thermal_zone_device *tz) > -{ } > static inline struct thermal_cooling_device * > thermal_cooling_device_register(char *type, void *devdata, > const struct thermal_cooling_device_ops *ops) > -- > 2.17.1 >