lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <201905230743.eZYM5EBi%lkp@intel.com>
Date:   Thu, 23 May 2019 07:25:45 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Mark Brown <broonie@...nel.org>
Cc:     kbuild-all@...org, linux-kernel@...r.kernel.org
Subject: sound/soc/intel/skylake/skl-ssp-clk.c:18:25: note: in expansion of
 macro 'container_of'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   54dee406374ce8adb352c48e175176247cb8db7c
commit: 164a263bf8d003e4cbb197d52b74d26df72604d7 ASoC: Intel: Make boards more available for compile test
date:   3 weeks ago
config: ia64-allyesconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 164a263bf8d003e4cbb197d52b74d26df72604d7
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=ia64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   sound/soc/intel/skylake/skl-ssp-clk.c:26:16: error: field 'hw' has incomplete type
     struct clk_hw hw;
                   ^~
   In file included from include/linux/kernel.h:11:0,
                    from sound/soc/intel/skylake/skl-ssp-clk.c:8:
   sound/soc/intel/skylake/skl-ssp-clk.c: In function 'skl_clk_prepare':
   include/linux/kernel.h:979:32: error: dereferencing pointer to incomplete type 'struct clk_hw'
     BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
                                   ^~~~~~
   include/linux/compiler.h:324:9: note: in definition of macro '__compiletime_assert'
      if (!(condition))     \
            ^~~~~~~~~
   include/linux/compiler.h:344:2: note: in expansion of macro '_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
    #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                        ^~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:979:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
     BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
     ^~~~~~~~~~~~~~~~
   include/linux/kernel.h:979:20: note: in expansion of macro '__same_type'
     BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
                       ^~~~~~~~~~~
>> sound/soc/intel/skylake/skl-ssp-clk.c:18:25: note: in expansion of macro 'container_of'
    #define to_skl_clk(_hw) container_of(_hw, struct skl_clk, hw)
                            ^~~~~~~~~~~~
