[PATCH] drm/imx: Allow building under COMPILE_TEST

kbuild test robot lkp at intel.com
Tue Nov 6 01:32:29 UTC 2018


Hi Philipp,

I love your patch! Yet something to improve:

[auto build test ERROR on sof-driver-fuweitax/master]
[also build test ERROR on v4.20-rc1 next-20181105]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Philipp-Zabel/drm-imx-Allow-building-under-COMPILE_TEST/20181106-050753
base:   https://github.com/fuweitax/linux master
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 8.1.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=8.1.0 make.cross ARCH=ia64 

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

>> drivers/gpu/drm/imx/imx-tve.c:123:16: error: field 'clk_hw_di' has incomplete type
     struct clk_hw clk_hw_di;
                   ^~~~~~~~~
   In file included from include/linux/err.h:5,
                    from include/linux/clk.h:15,
                    from drivers/gpu/drm/imx/imx-tve.c:16:
   drivers/gpu/drm/imx/imx-tve.c: In function 'clk_tve_di_recalc_rate':
   include/linux/kernel.h:962:32: error: dereferencing pointer to incomplete type 'struct clk_hw'
     BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
                                   ^~~~~~
   include/linux/compiler.h:316:19: note: in definition of macro '__compiletime_assert'
      bool __cond = !(condition);    \
                      ^~~~~~~~~
   include/linux/compiler.h:339:2: note: in expansion of macro '_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'
    #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                        ^~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:962:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
     BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
     ^~~~~~~~~~~~~~~~
   include/linux/kernel.h:962:20: note: in expansion of macro '__same_type'
     BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
                       ^~~~~~~~~~~
   drivers/gpu/drm/imx/imx-tve.c:384:24: note: in expansion of macro 'container_of'
     struct imx_tve *tve = container_of(hw, struct imx_tve, clk_hw_di);
                           ^~~~~~~~~~~~
   drivers/gpu/drm/imx/imx-tve.c: At top level:
