mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Akari Tsuyukusa <akkun11.open@gmail.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Brian Masney <bmasney@redhat.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	Chen-Yu Tsai <wenst@chromium.org>,
	Miles Chen <miles.chen@mediatek.com>
Cc: oe-kbuild-all@lists.linux.dev,
	Akari Tsuyukusa <akkun11.open@gmail.com>,
	linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org
Subject: Re: [PATCH] clk: mediatek: fix memory leak on module removal
Date: Thu, 6 Aug 2026 21:02:40 +0800	[thread overview]
Message-ID: <202608062020.IFIwVdEc-lkp@intel.com> (raw)
In-Reply-To: <20260629142348.273766-1-akkun11.open@gmail.com>

Hi Akari,

kernel test robot noticed the following build errors:

[auto build test ERROR on clk/clk-next]
[also build test ERROR on linus/master v7.2-rc6 next-20260805]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Akari-Tsuyukusa/clk-mediatek-fix-memory-leak-on-module-removal/20260805-032732
base:   https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next
patch link:    https://lore.kernel.org/r/20260629142348.273766-1-akkun11.open%40gmail.com
patch subject: [PATCH] clk: mediatek: fix memory leak on module removal
config: sparc-randconfig-001-20260806 (https://download.01.org/0day-ci/archive/20260806/202608062020.IFIwVdEc-lkp@intel.com/config)
compiler: sparc-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260806/202608062020.IFIwVdEc-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202608062020.IFIwVdEc-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/clk/mediatek/clk-mt8173-infracfg.c: In function 'clk_mt8173_infracfg_probe':
>> drivers/clk/mediatek/clk-mt8173-infracfg.c:131:36: error: 'clk_data' undeclared (first use in this function); did you mean 'clk_gate'?
     131 |         platform_set_drvdata(pdev, clk_data);
         |                                    ^~~~~~~~
         |                                    clk_gate
   drivers/clk/mediatek/clk-mt8173-infracfg.c:131:36: note: each undeclared identifier is reported only once for each function it appears in


vim +131 drivers/clk/mediatek/clk-mt8173-infracfg.c

    78	
    79	static void clk_mt8173_infra_init_early(struct device_node *node)
    80	{
    81		int i;
    82	
    83		infra_clk_data = mtk_alloc_clk_data(CLK_INFRA_NR_CLK);
    84		if (!infra_clk_data)
    85			return;
    86	
    87		for (i = 0; i < CLK_INFRA_NR_CLK; i++)
    88			infra_clk_data->hws[i] = ERR_PTR(-EPROBE_DEFER);
    89	
    90		mtk_clk_register_factors(infra_early_divs,
    91					 ARRAY_SIZE(infra_early_divs), infra_clk_data);
    92	
    93		of_clk_add_hw_provider(node, of_clk_hw_onecell_get, infra_clk_data);
    94	}
    95	CLK_OF_DECLARE_DRIVER(mtk_infrasys, "mediatek,mt8173-infracfg",
    96			      clk_mt8173_infra_init_early);
    97	
    98	static int clk_mt8173_infracfg_probe(struct platform_device *pdev)
    99	{
   100		struct device_node *node = pdev->dev.of_node;
   101		int r, i;
   102	
   103		if (!infra_clk_data) {
   104			infra_clk_data = mtk_alloc_clk_data(CLK_INFRA_NR_CLK);
   105			if (!infra_clk_data)
   106				return -ENOMEM;
   107		} else {
   108			for (i = 0; i < CLK_INFRA_NR_CLK; i++)
   109				if (infra_clk_data->hws[i] == ERR_PTR(-EPROBE_DEFER))
   110					infra_clk_data->hws[i] = ERR_PTR(-ENOENT);
   111		}
   112	
   113		r = mtk_clk_register_gates(&pdev->dev, node, infra_gates,
   114					   ARRAY_SIZE(infra_gates), infra_clk_data);
   115		if (r)
   116			return r;
   117	
   118		r = mtk_clk_register_cpumuxes(&pdev->dev, node, cpu_muxes,
   119					      ARRAY_SIZE(cpu_muxes), infra_clk_data);
   120		if (r)
   121			goto unregister_gates;
   122	
   123		r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, infra_clk_data);
   124		if (r)
   125			goto unregister_cpumuxes;
   126	
   127		r = mtk_register_reset_controller_with_dev(&pdev->dev, &clk_rst_desc);
   128		if (r)
   129			goto unregister_clk_hw;
   130	
 > 131		platform_set_drvdata(pdev, clk_data);
   132		return 0;
   133	
   134	unregister_clk_hw:
   135		of_clk_del_provider(node);
   136	unregister_cpumuxes:
   137		mtk_clk_unregister_cpumuxes(cpu_muxes, ARRAY_SIZE(cpu_muxes), infra_clk_data);
   138	unregister_gates:
   139		mtk_clk_unregister_gates(infra_gates, ARRAY_SIZE(infra_gates), infra_clk_data);
   140		return r;
   141	}
   142	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

      parent reply	other threads:[~2026-08-06 13:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-29 14:23 Akari Tsuyukusa
2026-07-06 20:01 ` Brian Masney
2026-07-07  7:54   ` Akari Tsuyukusa
2026-08-06 13:02 ` kernel test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202608062020.IFIwVdEc-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akkun11.open@gmail.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=bmasney@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=miles.chen@mediatek.com \
    --cc=mturquette@baylibre.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=sboyd@kernel.org \
    --cc=wenst@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®