[rockchip:v6.15-clk/next 10/10] drivers/clk/rockchip/clk-rk3562.c:1081:31: error: incomplete definition of type 'struct platform_device'

kernel test robot lkp at intel.com
Sat Mar 1 21:53:23 PST 2025


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git v6.15-clk/next
head:   36c7fdc8f585acbf11c8e5bc112fa9d8ef75146a
commit: 36c7fdc8f585acbf11c8e5bc112fa9d8ef75146a [10/10] clk: rockchip: Add clock controller for the RK3562
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20250302/202503021302.FjsycBI2-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250302/202503021302.FjsycBI2-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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202503021302.FjsycBI2-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

>> drivers/clk/rockchip/clk-rk3562.c:1079:36: warning: declaration of 'struct platform_device' will not be visible outside of this function [-Wvisibility]
    1079 | static int clk_rk3562_probe(struct platform_device *pdev)
         |                                    ^
>> drivers/clk/rockchip/clk-rk3562.c:1081:31: error: incomplete definition of type 'struct platform_device'
    1081 |         struct device_node *np = pdev->dev.of_node;
         |                                  ~~~~^
   drivers/clk/rockchip/clk-rk3562.c:1079:36: note: forward declaration of 'struct platform_device'
    1079 | static int clk_rk3562_probe(struct platform_device *pdev)
         |                                    ^
   drivers/clk/rockchip/clk-rk3562.c:1085:55: error: incomplete definition of type 'struct platform_device'
    1085 |         match = of_match_device(clk_rk3562_match_table, &pdev->dev);
         |                                                          ~~~~^
   drivers/clk/rockchip/clk-rk3562.c:1079:36: note: forward declaration of 'struct platform_device'
    1079 | static int clk_rk3562_probe(struct platform_device *pdev)
         |                                    ^
>> drivers/clk/rockchip/clk-rk3562.c:1096:31: error: variable has incomplete type 'struct platform_driver'
    1096 | static struct platform_driver clk_rk3562_driver = {
         |                               ^
   drivers/clk/rockchip/clk-rk3562.c:1096:15: note: forward declaration of 'struct platform_driver'
    1096 | static struct platform_driver clk_rk3562_driver = {
         |               ^
>> drivers/clk/rockchip/clk-rk3562.c:1104:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
    1104 | module_platform_driver(clk_rk3562_driver);
         | ^
         | int
>> drivers/clk/rockchip/clk-rk3562.c:1104:24: error: a parameter list without types is only allowed in a function definition
    1104 | module_platform_driver(clk_rk3562_driver);
         |                        ^
   1 warning and 5 errors generated.


vim +1081 drivers/clk/rockchip/clk-rk3562.c

  1078	
> 1079	static int clk_rk3562_probe(struct platform_device *pdev)
  1080	{
> 1081		struct device_node *np = pdev->dev.of_node;
  1082		const struct of_device_id *match;
  1083		const struct clk_rk3562_inits *init_data;
  1084	
  1085		match = of_match_device(clk_rk3562_match_table, &pdev->dev);
  1086		if (!match || !match->data)
  1087			return -EINVAL;
  1088	
  1089		init_data = match->data;
  1090		if (init_data->inits)
  1091			init_data->inits(np);
  1092	
  1093		return 0;
  1094	}
  1095	
> 1096	static struct platform_driver clk_rk3562_driver = {
  1097		.probe		= clk_rk3562_probe,
  1098		.driver		= {
  1099			.name	= "clk-rk3562",
  1100			.of_match_table = clk_rk3562_match_table,
  1101			.suppress_bind_attrs = true,
  1102		},
  1103	};
> 1104	module_platform_driver(clk_rk3562_driver);
  1105	

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



More information about the Linux-rockchip mailing list