>> sound/soc/intel/skylake/skl-ssp-clk.c:201:27: note: in expansion of macro 'to_skl_clk'
     struct skl_clk *clkdev = to_skl_clk(hw);
                              ^~~~~~~~~~
   sound/soc/intel/skylake/skl-ssp-clk.c: At top level:
   sound/soc/intel/skylake/skl-ssp-clk.c:260:21: error: variable 'skl_clk_ops' has initializer but incomplete type
    static const struct clk_ops skl_clk_ops = {
                        ^~~~~~~
   sound/soc/intel/skylake/skl-ssp-clk.c:261:3: error: 'const struct clk_ops' has no member named 'prepare'
     .prepare = skl_clk_prepare,
      ^~~~~~~
   sound/soc/intel/skylake/skl-ssp-clk.c:261:13: warning: excess elements in struct initializer
     .prepare = skl_clk_prepare,
                ^~~~~~~~~~~~~~~
   sound/soc/intel/skylake/skl-ssp-clk.c:261:13: note: (near initialization for 'skl_clk_ops')
   sound/soc/intel/skylake/skl-ssp-clk.c:262:3: error: 'const struct clk_ops' has no member named 'unprepare'
     .unprepare = skl_clk_unprepare,
      ^~~~~~~~~
   sound/soc/intel/skylake/skl-ssp-clk.c:262:15: warning: excess elements in struct initializer
     .unprepare = skl_clk_unprepare,
                  ^~~~~~~~~~~~~~~~~
   sound/soc/intel/skylake/skl-ssp-clk.c:262:15: note: (near initialization for 'skl_clk_ops')
   sound/soc/intel/skylake/skl-ssp-clk.c:263:3: error: 'const struct clk_ops' has no member named 'set_rate'
     .set_rate = skl_clk_set_rate,
      ^~~~~~~~
   sound/soc/intel/skylake/skl-ssp-clk.c:263:14: warning: excess elements in struct initializer
     .set_rate = skl_clk_set_rate,
                 ^~~~~~~~~~~~~~~~
   sound/soc/intel/skylake/skl-ssp-clk.c:263:14: note: (near initialization for 'skl_clk_ops')
   sound/soc/intel/skylake/skl-ssp-clk.c:264:3: error: 'const struct clk_ops' has no member named 'round_rate'
     .round_rate = skl_clk_round_rate,
      ^~~~~~~~~~
   sound/soc/intel/skylake/skl-ssp-clk.c:264:16: warning: excess elements in struct initializer
     .round_rate = skl_clk_round_rate,
                   ^~~~~~~~~~~~~~~~~~
   sound/soc/intel/skylake/skl-ssp-clk.c:264:16: note: (near initialization for 'skl_clk_ops')
   sound/soc/intel/skylake/skl-ssp-clk.c:265:3: error: 'const struct clk_ops' has no member named 'recalc_rate'
     .recalc_rate = skl_clk_recalc_rate,
      ^~~~~~~~~~~
   sound/soc/intel/skylake/skl-ssp-clk.c:265:17: warning: excess elements in struct initializer
     .recalc_rate = skl_clk_recalc_rate,
                    ^~~~~~~~~~~~~~~~~~~
   sound/soc/intel/skylake/skl-ssp-clk.c:265:17: note: (near initialization for 'skl_clk_ops')
   sound/soc/intel/skylake/skl-ssp-clk.c: In function 'unregister_parent_src_clk':
   sound/soc/intel/skylake/skl-ssp-clk.c:273:3: error: implicit declaration of function 'clk_hw_unregister_fixed_rate'; did you mean 'clk_hw_register_clkdev'? [-Werror=implicit-function-declaration]
      clk_hw_unregister_fixed_rate(pclk[id].hw);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      clk_hw_register_clkdev
   sound/soc/intel/skylake/skl-ssp-clk.c: In function 'skl_register_parent_clks':
   sound/soc/intel/skylake/skl-ssp-clk.c:294:18: error: implicit declaration of function 'clk_hw_register_fixed_rate'; did you mean 'clk_hw_register_clkdev'? [-Werror=implicit-function-declaration]
      parent[i].hw = clk_hw_register_fixed_rate(dev, pclk[i].name,
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
                     clk_hw_register_clkdev
>> sound/soc/intel/skylake/skl-ssp-clk.c:294:16: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
      parent[i].hw = clk_hw_register_fixed_rate(dev, pclk[i].name,
                   ^
   sound/soc/intel/skylake/skl-ssp-clk.c: In function 'register_skl_clk':
   sound/soc/intel/skylake/skl-ssp-clk.c:321:23: error: storage size of 'init' isn't known
     struct clk_init_data init;
                          ^~~~
   sound/soc/intel/skylake/skl-ssp-clk.c:331:15: error: 'CLK_SET_RATE_GATE' undeclared (first use in this function); did you mean 'DL_STATE_NONE'?
     init.flags = CLK_SET_RATE_GATE;
                  ^~~~~~~~~~~~~~~~~
                  DL_STATE_NONE
   sound/soc/intel/skylake/skl-ssp-clk.c:331:15: note: each undeclared identifier is reported only once for each function it appears in
   sound/soc/intel/skylake/skl-ssp-clk.c:338:8: error: implicit declaration of function 'devm_clk_hw_register'; did you mean 'devm_clk_hw_register_clkdev'? [-Werror=implicit-function-declaration]
     ret = devm_clk_hw_register(dev, &clkdev->hw);
           ^~~~~~~~~~~~~~~~~~~~
           devm_clk_hw_register_clkdev
   sound/soc/intel/skylake/skl-ssp-clk.c:321:23: warning: unused variable 'init' [-Wunused-variable]
     struct clk_init_data init;
                          ^~~~
   sound/soc/intel/skylake/skl-ssp-clk.c: At top level:
   sound/soc/intel/skylake/skl-ssp-clk.c:260:29: error: storage size of 'skl_clk_ops' isn't known
    static const struct clk_ops skl_clk_ops = {
                                ^~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/container_of +18 sound/soc/intel/skylake/skl-ssp-clk.c

01f50d69 Sriram Periyasamy 2018-01-04   17  
01f50d69 Sriram Periyasamy 2018-01-04  @18  #define to_skl_clk(_hw)	container_of(_hw, struct skl_clk, hw)
01f50d69 Sriram Periyasamy 2018-01-04   19  
01f50d69 Sriram Periyasamy 2018-01-04   20  struct skl_clk_parent {
01f50d69 Sriram Periyasamy 2018-01-04   21  	struct clk_hw *hw;
01f50d69 Sriram Periyasamy 2018-01-04   22  	struct clk_lookup *lookup;
01f50d69 Sriram Periyasamy 2018-01-04   23  };
01f50d69 Sriram Periyasamy 2018-01-04   24  
01f50d69 Sriram Periyasamy 2018-01-04   25  struct skl_clk {
01f50d69 Sriram Periyasamy 2018-01-04   26  	struct clk_hw hw;
01f50d69 Sriram Periyasamy 2018-01-04   27  	struct clk_lookup *lookup;
01f50d69 Sriram Periyasamy 2018-01-04   28  	unsigned long rate;
01f50d69 Sriram Periyasamy 2018-01-04   29  	struct skl_clk_pdata *pdata;
01f50d69 Sriram Periyasamy 2018-01-04   30  	u32 id;
01f50d69 Sriram Periyasamy 2018-01-04   31  };
01f50d69 Sriram Periyasamy 2018-01-04   32  
01f50d69 Sriram Periyasamy 2018-01-04   33  struct skl_clk_data {
01f50d69 Sriram Periyasamy 2018-01-04   34  	struct skl_clk_parent parent[SKL_MAX_CLK_SRC];
01f50d69 Sriram Periyasamy 2018-01-04   35  	struct skl_clk *clk[SKL_MAX_CLK_CNT];
01f50d69 Sriram Periyasamy 2018-01-04   36  	u8 avail_clk_cnt;
01f50d69 Sriram Periyasamy 2018-01-04   37  };
01f50d69 Sriram Periyasamy 2018-01-04   38  
01f50d69 Sriram Periyasamy 2018-01-04   39  static int skl_get_clk_type(u32 index)
01f50d69 Sriram Periyasamy 2018-01-04   40  {
01f50d69 Sriram Periyasamy 2018-01-04   41  	switch (index) {
01f50d69 Sriram Periyasamy 2018-01-04   42  	case 0 ... (SKL_SCLK_OFS - 1):
01f50d69 Sriram Periyasamy 2018-01-04   43  		return SKL_MCLK;
01f50d69 Sriram Periyasamy 2018-01-04   44  
01f50d69 Sriram Periyasamy 2018-01-04   45  	case SKL_SCLK_OFS ... (SKL_SCLKFS_OFS - 1):
01f50d69 Sriram Periyasamy 2018-01-04   46  		return SKL_SCLK;
01f50d69 Sriram Periyasamy 2018-01-04   47  
01f50d69 Sriram Periyasamy 2018-01-04   48  	case SKL_SCLKFS_OFS ... (SKL_MAX_CLK_CNT - 1):
01f50d69 Sriram Periyasamy 2018-01-04   49  		return SKL_SCLK_FS;
01f50d69 Sriram Periyasamy 2018-01-04   50  
01f50d69 Sriram Periyasamy 2018-01-04   51  	default:
01f50d69 Sriram Periyasamy 2018-01-04   52  		return -EINVAL;
01f50d69 Sriram Periyasamy 2018-01-04   53  	}
01f50d69 Sriram Periyasamy 2018-01-04   54  }
01f50d69 Sriram Periyasamy 2018-01-04   55  
01f50d69 Sriram Periyasamy 2018-01-04   56  static int skl_get_vbus_id(u32 index, u8 clk_type)
01f50d69 Sriram Periyasamy 2018-01-04   57  {
01f50d69 Sriram Periyasamy 2018-01-04   58  	switch (clk_type) {
01f50d69 Sriram Periyasamy 2018-01-04   59  	case SKL_MCLK:
01f50d69 Sriram Periyasamy 2018-01-04   60  		return index;
01f50d69 Sriram Periyasamy 2018-01-04   61  
01f50d69 Sriram Periyasamy 2018-01-04   62  	case SKL_SCLK:
01f50d69 Sriram Periyasamy 2018-01-04   63  		return index - SKL_SCLK_OFS;
01f50d69 Sriram Periyasamy 2018-01-04   64  
01f50d69 Sriram Periyasamy 2018-01-04   65  	case SKL_SCLK_FS:
01f50d69 Sriram Periyasamy 2018-01-04   66  		return index - SKL_SCLKFS_OFS;
01f50d69 Sriram Periyasamy 2018-01-04   67  
01f50d69 Sriram Periyasamy 2018-01-04   68  	default:
01f50d69 Sriram Periyasamy 2018-01-04   69  		return -EINVAL;
01f50d69 Sriram Periyasamy 2018-01-04   70  	}
01f50d69 Sriram Periyasamy 2018-01-04   71  }
01f50d69 Sriram Periyasamy 2018-01-04   72  
01f50d69 Sriram Periyasamy 2018-01-04   73  static void skl_fill_clk_ipc(struct skl_clk_rate_cfg_table *rcfg, u8 clk_type)
01f50d69 Sriram Periyasamy 2018-01-04   74  {
01f50d69 Sriram Periyasamy 2018-01-04   75  	struct nhlt_fmt_cfg *fmt_cfg;
01f50d69 Sriram Periyasamy 2018-01-04   76  	union skl_clk_ctrl_ipc *ipc;
01f50d69 Sriram Periyasamy 2018-01-04   77  	struct wav_fmt *wfmt;
01f50d69 Sriram Periyasamy 2018-01-04   78  
01f50d69 Sriram Periyasamy 2018-01-04   79  	if (!rcfg)
01f50d69 Sriram Periyasamy 2018-01-04   80  		return;
01f50d69 Sriram Periyasamy 2018-01-04   81  
01f50d69 Sriram Periyasamy 2018-01-04   82  	ipc = &rcfg->dma_ctl_ipc;
01f50d69 Sriram Periyasamy 2018-01-04   83  	if (clk_type == SKL_SCLK_FS) {
01f50d69 Sriram Periyasamy 2018-01-04   84  		fmt_cfg = (struct nhlt_fmt_cfg *)rcfg->config;
01f50d69 Sriram Periyasamy 2018-01-04   85  		wfmt = &fmt_cfg->fmt_ext.fmt;
01f50d69 Sriram Periyasamy 2018-01-04   86  
01f50d69 Sriram Periyasamy 2018-01-04   87  		/* Remove TLV Header size */
01f50d69 Sriram Periyasamy 2018-01-04   88  		ipc->sclk_fs.hdr.size = sizeof(struct skl_dmactrl_sclkfs_cfg) -
01f50d69 Sriram Periyasamy 2018-01-04   89  						sizeof(struct skl_tlv_hdr);
01f50d69 Sriram Periyasamy 2018-01-04   90  		ipc->sclk_fs.sampling_frequency = wfmt->samples_per_sec;
01f50d69 Sriram Periyasamy 2018-01-04   91  		ipc->sclk_fs.bit_depth = wfmt->bits_per_sample;
01f50d69 Sriram Periyasamy 2018-01-04   92  		ipc->sclk_fs.valid_bit_depth =
01f50d69 Sriram Periyasamy 2018-01-04   93  			fmt_cfg->fmt_ext.sample.valid_bits_per_sample;
01f50d69 Sriram Periyasamy 2018-01-04   94  		ipc->sclk_fs.number_of_channels = wfmt->channels;
01f50d69 Sriram Periyasamy 2018-01-04   95  	} else {
01f50d69 Sriram Periyasamy 2018-01-04   96  		ipc->mclk.hdr.type = DMA_CLK_CONTROLS;
01f50d69 Sriram Periyasamy 2018-01-04   97  		/* Remove TLV Header size */
01f50d69 Sriram Periyasamy 2018-01-04   98  		ipc->mclk.hdr.size = sizeof(struct skl_dmactrl_mclk_cfg) -
01f50d69 Sriram Periyasamy 2018-01-04   99  						sizeof(struct skl_tlv_hdr);
01f50d69 Sriram Periyasamy 2018-01-04  100  	}
01f50d69 Sriram Periyasamy 2018-01-04  101  }
01f50d69 Sriram Periyasamy 2018-01-04  102  
01f50d69 Sriram Periyasamy 2018-01-04  103  /* Sends dma control IPC to turn the clock ON/OFF */
01f50d69 Sriram Periyasamy 2018-01-04  104  static int skl_send_clk_dma_control(struct skl *skl,
01f50d69 Sriram Periyasamy 2018-01-04  105  				struct skl_clk_rate_cfg_table *rcfg,
01f50d69 Sriram Periyasamy 2018-01-04  106  				u32 vbus_id, u8 clk_type,
01f50d69 Sriram Periyasamy 2018-01-04  107  				bool enable)
01f50d69 Sriram Periyasamy 2018-01-04  108  {
01f50d69 Sriram Periyasamy 2018-01-04  109  	struct nhlt_specific_cfg *sp_cfg;
01f50d69 Sriram Periyasamy 2018-01-04  110  	u32 i2s_config_size, node_id = 0;
01f50d69 Sriram Periyasamy 2018-01-04  111  	struct nhlt_fmt_cfg *fmt_cfg;
01f50d69 Sriram Periyasamy 2018-01-04  112  	union skl_clk_ctrl_ipc *ipc;
01f50d69 Sriram Periyasamy 2018-01-04  113  	void *i2s_config = NULL;
01f50d69 Sriram Periyasamy 2018-01-04  114  	u8 *data, size;
01f50d69 Sriram Periyasamy 2018-01-04  115  	int ret;
01f50d69 Sriram Periyasamy 2018-01-04  116  
01f50d69 Sriram Periyasamy 2018-01-04  117  	if (!rcfg)
01f50d69 Sriram Periyasamy 2018-01-04  118  		return -EIO;
01f50d69 Sriram Periyasamy 2018-01-04  119  
01f50d69 Sriram Periyasamy 2018-01-04  120  	ipc = &rcfg->dma_ctl_ipc;
01f50d69 Sriram Periyasamy 2018-01-04  121  	fmt_cfg = (struct nhlt_fmt_cfg *)rcfg->config;
01f50d69 Sriram Periyasamy 2018-01-04  122  	sp_cfg = &fmt_cfg->config;
01f50d69 Sriram Periyasamy 2018-01-04  123  
01f50d69 Sriram Periyasamy 2018-01-04  124  	if (clk_type == SKL_SCLK_FS) {
01f50d69 Sriram Periyasamy 2018-01-04  125  		ipc->sclk_fs.hdr.type =
01f50d69 Sriram Periyasamy 2018-01-04  126  			enable ? DMA_TRANSMITION_START : DMA_TRANSMITION_STOP;
01f50d69 Sriram Periyasamy 2018-01-04  127  		data = (u8 *)&ipc->sclk_fs;
01f50d69 Sriram Periyasamy 2018-01-04  128  		size = sizeof(struct skl_dmactrl_sclkfs_cfg);
01f50d69 Sriram Periyasamy 2018-01-04  129  	} else {
01f50d69 Sriram Periyasamy 2018-01-04  130  		/* 1 to enable mclk, 0 to enable sclk */
01f50d69 Sriram Periyasamy 2018-01-04  131  		if (clk_type == SKL_SCLK)
01f50d69 Sriram Periyasamy 2018-01-04  132  			ipc->mclk.mclk = 0;
01f50d69 Sriram Periyasamy 2018-01-04  133  		else
01f50d69 Sriram Periyasamy 2018-01-04  134  			ipc->mclk.mclk = 1;
01f50d69 Sriram Periyasamy 2018-01-04  135  
01f50d69 Sriram Periyasamy 2018-01-04  136  		ipc->mclk.keep_running = enable;
01f50d69 Sriram Periyasamy 2018-01-04  137  		ipc->mclk.warm_up_over = enable;
01f50d69 Sriram Periyasamy 2018-01-04  138  		ipc->mclk.clk_stop_over = !enable;
01f50d69 Sriram Periyasamy 2018-01-04  139  		data = (u8 *)&ipc->mclk;
01f50d69 Sriram Periyasamy 2018-01-04  140  		size = sizeof(struct skl_dmactrl_mclk_cfg);
01f50d69 Sriram Periyasamy 2018-01-04  141  	}
01f50d69 Sriram Periyasamy 2018-01-04  142  
01f50d69 Sriram Periyasamy 2018-01-04  143  	i2s_config_size = sp_cfg->size + size;
01f50d69 Sriram Periyasamy 2018-01-04  144  	i2s_config = kzalloc(i2s_config_size, GFP_KERNEL);
01f50d69 Sriram Periyasamy 2018-01-04  145  	if (!i2s_config)
01f50d69 Sriram Periyasamy 2018-01-04  146  		return -ENOMEM;
01f50d69 Sriram Periyasamy 2018-01-04  147  
01f50d69 Sriram Periyasamy 2018-01-04  148  	/* copy blob */
01f50d69 Sriram Periyasamy 2018-01-04  149  	memcpy(i2s_config, sp_cfg->caps, sp_cfg->size);
01f50d69 Sriram Periyasamy 2018-01-04  150  
01f50d69 Sriram Periyasamy 2018-01-04  151  	/* copy additional dma controls information */
01f50d69 Sriram Periyasamy 2018-01-04  152  	memcpy(i2s_config + sp_cfg->size, data, size);
01f50d69 Sriram Periyasamy 2018-01-04  153  
01f50d69 Sriram Periyasamy 2018-01-04  154  	node_id = ((SKL_DMA_I2S_LINK_INPUT_CLASS << 8) | (vbus_id << 4));
01f50d69 Sriram Periyasamy 2018-01-04  155  	ret = skl_dsp_set_dma_control(skl->skl_sst, (u32 *)i2s_config,
01f50d69 Sriram Periyasamy 2018-01-04  156  					i2s_config_size, node_id);
01f50d69 Sriram Periyasamy 2018-01-04  157  	kfree(i2s_config);
01f50d69 Sriram Periyasamy 2018-01-04  158  
01f50d69 Sriram Periyasamy 2018-01-04  159  	return ret;
01f50d69 Sriram Periyasamy 2018-01-04  160  }
01f50d69 Sriram Periyasamy 2018-01-04  161  
01f50d69 Sriram Periyasamy 2018-01-04  162  static struct skl_clk_rate_cfg_table *skl_get_rate_cfg(
01f50d69 Sriram Periyasamy 2018-01-04  163  		struct skl_clk_rate_cfg_table *rcfg,
01f50d69 Sriram Periyasamy 2018-01-04  164  				unsigned long rate)
01f50d69 Sriram Periyasamy 2018-01-04  165  {
01f50d69 Sriram Periyasamy 2018-01-04  166  	int i;
01f50d69 Sriram Periyasamy 2018-01-04  167  
01f50d69 Sriram Periyasamy 2018-01-04  168  	for (i = 0; (i < SKL_MAX_CLK_RATES) && rcfg[i].rate; i++) {
01f50d69 Sriram Periyasamy 2018-01-04  169  		if (rcfg[i].rate == rate)
01f50d69 Sriram Periyasamy 2018-01-04  170  			return &rcfg[i];
01f50d69 Sriram Periyasamy 2018-01-04  171  	}
01f50d69 Sriram Periyasamy 2018-01-04  172  
01f50d69 Sriram Periyasamy 2018-01-04  173  	return NULL;
01f50d69 Sriram Periyasamy 2018-01-04  174  }
01f50d69 Sriram Periyasamy 2018-01-04  175  
01f50d69 Sriram Periyasamy 2018-01-04  176  static int skl_clk_change_status(struct skl_clk *clkdev,
01f50d69 Sriram Periyasamy 2018-01-04  177  				bool enable)
01f50d69 Sriram Periyasamy 2018-01-04  178  {
01f50d69 Sriram Periyasamy 2018-01-04  179  	struct skl_clk_rate_cfg_table *rcfg;
01f50d69 Sriram Periyasamy 2018-01-04  180  	int vbus_id, clk_type;
01f50d69 Sriram Periyasamy 2018-01-04  181  
01f50d69 Sriram Periyasamy 2018-01-04  182  	clk_type = skl_get_clk_type(clkdev->id);
01f50d69 Sriram Periyasamy 2018-01-04  183  	if (clk_type < 0)
01f50d69 Sriram Periyasamy 2018-01-04  184  		return clk_type;
01f50d69 Sriram Periyasamy 2018-01-04  185  
01f50d69 Sriram Periyasamy 2018-01-04  186  	vbus_id = skl_get_vbus_id(clkdev->id, clk_type);
01f50d69 Sriram Periyasamy 2018-01-04  187  	if (vbus_id < 0)
01f50d69 Sriram Periyasamy 2018-01-04  188  		return vbus_id;
01f50d69 Sriram Periyasamy 2018-01-04  189  
01f50d69 Sriram Periyasamy 2018-01-04  190  	rcfg = skl_get_rate_cfg(clkdev->pdata->ssp_clks[clkdev->id].rate_cfg,
01f50d69 Sriram Periyasamy 2018-01-04  191  						clkdev->rate);
01f50d69 Sriram Periyasamy 2018-01-04  192  	if (!rcfg)
01f50d69 Sriram Periyasamy 2018-01-04  193  		return -EINVAL;
01f50d69 Sriram Periyasamy 2018-01-04  194  
01f50d69 Sriram Periyasamy 2018-01-04  195  	return skl_send_clk_dma_control(clkdev->pdata->pvt_data, rcfg,
01f50d69 Sriram Periyasamy 2018-01-04  196  					vbus_id, clk_type, enable);
01f50d69 Sriram Periyasamy 2018-01-04  197  }
01f50d69 Sriram Periyasamy 2018-01-04  198  
01f50d69 Sriram Periyasamy 2018-01-04  199  static int skl_clk_prepare(struct clk_hw *hw)
01f50d69 Sriram Periyasamy 2018-01-04  200  {
01f50d69 Sriram Periyasamy 2018-01-04 @201  	struct skl_clk *clkdev = to_skl_clk(hw);
01f50d69 Sriram Periyasamy 2018-01-04  202  
01f50d69 Sriram Periyasamy 2018-01-04  203  	return skl_clk_change_status(clkdev, true);
01f50d69 Sriram Periyasamy 2018-01-04  204  }
01f50d69 Sriram Periyasamy 2018-01-04  205  

:::::: The code at line 18 was first introduced by commit
:::::: 01f50d69bebe1bb0b30bba1eba3cdaf1f02dd7c4 ASoC: Intel: Skylake: Add ssp clock driver

:::::: TO: Sriram Periyasamy <sriramx.periyasamy@...el.com>
:::::: CC: Mark Brown <broonie@...nel.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (56185 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