public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Ziqin Liu <ziqin_l@hust.edu.cn>,
	dzm91@hust.edu.cn, Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno 
	<angelogioacchino.delregno@collabora.com>
Cc: oe-kbuild-all@lists.linux.dev,
	hust-os-kernel-patches@googlegroups.com,
	Ziqin Liu <ziqin_l@hust.edu.cn>,
	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: clk-mt8173: fix memory leak in clk_mt8173_apmixed_probe
Date: Sat, 29 Apr 2023 04:17:40 +0800	[thread overview]
Message-ID: <202304290405.yLxJEMC4-lkp@intel.com> (raw)
In-Reply-To: <20230425132601.106181-1-ziqin_l@hust.edu.cn>

Hi Ziqin,

kernel test robot noticed the following build errors:

[auto build test ERROR on clk/clk-next]
[also build test ERROR on linus/master v6.3 next-20230428]
[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/Ziqin-Liu/clk-mediatek-clk-mt8173-fix-memory-leak-in-clk_mt8173_apmixed_probe/20230425-212917
base:   https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next
patch link:    https://lore.kernel.org/r/20230425132601.106181-1-ziqin_l%40hust.edu.cn
patch subject: [PATCH] clk: mediatek: clk-mt8173: fix memory leak in clk_mt8173_apmixed_probe
config: alpha-allmodconfig (https://download.01.org/0day-ci/archive/20230429/202304290405.yLxJEMC4-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/cb4be4dcd48924984a6d0e3df7809cfc26286032
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Ziqin-Liu/clk-mediatek-clk-mt8173-fix-memory-leak-in-clk_mt8173_apmixed_probe/20230425-212917
        git checkout cb4be4dcd48924984a6d0e3df7809cfc26286032
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=alpha olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=alpha SHELL=/bin/bash drivers/clk/mediatek/ drivers/video/fbdev/core/ mm/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304290405.yLxJEMC4-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/clk/mediatek/clk-mt8173-apmixedsys.c: In function 'clk_mt8173_apmixed_probe':
>> drivers/clk/mediatek/clk-mt8173-apmixedsys.c:149:34: error: incompatible type for argument 1 of 'devm_of_iomap'
     149 |         base = devm_of_iomap(pdev->dev, node, 0, NULL);
         |                              ~~~~^~~~~
         |                                  |
         |                                  struct device
   In file included from include/linux/platform_device.h:13,
                    from drivers/clk/mediatek/clk-mt8173-apmixedsys.c:11:
   include/linux/device.h:241:44: note: expected 'struct device *' but argument is of type 'struct device'
     241 | void __iomem *devm_of_iomap(struct device *dev,
         |                             ~~~~~~~~~~~~~~~^~~


vim +/devm_of_iomap +149 drivers/clk/mediatek/clk-mt8173-apmixedsys.c

   139	
   140	static int clk_mt8173_apmixed_probe(struct platform_device *pdev)
   141	{
   142		const u8 *fhctl_node = "mediatek,mt8173-fhctl";
   143		struct device_node *node = pdev->dev.of_node;
   144		struct clk_hw_onecell_data *clk_data;
   145		void __iomem *base;
   146		struct clk_hw *hw;
   147		int r;
   148	
 > 149		base = devm_of_iomap(pdev->dev, node, 0, NULL);
   150		if (!base)
   151			return PTR_ERR(base);
   152	
   153		clk_data = mtk_alloc_clk_data(CLK_APMIXED_NR_CLK);
   154		if (IS_ERR_OR_NULL(clk_data))
   155			return -ENOMEM;
   156	
   157		fhctl_parse_dt(fhctl_node, pllfhs, ARRAY_SIZE(pllfhs));
   158		r = mtk_clk_register_pllfhs(node, plls, ARRAY_SIZE(plls),
   159					    pllfhs, ARRAY_SIZE(pllfhs), clk_data);
   160		if (r)
   161			goto free_clk_data;
   162	
   163		hw = mtk_clk_register_ref2usb_tx("ref2usb_tx", "clk26m", base + REGOFF_REF2USB);
   164		if (IS_ERR(hw)) {
   165			r = PTR_ERR(hw);
   166			dev_err(&pdev->dev, "Failed to register ref2usb_tx: %d\n", r);
   167			goto unregister_plls;
   168		}
   169		clk_data->hws[CLK_APMIXED_REF2USB_TX] = hw;
   170	
   171		hw = devm_clk_hw_register_divider(&pdev->dev, "hdmi_ref", "tvdpll_594m", 0,
   172						  base + REGOFF_HDMI_REF, 16, 3,
   173						  CLK_DIVIDER_POWER_OF_TWO, NULL);
   174		clk_data->hws[CLK_APMIXED_HDMI_REF] = hw;
   175	
   176		r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
   177		if (r)
   178			goto unregister_ref2usb;
   179	
   180		return 0;
   181	
   182	unregister_ref2usb:
   183		mtk_clk_unregister_ref2usb_tx(clk_data->hws[CLK_APMIXED_REF2USB_TX]);
   184	unregister_plls:
   185		mtk_clk_unregister_pllfhs(plls, ARRAY_SIZE(plls), pllfhs,
   186					  ARRAY_SIZE(pllfhs), clk_data);
   187	free_clk_data:
   188		mtk_free_clk_data(clk_data);
   189		return r;
   190	}
   191	

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

      parent reply	other threads:[~2023-04-28 20:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-25 13:26 [PATCH] clk: mediatek: clk-mt8173: fix memory leak in clk_mt8173_apmixed_probe Ziqin Liu
2023-04-25 16:56 ` kernel test robot
2023-04-28 20:17 ` 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=202304290405.yLxJEMC4-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=dzm91@hust.edu.cn \
    --cc=hust-os-kernel-patches@googlegroups.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=mturquette@baylibre.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=sboyd@kernel.org \
    --cc=ziqin_l@hust.edu.cn \
    /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