>> drivers/gpu/drm/imx/imx-tve.c:445:15: error: variable 'clk_tve_di_ops' has initializer but incomplete type
    static struct clk_ops clk_tve_di_ops = {
                  ^~~~~~~
>> drivers/gpu/drm/imx/imx-tve.c:446:3: error: 'struct clk_ops' has no member named 'round_rate'
     .round_rate = clk_tve_di_round_rate,
      ^~~~~~~~~~
>> drivers/gpu/drm/imx/imx-tve.c:446:16: warning: excess elements in struct initializer
     .round_rate = clk_tve_di_round_rate,
                   ^~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/imx/imx-tve.c:446:16: note: (near initialization for 'clk_tve_di_ops')
>> drivers/gpu/drm/imx/imx-tve.c:447:3: error: 'struct clk_ops' has no member named 'set_rate'
     .set_rate = clk_tve_di_set_rate,
      ^~~~~~~~
   drivers/gpu/drm/imx/imx-tve.c:447:14: warning: excess elements in struct initializer
     .set_rate = clk_tve_di_set_rate,
                 ^~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/imx/imx-tve.c:447:14: note: (near initialization for 'clk_tve_di_ops')
>> drivers/gpu/drm/imx/imx-tve.c:448:3: error: 'struct clk_ops' has no member named 'recalc_rate'
     .recalc_rate = clk_tve_di_recalc_rate,
      ^~~~~~~~~~~
   drivers/gpu/drm/imx/imx-tve.c:448:17: warning: excess elements in struct initializer
     .recalc_rate = clk_tve_di_recalc_rate,
                    ^~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/imx/imx-tve.c:448:17: note: (near initialization for 'clk_tve_di_ops')
   drivers/gpu/drm/imx/imx-tve.c: In function 'tve_clk_init':
>> drivers/gpu/drm/imx/imx-tve.c:454:9: error: variable 'init' has initializer but incomplete type
     struct clk_init_data init = {
            ^~~~~~~~~~~~~
>> drivers/gpu/drm/imx/imx-tve.c:455:4: error: 'struct clk_init_data' has no member named 'name'
      .name = "tve_di",
       ^~~~
   drivers/gpu/drm/imx/imx-tve.c:455:11: warning: excess elements in struct initializer
      .name = "tve_di",
              ^~~~~~~~
   drivers/gpu/drm/imx/imx-tve.c:455:11: note: (near initialization for 'init')
>> drivers/gpu/drm/imx/imx-tve.c:456:4: error: 'struct clk_init_data' has no member named 'ops'
      .ops = &clk_tve_di_ops,
       ^~~
   drivers/gpu/drm/imx/imx-tve.c:456:10: warning: excess elements in struct initializer
      .ops = &clk_tve_di_ops,
             ^
   drivers/gpu/drm/imx/imx-tve.c:456:10: note: (near initialization for 'init')
>> drivers/gpu/drm/imx/imx-tve.c:457:4: error: 'struct clk_init_data' has no member named 'num_parents'
      .num_parents = 1,
       ^~~~~~~~~~~
   drivers/gpu/drm/imx/imx-tve.c:457:18: warning: excess elements in struct initializer
      .num_parents = 1,
                     ^
   drivers/gpu/drm/imx/imx-tve.c:457:18: note: (near initialization for 'init')
>> drivers/gpu/drm/imx/imx-tve.c:458:4: error: 'struct clk_init_data' has no member named 'flags'
      .flags = 0,
       ^~~~~
   drivers/gpu/drm/imx/imx-tve.c:458:12: warning: excess elements in struct initializer
      .flags = 0,
               ^
   drivers/gpu/drm/imx/imx-tve.c:458:12: note: (near initialization for 'init')
>> drivers/gpu/drm/imx/imx-tve.c:454:23: error: storage size of 'init' isn't known
     struct clk_init_data init = {
                          ^~~~
>> drivers/gpu/drm/imx/imx-tve.c:461:21: error: implicit declaration of function '__clk_get_name'; did you mean 'clk_get_rate'? [-Werror=implicit-function-declaration]
     tve_di_parent[0] = __clk_get_name(tve->clk);
                        ^~~~~~~~~~~~~~
                        clk_get_rate
>> drivers/gpu/drm/imx/imx-tve.c:461:19: warning: assignment to 'const char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     tve_di_parent[0] = __clk_get_name(tve->clk);
                      ^
>> drivers/gpu/drm/imx/imx-tve.c:465:16: error: implicit declaration of function 'clk_register'; did you mean 'bus_register'? [-Werror=implicit-function-declaration]
     tve->di_clk = clk_register(tve->dev, &tve->clk_hw_di);
                   ^~~~~~~~~~~~
                   bus_register
   drivers/gpu/drm/imx/imx-tve.c:454:23: warning: unused variable 'init' [-Wunused-variable]
     struct clk_init_data init = {
                          ^~~~
   drivers/gpu/drm/imx/imx-tve.c: At top level:
>> drivers/gpu/drm/imx/imx-tve.c:445:23: error: storage size of 'clk_tve_di_ops' isn't known
    static struct clk_ops clk_tve_di_ops = {
                          ^~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/clk_hw_di +123 drivers/gpu/drm/imx/imx-tve.c

fcbc51e5 drivers/staging/imx-drm/imx-tve.c Philipp Zabel 2013-04-08  107  
fcbc51e5 drivers/staging/imx-drm/imx-tve.c Philipp Zabel 2013-04-08  108  struct imx_tve {
fcbc51e5 drivers/staging/imx-drm/imx-tve.c Philipp Zabel 2013-04-08  109  	struct drm_connector connector;
49f98bc4 drivers/gpu/drm/imx/imx-tve.c     Philipp Zabel 2016-07-06  110  	struct drm_encoder encoder;
fcbc51e5 drivers/staging/imx-drm/imx-tve.c Philipp Zabel 2013-04-08  111  	struct device *dev;
fcbc51e5 drivers/staging/imx-drm/imx-tve.c Philipp Zabel 2013-04-08  112  	spinlock_t lock;	/* register lock */
fcbc51e5 drivers/staging/imx-drm/imx-tve.c Philipp Zabel 2013-04-08  113  	bool enabled;
fcbc51e5 drivers/staging/imx-drm/imx-tve.c Philipp Zabel 2013-04-08  114  	int mode;
49f98bc4 drivers/gpu/drm/imx/imx-tve.c     Philipp Zabel 2016-07-06  115  	int di_hsync_pin;
49f98bc4 drivers/gpu/drm/imx/imx-tve.c     Philipp Zabel 2016-07-06  116  	int di_vsync_pin;
fcbc51e5 drivers/staging/imx-drm/imx-tve.c Philipp Zabel 2013-04-08  117  
fcbc51e5 drivers/staging/imx-drm/imx-tve.c Philipp Zabel 2013-04-08  118  	struct regmap *regmap;
fcbc51e5 drivers/staging/imx-drm/imx-tve.c Philipp Zabel 2013-04-08  119  	struct regulator *dac_reg;
fcbc51e5 drivers/staging/imx-drm/imx-tve.c Philipp Zabel 2013-04-08  120  	struct i2c_adapter *ddc;
fcbc51e5 drivers/staging/imx-drm/imx-tve.c Philipp Zabel 2013-04-08  121  	struct clk *clk;
fcbc51e5 drivers/staging/imx-drm/imx-tve.c Philipp Zabel 2013-04-08  122  	struct clk *di_sel_clk;
fcbc51e5 drivers/staging/imx-drm/imx-tve.c Philipp Zabel 2013-04-08 @123  	struct clk_hw clk_hw_di;
fcbc51e5 drivers/staging/imx-drm/imx-tve.c Philipp Zabel 2013-04-08  124  	struct clk *di_clk;
fcbc51e5 drivers/staging/imx-drm/imx-tve.c Philipp Zabel 2013-04-08  125  };
fcbc51e5 drivers/staging/imx-drm/imx-tve.c Philipp Zabel 2013-04-08  126  

:::::: The code at line 123 was first introduced by commit
:::::: fcbc51e54d2aa9d402206601f4894251049e5d77 staging: drm/imx: Add support for Television Encoder (TVEv2)

:::::: TO: Philipp Zabel <p.zabel at pengutronix.de>
:::::: CC: Greg Kroah-Hartman <gregkh at linuxfoundation.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 49830 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20181106/85fcb5bc/attachment-0001.gz>


More information about the dri-devel mailing list