linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [rockchip:v6.15-clk/next 10/10] drivers/clk/rockchip/clk-rk3562.c:1081:31: error: incomplete definition of type 'struct platform_device'
@ 2025-03-02  5:53 kernel test robot
  2025-03-02 16:57 ` Heiko Stübner
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2025-03-02  5:53 UTC (permalink / raw)
  To: Finley Xiao
  Cc: llvm, oe-kbuild-all, linux-arm-kernel, linux-rockchip,
	Heiko Stuebner, Tao Huang, Sugar Zhang, Kever Yang

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@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


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

* Re: [rockchip:v6.15-clk/next 10/10] drivers/clk/rockchip/clk-rk3562.c:1081:31: error: incomplete definition of type 'struct platform_device'
  2025-03-02  5:53 [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
@ 2025-03-02 16:57 ` Heiko Stübner
  0 siblings, 0 replies; 2+ messages in thread
From: Heiko Stübner @ 2025-03-02 16:57 UTC (permalink / raw)
  To: Finley Xiao, kernel test robot
  Cc: llvm, oe-kbuild-all, linux-arm-kernel, linux-rockchip, Tao Huang,
	Sugar Zhang, Kever Yang

Am Sonntag, 2. März 2025, 06:53:23 MEZ schrieb kernel test robot:
> 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@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202503021302.FjsycBI2-lkp@intel.com/

I've "fixed" the error by moving this new driver to how we handle all
other clock drivers already - not allowing them to build as module.

I've amended the original commit for that and also included the lkp report.


Heiko




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

end of thread, other threads:[~2025-03-02 17:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-02  5:53 [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
2025-03-02 16:57 ` Heiko Stübner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).