Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1993273lqz; Tue, 2 Apr 2024 04:17:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVfURiGORGgPuGz6BWl4GfZSXyxXU1aZh8xY4AZQf92CcXM4/O0Ku2zLfrKxi55rzX3tlFfPsIL6nrTZ4+aYk+XPmv5wY8jlDX99s/Shw== X-Google-Smtp-Source: AGHT+IFRYFaJk9KpigyXPGS/M/a4kgMxobe3kS7siZXKX8wruag3p0kCUvfn/ZsSI32uUEgkjm82 X-Received: by 2002:a05:622a:40e:b0:432:c50a:3d65 with SMTP id n14-20020a05622a040e00b00432c50a3d65mr14259515qtx.36.1712056661537; Tue, 02 Apr 2024 04:17:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712056661; cv=pass; d=google.com; s=arc-20160816; b=tIvrezDiaWOZPz6UOVKnO2CGuWc8qbpfxSGuuQGYYWd1TDXeMRbl1poErftxWmeape Nizs4Mp2yh7WA/U6iHNXbOlq58Lyl7xtT+i1FdqYu1Er38i81Vfq85ebZCtFAz3nTVUU K8bLg9Pu2IK4JkHooQsBLHNmVjUuvOmXGuGja1RVlN6+3i58r87xEDOkLo4ab56ooDKv pDzlCYh+BDWjIcXYGoKueU7FOmEA9DfV3keqQvVhlJhPq2ldjKOgV8+RmU1+X/bowOud jkcsE2E/lqeEjYdjDf4feFDQuQQpFJvHwUeJGPTcuXL95btZeL82NNmccg5LqUX864+o neyw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=mFAn5q7CQFxXq7JaY+/0V77lsWhz1Tz0icfhEeQZiIA=; fh=DOqQxLwARqn5aRoEl1hRWBrVqtDd/PyHm7JiUiKCPJs=; b=wlG1byBaJ6ZTHyrn4HtEqlOsAkm6HOUrEQTyX7FO/tBpIClmEcux7G/XLMOFthYThc 4/60lF2LwWLhzPQLIFN1xR6niYayCMcKuki/w5G+13i7MDUkiqoznuIpabHRmBJOtMZS 9jNoDzqWnn+FB4ES4J43m4pq4mzQCTm8I6oRE3bOp8q30kG+u9hnIPMMl9+fFAbW4gEf 6KwAVQ1oQKQw7Xnn/n0XW63BHl/KUM/K2ALmRxPex+8qlY/oC/8tmEaVpWhM4Sb8qayB dTkcUp6vGIgcf8hB3t6/W4Gm5naYi/bbRcfoq1/6fT35icLcxCjIdfBSE5IMwlaTF57K ndpQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="xtz5tf/Q"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-127841-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127841-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id s17-20020a05622a179100b00431752db740si11467575qtk.177.2024.04.02.04.17.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 04:17:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-127841-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="xtz5tf/Q"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-127841-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127841-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C281F1C233BE for ; Tue, 2 Apr 2024 11:17:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C978B69945; Tue, 2 Apr 2024 11:17:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="xtz5tf/Q" Received: from mail-yb1-f174.google.com (mail-yb1-f174.google.com [209.85.219.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 42DD665BD1 for ; Tue, 2 Apr 2024 11:17:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712056630; cv=none; b=B4xf+A1RbSYqlkrnIoF/YHaaGfsGy5I8hoqSPGwQI0SRMfcifGHbxxzlZmkEs2PIOGJW0s1VTwgnPATEjfx05ey3LpOcK+EN3bU5067Lqe/uRX+FO+JMVw754R7btPfGZpqOQzwsC+qtFpiBGmO5up6knrclNP8jTx6Q9s+hxaA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712056630; c=relaxed/simple; bh=xYEx1wB0KeFh5dfJ6HSa7rT6aZpOvWbEWZUcFmvpOYM=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=B/jRalVmDuGNrBFIT9bue4ZMiE1lD22eLHoUnt92aU9t5h//20P1yOpIhBp5Y1eZ6cTiQxZcHJLZ2sKirzAJB5qPrst2qW1Ojoc7ctQj4pOr2HG55O0xCjmB8qC1vpnGQIiaWK2/PwQrXlqtG1S6h3yrwlKdvHKjWZ6UYqlxDpE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=xtz5tf/Q; arc=none smtp.client-ip=209.85.219.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-yb1-f174.google.com with SMTP id 3f1490d57ef6-dcc7cdb3a98so4526722276.2 for ; Tue, 02 Apr 2024 04:17:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712056627; x=1712661427; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=mFAn5q7CQFxXq7JaY+/0V77lsWhz1Tz0icfhEeQZiIA=; b=xtz5tf/QsdMLoKnoqx6rUztU2p56/IxKm4kRKm+X4rVcFkrg6e4owC085eK/kYL9kn 1tjX/ujIHU2cSIoDXA+qTG4MG/rMfvW26UTiwox3tRNqJOZ89Rk+y3ptLICVRhzHPQ6x jkQbPlQehDn2Y+KS9/2U1QRPC2pEjlrfZbyjnzhgecb4F638Q1Nyz44id0neiJPxZLI6 qk/2LfRlq7Me3H7TwhUfQHDas1GKcuIiVc0CGuTn2F6ZLc2h41wtu7/tw81J7mVFKcap 3mAT8KO0GKbRQ1WL0Wyuc+RV03yzIC5f0jZ3AuBZT/oyofHnXGfIP5L9Or4GyuZLT078 Xqvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712056627; x=1712661427; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=mFAn5q7CQFxXq7JaY+/0V77lsWhz1Tz0icfhEeQZiIA=; b=ur99Tu6gm+lYhS56SgkS/hsIt8b6iMzLlKWFh0jt37YTatxckKUqP6wnvyD8zoHzts GRGa+5hWMwL+1N02xjHTemAfXzmNI2WTLmjfPu5Evl0QZEpDmpYLo5EmNaPBpoKBEoIK Gsjbnv8Xdil872vB7oQEf1AVNs/DcoM/OKyhIue4DimDVrUgySjqUSa9M53WQ9KJH9I4 WMJSlRF8qwl5nocGQWOxRk8YPAss3CtDkj/ZetWAj08JksqAnGcpk3H8Q5xHYPIGG7PZ ir4SjfHaZUqB3/7o+EWSOPiw2REAeiTnTrmc9SfKBLwsNZaQ+vGxmtx4mt7Eg6sZjepS TnmQ== X-Forwarded-Encrypted: i=1; AJvYcCVGWpKVDvqWjsVtlsVzlflNB8oysUh4GpJZNDZBepsv7YfqXyBrLaD9Dg4h2mXgNE/h32XZ/s2wW2vrArxNBylP5GrsH1aFltN0hq2P X-Gm-Message-State: AOJu0YzFMyfTpOjSryFkO1AxpDF88uLjKN2v/UR2PJmGQFe9HnGBrpEa JKSuMJQCyz0SJ1aELuplPOzlbiF4Mm2vIIQoKJXuv0Hag0V7dD+dxZUBIkf4NPZyXrIeufixXMu v4u5dm0c1HTLk84EBduayp5ln8YvJDdPXXYehT9Dxg6jOtL5s X-Received: by 2002:a25:640c:0:b0:dc6:cbb9:e with SMTP id y12-20020a25640c000000b00dc6cbb9000emr10783156ybb.41.1712056627317; Tue, 02 Apr 2024 04:17:07 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240402103406.3638821-1-quic_varada@quicinc.com> <20240402103406.3638821-4-quic_varada@quicinc.com> In-Reply-To: From: Dmitry Baryshkov Date: Tue, 2 Apr 2024 14:16:56 +0300 Message-ID: Subject: Re: [PATCH v6 3/6] interconnect: icc-clk: Add devm_icc_clk_register To: Varadarajan Narayanan Cc: andersson@kernel.org, konrad.dybcio@linaro.org, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, djakov@kernel.org, quic_anusha@quicinc.com, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Content-Type: text/plain; charset="UTF-8" On Tue, 2 Apr 2024 at 14:02, Varadarajan Narayanan wrote: > > On Tue, Apr 02, 2024 at 01:48:08PM +0300, Dmitry Baryshkov wrote: > > On Tue, 2 Apr 2024 at 13:40, Dmitry Baryshkov > > wrote: > > > > > > On Tue, 2 Apr 2024 at 13:34, Varadarajan Narayanan > > > wrote: > > > > > > > > Wrap icc_clk_register to create devm_icc_clk_register to be > > > > able to release the resources properly. > > > > > > > > Signed-off-by: Varadarajan Narayanan > > > > --- > > > > v5: Introduced devm_icc_clk_register > > > > --- > > > > drivers/interconnect/icc-clk.c | 29 +++++++++++++++++++++++++++++ > > > > include/linux/interconnect-clk.h | 4 ++++ > > > > 2 files changed, 33 insertions(+) > > > > > > Reviewed-by: Dmitry Baryshkov > > > > Wait. Actually, > > > > Unreviewed-by: me > > > > Please return int from devm_icc_clk_register instead of returning the pointer. > > Wouldn't returning int break the general assumption that > devm_foo(), returns the same type as foo(). For example > devm_clk_hw_get_clk and clk_hw_get_clk return struct clk *? Not always. The only reason to return icc_provider was to make it possible to destroy it. With devres-managed function you don't have to do anything. -- With best wishes Dmitry