Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2312318lqo; Mon, 20 May 2024 01:35:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVZuEggZRNOlky/zKsHIYPfryVYYZP1SfEUaEvznBvL6JdXTggj6XBdjr1gExeLy/jbMc6Wk4pkf+di7Vlun1/IKTv0MyiQadO+gAbX2w== X-Google-Smtp-Source: AGHT+IFro6Rdbo62tOBCI+4mCz1ZkIPLxhSd/5JYP2pKpvjS0axowq0y8yLYCkrtZ3jlI2ZB7nVI X-Received: by 2002:a17:906:329b:b0:a5a:896e:d0b4 with SMTP id a640c23a62f3a-a5a896ed17fmr1064923866b.26.1716194136763; Mon, 20 May 2024 01:35:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716194136; cv=pass; d=google.com; s=arc-20160816; b=OrXL3BDYuRvQrCA1TwGhKWqQkkds4WjwKeq+ak3OdslOiR9DOMQExOUikz9dtd8pnl 5/+GWXTD4vALrqImV4rrNfBVoVw/PaBLdMRIBoYASOM97mHwBJgdaKigR46OKb2WsKw0 0QmXcDDclqywy8f/DZPq2MoAEtgQdyTRKX7ph6qM7JWMOHoG4s1Z7v+mZvTB5sWTqQ8p gZjI6QT9xzHfeLMRemSopMC79soj67kcbNs1hjYffaPZpYli1ejqWVHS9UebNvjoDv8S sdlFtw5Kgjgc1FOYvq+vun/bDXpsQX44ZOSgGa7dqil3o+PeBjLSLIH6lo0ypv6AJraC 0Upg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=UIsBb+eRFu3c1CtI64mjHrwU2c/P6ra4rdQLN4GGHw4=; fh=HTi3h9W9eHUAR0mJydMgFct+57NERWvc3453tJD7kpE=; b=H1Fr5LB7h4zdH9Cxj3M8MQm207dU12c0UfFUXms9tUHU5Go7u4CP9tYMMMMpdUGH6n kVHCI7BJSONcjep+v1re9h/c02VcsaWgFVMEKVSfJw4pA/suY/+F6bB5PHjdCBgI4qFB gzSKyn8h+99D6JzdylcggTlahovNgJD+kafR8eEBOiIGlr0M6a7yfH8uzmw8M1qsUa9l e0NJJizGikRuTByXabgOYdCzaCV9C2I9VX78zrQzEQttgDgrI0a6SC8UMn02C5Otug1S t8CmpjO4GFr0nBLKYVtYTcG16GEz/52oTdnJw8HwIdV+bGbLVapkLnpjWAytZ7g0WIL3 i19w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=v2Hig+8O; 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-183500-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183500-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17b21d05si1245640966b.344.2024.05.20.01.35.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 01:35:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-183500-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=v2Hig+8O; 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-183500-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183500-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 4F7F21F2162B for ; Mon, 20 May 2024 08:35:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5C2651CA81; Mon, 20 May 2024 08:35:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="v2Hig+8O" Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.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 82BF21BC41 for ; Mon, 20 May 2024 08:35:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716194127; cv=none; b=XhuvMUQmnTOZx5Chl2WhghyzHsJi0C/+Ykw44oPg4J9d48ZqrFU7n4VckQEgi9BSaJW+qfm53YTSaUebuXe/ut6po9MrxxxiCnWUnr2COZhUvdLT25iDs/tvX/N2Hc/reY2Sig+oTKl3Oj+hQaCQvcGKnvbj0vD0lvU9KOHTwMQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716194127; c=relaxed/simple; bh=pGR1qWiXTUPecq4OqlA1IrsQxJzyWJZMvAO0kM1kkyw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DqBWqrWfBfXMKKv8EespuRXswfv18hCJCKB2fC+JFKKHoVBvzCOyNuYiYToYTgrILTRxEwiV9Nmd2aDQizn1pwg2zdB3tf3BR8EX+lNiRFLMiGH4GMExv2+e0mCGkgja/9TDW9ukOt2WEKu/pHLp/nIY/GisLihHPgePdNLy/MI= 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=v2Hig+8O; arc=none smtp.client-ip=209.85.214.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-pl1-f174.google.com with SMTP id d9443c01a7336-1eeb1a4c10aso67193315ad.3 for ; Mon, 20 May 2024 01:35:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716194125; x=1716798925; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=UIsBb+eRFu3c1CtI64mjHrwU2c/P6ra4rdQLN4GGHw4=; b=v2Hig+8Oka3aTkFb8CQk+n7ZPFyUzqPxAcAT4qppXy97L0MC36LLM43wVreQkNKIF3 3+6STW1i2j5D6cOjObZ8MJ7DF8S06TNBGyEL6D6Mw7arjeJQGITTLdNtyBj9TG498QVl iZ4iWiNda7MCeRo4RsDNfaOxJmKlaD/LbIR3MMjUyAcwu/idP7Zuu+MPm/VUT2pfwsn+ A9FRPsn3FlZYaeXNMiGvyo9RTL94BiQeMm44hdrKUBiaDpmS6WZVodb4NEL5wTZ4c/1x Nk1NMeuUFr3Ixgq57WAH8ocEUpveULOgUUi1EDtu2YIDNyU4JjKKoCW71tCyNsyTwYAZ dUmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716194125; x=1716798925; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=UIsBb+eRFu3c1CtI64mjHrwU2c/P6ra4rdQLN4GGHw4=; b=RmaxA7U0nSjitfVZ3a+V0fpqnlrBgeUr2qeTE6uQoigBrpcChbcTZY1uRuvHYXOYY1 425v+ZWcPLBgvOarP26AJWEuWQXsdVIdG7uuzoNz92OW0az4FEgeM/6SwIWS8j346m5x ptFJLshm1IolstOcVdIhfbShzP1hCvWvDrGrk7Yw7V4dknAC7hLC55hSQQnrNf7l3jq5 PP78maRL5ay83j3DHsyqtGSYYY9IcETMUdcm6Y0mrkjCk73TVnkRyctZtnnOS2NoHqlx PNCW2ktLeg3/A1U1H8Wfw6759uF4SsWB5ez3igQjhBbkMPCfzOuGu0SHsHYq9TbEVm3d xReA== X-Forwarded-Encrypted: i=1; AJvYcCWhh2AJp8ixI1015IutmXxyxsaB3NvsaSQ/V1J21kkvYQpAl7husH+FMX0ZZPocRHRHyw8N/vJizZ3oFBGOHoWLR9uz0GLv6Joyt15U X-Gm-Message-State: AOJu0YySJgSpKYZqVmspDXWROgBa6zgPJ26UYMVRqpe3tUHrDkJK8bN+ e6CrYZ+TBHWH6qTg56v9aURuJVyjafo24sozDDOccpGMYOh5OdhPwqwaBZqpesI= X-Received: by 2002:a05:6a20:c89c:b0:1af:fff4:6000 with SMTP id adf61e73a8af0-1affff460acmr23706598637.20.1716194124766; Mon, 20 May 2024 01:35:24 -0700 (PDT) Received: from localhost ([122.172.82.13]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1ef0c13692asm198417105ad.252.2024.05.20.01.35.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 01:35:24 -0700 (PDT) Date: Mon, 20 May 2024 14:05:22 +0530 From: Viresh Kumar To: Andre Przywara Cc: Javier Carrasco , Yangtao Li , "Rafael J. Wysocki" , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Jonathan Cameron , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] cpufreq: sun50i: replace of_node_put() with automatic cleanup handler Message-ID: <20240520083522.vvga3aqjg4w3adkj@vireshk-i7> References: <20240503-sun50i-cpufreq-nvmem-cleanup-v1-0-0a2352cac46b@gmail.com> <20240503-sun50i-cpufreq-nvmem-cleanup-v1-2-0a2352cac46b@gmail.com> <20240510184213.68f92cab@donnerap.manchester.arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240510184213.68f92cab@donnerap.manchester.arm.com> On 10-05-24, 18:42, Andre Przywara wrote: > On Fri, 03 May 2024 19:52:33 +0200 > Javier Carrasco wrote: > > Signed-off-by: Javier Carrasco > > Reviewed-by: Andre Przywara > > I haven't tested the error paths yet, but it certainly boots fine on an > OrangePi Zero3. > > > --- > > drivers/cpufreq/sun50i-cpufreq-nvmem.c | 25 ++++++++----------------- > > 1 file changed, 8 insertions(+), 17 deletions(-) > > > > diff --git a/drivers/cpufreq/sun50i-cpufreq-nvmem.c b/drivers/cpufreq/sun50i-cpufreq-nvmem.c > > index ef83e4bf2639..eb47c193269c 100644 > > --- a/drivers/cpufreq/sun50i-cpufreq-nvmem.c > > +++ b/drivers/cpufreq/sun50i-cpufreq-nvmem.c > > @@ -131,14 +131,14 @@ static const struct of_device_id cpu_opp_match_list[] = { > > static bool dt_has_supported_hw(void) > > { > > bool has_opp_supported_hw = false; > > - struct device_node *np; > > struct device *cpu_dev; > > > > cpu_dev = get_cpu_device(0); > > if (!cpu_dev) > > return false; > > > > - np = dev_pm_opp_of_get_opp_desc_node(cpu_dev); > > + struct device_node *np __free(device_node) = > > + dev_pm_opp_of_get_opp_desc_node(cpu_dev); Won't that result in build warning, mixed code and definitions now ? -- viresh