public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* drivers/clk/mediatek/clk-pll.c:418:23: warning: variable 'base' set but not used
@ 2022-04-27 17:27 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-04-27 17:27 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: kbuild-all, linux-kernel, Stephen Boyd, Miles Chen,
	AngeloGioacchino Del Regno, Chun-Jie Chen

Hi Chen-Yu,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   46cf2c613f4b10eb12f749207b0fd2c1bfae3088
commit: 6dd199064dd86127030b5bc59d4058370b6c8310 clk: mediatek: pll: Implement unregister API
date:   10 weeks ago
config: sh-randconfig-r016-20220427 (https://download.01.org/0day-ci/archive/20220428/202204280114.eJS2jGX1-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 11.3.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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6dd199064dd86127030b5bc59d4058370b6c8310
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 6dd199064dd86127030b5bc59d4058370b6c8310
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=sh SHELL=/bin/bash drivers/clk/mediatek/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/clk/mediatek/clk-pll.c: In function 'mtk_clk_unregister_plls':
>> drivers/clk/mediatek/clk-pll.c:418:23: warning: variable 'base' set but not used [-Wunused-but-set-variable]
     418 |         __iomem void *base = NULL;
         |                       ^~~~


vim +/base +418 drivers/clk/mediatek/clk-pll.c

   414	
   415	void mtk_clk_unregister_plls(const struct mtk_pll_data *plls, int num_plls,
   416				     struct clk_onecell_data *clk_data)
   417	{
 > 418		__iomem void *base = NULL;
   419		int i;
   420	
   421		if (!clk_data)
   422			return;
   423	
   424		for (i = num_plls; i > 0; i--) {
   425			const struct mtk_pll_data *pll = &plls[i - 1];
   426	
   427			if (IS_ERR_OR_NULL(clk_data->clks[pll->id]))
   428				continue;
   429	
   430			/*
   431			 * This is quite ugly but unfortunately the clks don't have
   432			 * any device tied to them, so there's no place to store the
   433			 * pointer to the I/O region base address. We have to fetch
   434			 * it from one of the registered clks.
   435			 */
   436			base = mtk_clk_pll_get_base(clk_data->clks[pll->id], pll);
   437	
   438			mtk_clk_unregister_pll(clk_data->clks[pll->id]);
   439			clk_data->clks[pll->id] = ERR_PTR(-ENOENT);
   440		}
   441	
   442		iounmap(base);
   443	}
   444	EXPORT_SYMBOL_GPL(mtk_clk_unregister_plls);
   445	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 2+ messages in thread
* drivers/clk/mediatek/clk-pll.c:418:23: warning: variable 'base' set but not used
@ 2022-04-04 11:41 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-04-04 11:41 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: kbuild-all, linux-kernel, Stephen Boyd, Miles Chen,
	AngeloGioacchino Del Regno, Chun-Jie Chen

Hi Chen-Yu,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   3123109284176b1532874591f7c81f3837bbdc17
commit: 6dd199064dd86127030b5bc59d4058370b6c8310 clk: mediatek: pll: Implement unregister API
date:   7 weeks ago
config: sh-buildonly-randconfig-r002-20220404 (https://download.01.org/0day-ci/archive/20220404/202204041904.XbBQEwTe-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 11.2.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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6dd199064dd86127030b5bc59d4058370b6c8310
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 6dd199064dd86127030b5bc59d4058370b6c8310
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=sh SHELL=/bin/bash drivers/clk/mediatek/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/clk/mediatek/clk-pll.c: In function 'mtk_clk_unregister_plls':
>> drivers/clk/mediatek/clk-pll.c:418:23: warning: variable 'base' set but not used [-Wunused-but-set-variable]
     418 |         __iomem void *base = NULL;
         |                       ^~~~


vim +/base +418 drivers/clk/mediatek/clk-pll.c

   414	
   415	void mtk_clk_unregister_plls(const struct mtk_pll_data *plls, int num_plls,
   416				     struct clk_onecell_data *clk_data)
   417	{
 > 418		__iomem void *base = NULL;
   419		int i;
   420	
   421		if (!clk_data)
   422			return;
   423	
   424		for (i = num_plls; i > 0; i--) {
   425			const struct mtk_pll_data *pll = &plls[i - 1];
   426	
   427			if (IS_ERR_OR_NULL(clk_data->clks[pll->id]))
   428				continue;
   429	
   430			/*
   431			 * This is quite ugly but unfortunately the clks don't have
   432			 * any device tied to them, so there's no place to store the
   433			 * pointer to the I/O region base address. We have to fetch
   434			 * it from one of the registered clks.
   435			 */
   436			base = mtk_clk_pll_get_base(clk_data->clks[pll->id], pll);
   437	
   438			mtk_clk_unregister_pll(clk_data->clks[pll->id]);
   439			clk_data->clks[pll->id] = ERR_PTR(-ENOENT);
   440		}
   441	
   442		iounmap(base);
   443	}
   444	EXPORT_SYMBOL_GPL(mtk_clk_unregister_plls);
   445	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-27 17:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-27 17:27 drivers/clk/mediatek/clk-pll.c:418:23: warning: variable 'base' set but not used kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2022-04-04 11:41 kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox