From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5200E318EDA for ; Wed, 17 Jun 2026 11:01:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781694085; cv=none; b=ouK8Xy+wQ4l45l1GYtZ5QMgHuAAzK4pG0KtZs5sRsptrJl0DpsIVsQ8iDbK3RJZoo8tT9WqjlM0YJuhCLxyAnK3WxihE/1ePtlEGvs9EDhf0t4Ja/XwaeVv3BoqocPPn/4xGB8M3OeqbigUdOJ8DSPUB43EM6xVQnY0IuEWazGY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781694085; c=relaxed/simple; bh=bftScsotNvsRcdpHxJ8awpRJeOKGTdRa8s480iopQr8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=mxUaCXZaTgUq1L/ZFCVqPaGpKmNxIZRZ3Wm5l9X5ig9d0p9hXr04wNk2wo7M8wqHknSZQUZG66LYGaiVkJTCmj1DyTTCCxlqse6VPKAqgPoBA44PLXvu0o78XaX9wVxv4VY7hk5nFfTNHtwYf+xZcrRJImo0BeGnJldkiz+ORGQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=YD7wRl80; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=b0McoI5z; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="YD7wRl80"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="b0McoI5z" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1781694083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=8TcYVumjXtOCP5kzdiYOwgOj5Y9zDw6OkE9mWprckgc=; b=YD7wRl80EpE/mHUAVWgO2zbno06YsAhb8nqP49BQ5gmelH6dKsVCMccOrFl2B2xQTjxzZ9 NNDJ7BV6OF1vGLih3hbZyevg/ppFye0MdlBotqp3EuKUduw79nxBOTPWxIXqWtCrAyFnAm vhJ9pmy2g0fIRhvUbjX7DjzBi8xx7Zc= Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-400-jTgO69ajOl2RbnyfJrQNrg-1; Wed, 17 Jun 2026 07:01:21 -0400 X-MC-Unique: jTgO69ajOl2RbnyfJrQNrg-1 X-Mimecast-MFC-AGG-ID: jTgO69ajOl2RbnyfJrQNrg_1781694081 Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-918622c3c7bso943944585a.3 for ; Wed, 17 Jun 2026 04:01:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1781694081; x=1782298881; darn=vger.kernel.org; h=user-agent: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=8TcYVumjXtOCP5kzdiYOwgOj5Y9zDw6OkE9mWprckgc=; b=b0McoI5zrxe0nO6bgq330RDPkf7U5gbHvy/ZTzpj4ZFtPDyJnYZM1Y4NsPKPM6MJr+ PKW9gUrg9aJnprhQrLMEn21+nlPk2+AhDKz5HhI3gd/VZ4QrkRnIk3sfEl5OILNJ1DAZ TXlAsxf7va6vtnxnC80w2/ypTo08cPSInf515q7EPzety+Sg7j9jtrBiOe9gstgFPkBE /azhoUBoixIVikEJip3zN6K80PPos//rzVc4LbZtQoQkwUm77aOjhinuQvUa9JVWpQnF XpJnxGs9JUVt9xfLlAHbDhY4GHZPEYBoQNB5jxdFhHBmxXqYivfQHw6LzD8GjWHMv1GZ HzVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781694081; x=1782298881; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=8TcYVumjXtOCP5kzdiYOwgOj5Y9zDw6OkE9mWprckgc=; b=c9ghTgsCO1cdOL4Ux++obpeLiTpY0KX+MtnMUUfUreQ1WxjcKsiWCCPr47eVErKFAa +8C4Wb/I6Py1Q6xzC+mml9GFnmkedZedzJmAtvroiPrPfNVT65JLjHNclXM0m5etgvRS MK+RZZgehgEGJVbN1Bk/v/dS2mekI8r4r4WpQcJz+rxp/N3iIGOuzyAf2yRytZnYYfvU mM9NPlGA0YNFcbWj8INVeDTTaMG7el6l7wxMZnjzboWTdn0TDLb68hKXKlPhErnkGpcc GHFu78sYkP9uy3HCr44v71XOYiPtBp9IaoeJLhn4WYRwxrj05AserErGCfBx5EX8ZZqa Jong== X-Forwarded-Encrypted: i=1; AFNElJ/e/a3gJF7gBfEsaUt3GmoxuwrErW4t0exZ3Y63RodXRn9IhWXvZGDDQYfU9q4waZOPR2P97wX5Xs3PsaE=@vger.kernel.org X-Gm-Message-State: AOJu0Yy8/JvpQYTur/Q14aFgZ5yjeeN58s76RJssKiHP+lYwnN7B4qpb dnYVzdwZva9IR13lb0Boo5GG4xLGwOGq8srddnf5hy8EdsiM480J/JteDM2JKo1Io+ZDYU19haY CvtGm3mkKbMQtzYbcWVmDv+lA+S9+6aKuw8PiZQoG3wqZLbV9OtSPT24kitY7ikSxCQ== X-Gm-Gg: Acq92OG77pyrRFu6CuVCFw1d+fz3CTD1ZvdxFEj+VSsCp0Re5+V419kzHy0ZpsvHU2i 6hIqTBpWEfoBC8TcFa0Sfjz8DTmCnSYwXYBKp49g/2HcfanRAbamBv/N50xx+UUhG602x5yILDE ULCRfAKWT92/6ZJPg5D7Vx574uoZQliVy3uvJqUMMeNzC2Lr+gd/TrzXW9gSIkoCCDcxeuF20cv HPeFmpPC9wBOjoweX54Q9eysQJJGlVabrh8M8G2k3m4CHnEBY7bXZdARQ8DVnBlg4CNuth5wf0q qJ+mafGD8PMf5QoxBSVFaRJQKiNkRBBLW7lwfw0AnMbPEYKoC13/wAcM4RLuGsrttW6XPgbD8gj C6lR5dMdHUj3mC0T/xdmA4ITUo23t6kiYARA8vmWyNvVBLA== X-Received: by 2002:a05:620a:7103:b0:915:d10e:8c4c with SMTP id af79cd13be357-91d8dcabb5emr573978185a.42.1781694074857; Wed, 17 Jun 2026 04:01:14 -0700 (PDT) X-Received: by 2002:a05:620a:7103:b0:915:d10e:8c4c with SMTP id af79cd13be357-91d8dcabb5emr573733385a.42.1781694058081; Wed, 17 Jun 2026 04:00:58 -0700 (PDT) Received: from redhat.com (c-73-183-52-120.hsd1.pa.comcast.net. [73.183.52.120]) by smtp.gmail.com with ESMTPSA id af79cd13be357-91619f1c851sm1732803285a.16.2026.06.17.04.00.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jun 2026 04:00:57 -0700 (PDT) Date: Wed, 17 Jun 2026 07:00:55 -0400 From: Brian Masney To: Wentao Liang Cc: andrew@lunn.ch, gregory.clement@bootlin.com, sebastian.hesselbarth@gmail.com, mturquette@baylibre.com, sboyd@kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] clk: mvebu: ap-cpu: fix missing clk_put() in ap_cpu_clock_probe() Message-ID: References: <20260617014126.1716291-1-vulab@iscas.ac.cn> 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: <20260617014126.1716291-1-vulab@iscas.ac.cn> User-Agent: Mutt/2.3.1 (2026-03-20) On Wed, Jun 17, 2026 at 01:41:26AM +0000, Wentao Liang wrote: > The function ap_cpu_clock_probe() calls of_clk_get() to obtain a > reference to the parent clock for each CPU cluster, but it never > releases it with clk_put(). The returned clk is used only to read > the parent's name via __clk_get_name(), and the reference is leaked > on every successful cluster initialization as well as on the error > path when devm_clk_hw_register() fails. > > Rather than adding clk_put() calls, replace the of_clk_get() + > __clk_get_name() pattern with of_clk_get_parent_name(), which is > the intended API for this use case and handles the reference > counting internally. This matches the pattern already used by the > sibling drivers clk-cpu.c and clk-corediv.c. > > Fixes: f756e362d9384 ("clk: mvebu: add CPU clock driver for Armada 7K/8K") > Signed-off-by: Wentao Liang Reviewed-by: Brian Masney For the future, if someone leaves a tag like Reviewed-by, or Tested-by, then include it with your next version, unless something major changes with the code. Don't post another version since Stephen's automation will pick up my tag when he merges this. Brian