Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp264308yba; Fri, 3 May 2019 01:07:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqz4MUca+dFUQQMmqbEpC5ILeo9AxIisrD+O0+Lj9E8gYiUdFrJXMbtNqA2foN+4EnVI9Q8q X-Received: by 2002:a17:902:b605:: with SMTP id b5mr8528856pls.206.1556870834955; Fri, 03 May 2019 01:07:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556870834; cv=none; d=google.com; s=arc-20160816; b=sxu+RLWg8DB89UwBGZDqqeRZ2XLQBx0uPYGLsxBZAiFJFIXxo2LqIFjBdCsSkrLmJS kLXVi5wwNWMe5+LMGGiejf9DTwUI2TD1kBTzjAIc0TFrLqreRXCO/GB3oGn65VAPw3nc OvO7wH7WVNBpm23E8GPo3K2/mIasP2pSW5Bjuxou7wITRR82c3cEnYaTYlPpWb7dUOec RiLryIAzXIEz1v5+eY2c4pX1wP4ofLW6SPwE+M+ZDBpK6xjsb6p2DWNzgDqsPlAD8H8t dgWBChvSsn6MuXvgGvKr+QdoOvVZkmCMr/m2mceiyrA0BL3MSdwUMPOdR0QtNoEGgjJV NEIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=TpXqJQI7PVBHDytg+IGA8i8m1/XYj0MrND3X98mgWRU=; b=s7sDc2a248nYRAekTLoBLQvT1KA7aNVWPtb3ACf3+etlzniHt1F/Mc5qgVh3Bw8A9R zoRQ2Gc5ps1gKSt8braicj1vlUL1GtNOxiNrKONntUVQg4JNBaxiaJD8ZzzCGolsaQuL 9FPjjVsb/P4TEnaOvCXkiRRr/ALki86pUM7YRW7mYTks091r0k7sqhJQjwBsYvkzlbb4 teeoTMq9CVvnFi9jULUbBufT5yhNHj7VwidATPVv7CELWQQnWr8UDCOsaxxLzTENpCxj 0zUWJl1CiwTbhH/BbIKiHGIO87S3YsrNu2HVH+D7SbC9YO1IwQRPBTKXEGl13/0swB1b 7IdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KOwMT0Cl; 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 d126si1440561pfc.125.2019.05.03.01.06.59; Fri, 03 May 2019 01:07:14 -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=KOwMT0Cl; 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 S1726463AbfECIEo (ORCPT + 99 others); Fri, 3 May 2019 04:04:44 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:46756 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726085AbfECIEn (ORCPT ); Fri, 3 May 2019 04:04:43 -0400 Received: by mail-wr1-f67.google.com with SMTP id r7so6569504wrr.13 for ; Fri, 03 May 2019 01:04:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=TpXqJQI7PVBHDytg+IGA8i8m1/XYj0MrND3X98mgWRU=; b=KOwMT0Cl9efaAA08+DXGflf+klv1sSVEHKxtGUL+CBB2gxt07xyd+GyRUCCFVKzsBF vKFUzaTq0/DOqlmb39mbYs9iH9RkOcgL/KAAeaSaMlUscaGj/bjbj+P1qApNVwESdscJ g+1LJrqUlO8vcWihy8sZ39L1L6LS1ajt0o5fzIYYJaQhvca+WfuJGXFbdFR2rcym4b4t zBYkf1Llb/Z3r2f2Mqm8DStMLgaZcHBFBYpuH2Uow5/FZOaBijtEgoGFhaFs2w3Lbcsf fUx7d6Qd9AwY90DycZfziK6toE6kMAjg8Mx+cK1CNVyDwdMXuzYcxD1e3vRmAV6UcGSV 1pBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=TpXqJQI7PVBHDytg+IGA8i8m1/XYj0MrND3X98mgWRU=; b=U3vxwseudQwJhE909Lqk4TC3s7u+DfnHiySE2+qHqv3lMYg21xt4VcUAz7psBdG+Pm 4z+a8a/BFOKgfk8+SX7owao1y4hzmDAkhmewJ8zYHWKaPa2jhQg4re3QpskW4D2rnMqo 3j5mSz8s75I7BHJai318w4D2Iy4Qed65DWv532mNG6WToqTuAW+6x25YMs0FDKRf8u3e PbipmuHY49/QIxrY34gm47yIG6fWG3KQWPxq2+R+X8qTVwvY0J5uNXKiyCDXI3j1o2OO jeoEMLP1Ycp964IaK9p70SY+dXAMMjcZDC6lMOhq0aKhRHCciuLARR0Dyb3m8S6QaSdu EJVQ== X-Gm-Message-State: APjAAAWw7M949HUIbFgorfsNBfh63jvAj3Ah6FBRkQaBaSZ0ZTyVB6kw jQ7ICgZl+IcDuiD4e8ZCdeR2+g== X-Received: by 2002:a5d:430f:: with SMTP id h15mr5756534wrq.132.1556870681778; Fri, 03 May 2019 01:04:41 -0700 (PDT) Received: from [192.168.0.41] (223.235.129.77.rev.sfr.net. [77.129.235.223]) by smtp.googlemail.com with ESMTPSA id k1sm1159060wmi.48.2019.05.03.01.04.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 May 2019 01:04:41 -0700 (PDT) Subject: Re: [PATCH 1/6] thermal: Introduce devm_thermal_of_cooling_device_register To: Guenter Roeck , linux-hwmon@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org, linux-pm@vger.kernel.org Cc: Jean Delvare , Joel Stanley , Andrew Jeffery , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Kamil Debski , Bartlomiej Zolnierkiewicz , Zhang Rui , Eduardo Valentin References: <1555617500-10862-1-git-send-email-linux@roeck-us.net> <1555617500-10862-2-git-send-email-linux@roeck-us.net> <20190501164843.GA16333@roeck-us.net> From: Daniel Lezcano Message-ID: Date: Fri, 3 May 2019 10:04:39 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190501164843.GA16333@roeck-us.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/05/2019 18:48, Guenter Roeck wrote: > On Thu, Apr 18, 2019 at 12:58:15PM -0700, Guenter Roeck wrote: >> thermal_of_cooling_device_register() and thermal_cooling_device_register() >> are typically called from driver probe functions, and >> thermal_cooling_device_unregister() is called from remove functions. This >> makes both a perfect candidate for device managed functions. >> >> Introduce devm_thermal_of_cooling_device_register(). This function can >> also be used to replace thermal_cooling_device_register() by passing a NULL >> pointer as device node. The new function requires both struct device * >> and struct device_node * as parameters since the struct device_node * >> parameter is not always identical to dev->of_node. >> >> Don't introduce a device managed remove function since it is not needed >> at this point. >> > > Any feedback / thoughts / comments ? Hi Guenter, I have comments about your patch but I need some time to double check in the current code how the 'of' and 'devm' are implemented. -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog