mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Krzysztof Kozlowski <krzk@kernel.org>
Subject: [krzk-github:n/sm8450 44/54] sound/soc/qcom/qdsp6/audioreach.c:440:13: warning: variable 'graph_id' set but not used
Date: Wed, 26 Oct 2022 00:57:58 +0800	[thread overview]
Message-ID: <202210260040.Ys96qi23-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 6031 bytes --]

tree:   https://github.com/krzk/linux n/sm8450
head:   4362bc5a775e83575c8b9206ec07286f590bcb62
commit: a5fec2296aef6819a29e32dc26c142f7ee689194 [44/54] ASoC: qdsp6: audioreach: Simplify handing FE and BE graph connections
config: loongarch-allyesconfig (attached as .config)
compiler: loongarch64-linux-gcc (GCC) 12.1.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://github.com/krzk/linux/commit/a5fec2296aef6819a29e32dc26c142f7ee689194
        git remote add krzk-github https://github.com/krzk/linux
        git fetch --no-tags krzk-github n/sm8450
        git checkout a5fec2296aef6819a29e32dc26c142f7ee689194
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch SHELL=/bin/bash sound/soc/qcom/qdsp6/

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

All warnings (new ones prefixed by >>):

   sound/soc/qcom/qdsp6/audioreach.c: In function 'audioreach_alloc_graph_pkt':
>> sound/soc/qcom/qdsp6/audioreach.c:440:13: warning: variable 'graph_id' set but not used [-Wunused-but-set-variable]
     440 |         int graph_id;
         |             ^~~~~~~~


vim +/graph_id +440 sound/soc/qcom/qdsp6/audioreach.c

   418	
   419	void *audioreach_alloc_graph_pkt(struct q6apm *apm, struct audioreach_graph_info *info)
   420	{
   421		int payload_size, sg_sz, cont_sz, ml_sz, mp_sz, mc_sz;
   422		struct apm_module_param_data  *param_data;
   423		struct apm_container_params *cont_params;
   424		struct audioreach_container *container;
   425		struct apm_sub_graph_params *sg_params;
   426		struct apm_mod_conn_list_params *mcon;
   427		struct apm_graph_open_params params;
   428		struct apm_prop_list_params *mprop;
   429		struct audioreach_module *module;
   430		struct audioreach_sub_graph *sgs;
   431		struct apm_mod_list_obj *mlobj;
   432		struct list_head *sg_list;
   433		int num_modules_per_list;
   434		int num_connections = 0;
   435		int num_containers = 0;
   436		int num_sub_graphs = 0;
   437		int num_modules = 0;
   438		int num_modules_list;
   439		struct gpr_pkt *pkt;
 > 440		int graph_id;
   441		void *p;
   442	
   443		graph_id = info->id;
   444		sg_list = &info->sg_list;
   445		ml_sz = 0;
   446	
   447		/* add FE-BE connections */
   448		if (info->dst_mod_inst_id && info->src_mod_inst_id)
   449			num_connections++;
   450	
   451		list_for_each_entry(sgs, sg_list, node) {
   452			num_sub_graphs++;
   453			list_for_each_entry(container, &sgs->container_list, node) {
   454				num_containers++;
   455				num_modules += container->num_modules;
   456				list_for_each_entry(module, &container->modules_list, node) {
   457					if (module->src_mod_inst_id)
   458						num_connections++;
   459				}
   460			}
   461		}
   462	
   463		num_modules_list = num_containers;
   464		num_modules_per_list = num_modules/num_containers;
   465		sg_sz = APM_SUB_GRAPH_PSIZE(sg_params, num_sub_graphs);
   466		cont_sz = APM_CONTAINER_PSIZE(cont_params, num_containers);
   467		ml_sz =	ALIGN(sizeof(struct apm_module_list_params) +
   468			num_modules_list * APM_MOD_LIST_OBJ_PSIZE(mlobj,  num_modules_per_list), 8);
   469		mp_sz = APM_MOD_PROP_PSIZE(mprop, num_modules);
   470		mc_sz =	APM_MOD_CONN_PSIZE(mcon, num_connections);
   471	
   472		payload_size = sg_sz + cont_sz + ml_sz + mp_sz + mc_sz;
   473		pkt = audioreach_alloc_apm_cmd_pkt(payload_size, APM_CMD_GRAPH_OPEN, 0);
   474		if (IS_ERR(pkt))
   475			return pkt;
   476	
   477		p = (void *)pkt + GPR_HDR_SIZE + APM_CMD_HDR_SIZE;
   478	
   479		/* SubGraph */
   480		params.sg_data = p;
   481		param_data = &params.sg_data->param_data;
   482		param_data->module_instance_id = APM_MODULE_INSTANCE_ID;
   483		param_data->param_id = APM_PARAM_ID_SUB_GRAPH_CONFIG;
   484		param_data->param_size = sg_sz - APM_MODULE_PARAM_DATA_SIZE;
   485		params.sg_data->num_sub_graphs = num_sub_graphs;
   486		p += sg_sz;
   487	
   488		/* Container */
   489		params.cont_data = p;
   490		param_data = &params.cont_data->param_data;
   491		param_data->module_instance_id = APM_MODULE_INSTANCE_ID;
   492		param_data->param_id = APM_PARAM_ID_CONTAINER_CONFIG;
   493		param_data->param_size = cont_sz - APM_MODULE_PARAM_DATA_SIZE;
   494		params.cont_data->num_containers = num_containers;
   495		p += cont_sz;
   496	
   497		/* Module List*/
   498		params.mod_list_data = p;
   499		param_data = &params.mod_list_data->param_data;
   500		param_data->module_instance_id = APM_MODULE_INSTANCE_ID;
   501		param_data->param_id = APM_PARAM_ID_MODULE_LIST;
   502		param_data->param_size = ml_sz - APM_MODULE_PARAM_DATA_SIZE;
   503		params.mod_list_data->num_modules_list = num_sub_graphs;
   504		p += ml_sz;
   505	
   506		/* Module Properties */
   507		params.mod_prop_data = p;
   508		param_data = &params.mod_prop_data->param_data;
   509		param_data->module_instance_id = APM_MODULE_INSTANCE_ID;
   510		param_data->param_id = APM_PARAM_ID_MODULE_PROP;
   511		param_data->param_size = mp_sz - APM_MODULE_PARAM_DATA_SIZE;
   512		params.mod_prop_data->num_modules_prop_cfg = num_modules;
   513		p += mp_sz;
   514	
   515		/* Module Connections */
   516		params.mod_conn_list_data = p;
   517		param_data = &params.mod_conn_list_data->param_data;
   518		param_data->module_instance_id = APM_MODULE_INSTANCE_ID;
   519		param_data->param_id = APM_PARAM_ID_MODULE_CONN;
   520		param_data->param_size = mc_sz - APM_MODULE_PARAM_DATA_SIZE;
   521		params.mod_conn_list_data->num_connections = num_connections;
   522		p += mc_sz;
   523	
   524		audioreach_populate_graph(apm, info, &params, sg_list, num_sub_graphs);
   525	
   526		return pkt;
   527	}
   528	EXPORT_SYMBOL_GPL(audioreach_alloc_graph_pkt);
   529	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 76615 bytes --]

                 reply	other threads:[~2022-10-25 16:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202210260040.Ys96qi23-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=krzk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=srinivas.kandagatla@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®