Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp17757ybt; Tue, 30 Jun 2020 13:54:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQc3Aid/obhoXEYG8P1JkCPZJU5SPqiOBkOD2ZV+HmYugpGpT1x7+N2zFAtiYyH4HgmPBm X-Received: by 2002:a05:6402:742:: with SMTP id p2mr6451726edy.135.1593550011125; Tue, 30 Jun 2020 13:46:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593550011; cv=none; d=google.com; s=arc-20160816; b=FzfBephi6fIgX5SwHO99im/eTGers8rkorzfse9qaXYlANGcjesqkbZ8Agqsmq7hze OZlU6DQah9Tax6NkhlsmwpwjKp305PeJWbcyfVHH5RUwM2r62vWj3I5xqzkynffk2wti t0iLRZBC4vE+hYHG59SO7fS9xAUIcFuFs7wISUakGUi4XDHM5ff4uXhn7bAyNFWLQjaw xgt/XaigZEjZOVzkac/ckp+2PkeH+3/fddEENE49FjOTHvQLzRVQ/oS6ZofZYP9o6VNb KLbcdFZLGVgHIIReQ2rI1kaGWyg4y/9aw5I22gcg7C+qDG0RoTd/naBW7GWlhv5dJQ+B lUiA== 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=vFuGFxLjY8MbMo7U24jI5f07679fmJ9gh5uKn5H5mfc=; b=dXxFttcjzrDqASHhI7JMI4FG0N692Y+d2+4waA+hLCxMZSMQbg7Li/1hyFR/8QCnM0 cCHf3xNLNTT0Ek0foiE0rz0nD0OLUSpZxjM5lvbrKghG0qajjhtbmZDtD6DWv605em99 ZIvEMi1Zp31gfNOiVxHpsQvGJb8/e+7aZ/LJCCvB5+sIDp5dw9gR1aVaLrsmwtXLRLZK kGakmoUNOM6oXgNevYu4r0UDDc2xmv2LdzcsSKKOp5JX/CwCf7jOVlLnX7Lfblbdh/OI F5OSkw1Pv4xZpUh0s45L+QRHBURr4sP5F2rX5+JePkG3Kn/IC4udyiTVjryVRzSN+iEH nxAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WrlziTiD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id f10si2318262edr.215.2020.06.30.13.46.28; Tue, 30 Jun 2020 13:46:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WrlziTiD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726562AbgF3SqY (ORCPT + 99 others); Tue, 30 Jun 2020 14:46:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726213AbgF3SqX (ORCPT ); Tue, 30 Jun 2020 14:46:23 -0400 Received: from mail-lf1-x143.google.com (mail-lf1-x143.google.com [IPv6:2a00:1450:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4AFDC061755 for ; Tue, 30 Jun 2020 11:46:22 -0700 (PDT) Received: by mail-lf1-x143.google.com with SMTP id g139so11991878lfd.10 for ; Tue, 30 Jun 2020 11:46:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vFuGFxLjY8MbMo7U24jI5f07679fmJ9gh5uKn5H5mfc=; b=WrlziTiDeexaiFvnx66t1nVCdoYMolZgaOuLsj7EplpI+pSGit3wIf1JizoglqrsY4 qaGF8w9bIsV4V9LvA5f5vxhmTVrKoQ/0OJHe9t2+PT/EutbJPMzH0b9GDY2YfHyRVIJm uOLw5Qrr16/ElSYa7syx4MmOoAq8fMrqyUoG8SNntv/+f67ctqm3adHunkhzrVEPtD+C 1RDDiZak0T9QY0pDEjCai0NpXszVGkg6mIwDuG4IrDhGzQIyyXuLAZEch1RVShDcdt5z kEJoa6cOl6UYxHsEyNCp3h35mW3XxVmTCfnDmdPlsW4YVKjzJ28eDqPbQCa8RVSySyUK XhSw== 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=vFuGFxLjY8MbMo7U24jI5f07679fmJ9gh5uKn5H5mfc=; b=eemQ9BvxAYqxYSX8Z8RJFIGQRlyjPnVbL9WKzyNg2gT8zC4e/D1pJyfMQZISn7QvRY QsDlwX7gquNmD7hksDbqm5IVT4uMATQ7tyKJJa4jKp567sb984Hef7c0l42PjRSAKdaH rOkI8tCHQ+q/W94HjoU0UgBlw9wjf/o7KSvXEF8pva1IOAdMjZJrtXHL0OgRgnsZIdC5 wdHhmwdA8udGlyJdaIamgd+pKn3ymaLJlGjXUSCpPCDjh/T1ExeLUTFsoMpC8FscoFp1 XCHIg+7Lpss0exwN5qz/7b113fpBS57z1xi4arUfhX/WZBME4z8BS/RXl91YEqelGbt5 pZTA== X-Gm-Message-State: AOAM530DY4yw1heLuH+Ej5m+hCAaC4xvxmx9Lr/xUGE/NtuSFMGXrKZo j7MkgB/3MkEl5+vTzkQWtzIlC7YzTiQo/Y5gZiELx7rW X-Received: by 2002:a05:6512:31d5:: with SMTP id j21mr1815560lfe.83.1593542781204; Tue, 30 Jun 2020 11:46:21 -0700 (PDT) MIME-Version: 1.0 References: <20200625144509.17918-1-daniel.lezcano@linaro.org> In-Reply-To: From: Amit Kucheria Date: Wed, 1 Jul 2020 00:16:09 +0530 Message-ID: Subject: Re: [PATCH v2 1/5] thermal: core: Add helpers to browse the cdev, tz and governor list To: Zhang Rui Cc: Daniel Lezcano , Srinivas Pandruvada , Ram Chandrasekar , Linux Kernel Mailing 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, Jun 30, 2020 at 8:40 PM Zhang Rui wrote: > > Hi, Daniel, > > seems that you forgot to cc linux-pm mailing list. > > On Tue, 2020-06-30 at 17:16 +0530, Amit Kucheria wrote: > > On Thu, Jun 25, 2020 at 8:15 PM Daniel Lezcano > > wrote: > > > > > > The cdev, tz and governor list, as well as their respective locks > > > are > > > statically defined in the thermal_core.c file. > > > > > > In order to give a sane access to these list, like browsing all the > > > thermal zones or all the cooling devices, let's define a set of > > > helpers where we pass a callback as a parameter to be called for > > > each > > > thermal entity. > > > > > > We keep the self-encapsulation and ensure the locks are correctly > > > taken when looking at the list. > > > > > > Signed-off-by: Daniel Lezcano > > > --- > > > drivers/thermal/thermal_core.c | 51 > > > ++++++++++++++++++++++++++++++++++ > > > > Is the idea to not use thermal_helpers.c from now on? It fits > > perfectly with a patch I have to merge all its contents to > > thermal_core.c :-) > > I agree these changes should be in thermal_helper.c I was actually serious about killing thermal_helper.c :-) What is the reason for those 5-6 functions to live outside thermal_core.c? Functions in thermal_helper.c are called by governors and drivers, just like the functions in thermal_core.c. I couldn't find a pattern. Regards, Amit