CC: [email protected]
CC: [email protected]
BCC: [email protected]
CC: [email protected]
TO: Srinivas Kandagatla <[email protected]>
CC: Mark Brown <[email protected]>
CC: "Pierre-Louis Bossart" <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   b2d229d4ddb17db541098b83524d901257e93845
commit: cf989b68fcadbeeea1446e50fd8b2f24a0f1275c ASoC: qdsp6: audioreach: add 
Kconfig and Makefile
date:   6 months ago
:::::: branch date: 12 hours ago
:::::: commit date: 6 months ago
config: arm-randconfig-c002-20220417 
(https://download.01.org/0day-ci/archive/20220418/[email protected]/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 
64c045e25b8471bbb572bd29159c294a82a86a25)
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
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cf989b68fcadbeeea1446e50fd8b2f24a0f1275c
        git remote add linus 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout cf989b68fcadbeeea1446e50fd8b2f24a0f1275c
        # save the config file to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm 
clang-analyzer 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>


clang-analyzer warnings: (new ones prefixed by >>)
               ^~~~~~~~~~~~~~~~~~~~~
   drivers/iio/industrialio-buffer.c:796:2: note: Taking false branch
           if (compound_mask == NULL)
           ^
   drivers/iio/industrialio-buffer.c:801:2: note: Left side of '&&' is false
           list_for_each_entry(buffer, &iio_dev_opaque->buffer_list, 
buffer_list) {
           ^
   include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
           for (pos = list_first_entry(head, typeof(*pos), member);        \
                      ^
   include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
           list_entry((ptr)->next, type, member)
           ^
   include/linux/list.h:511:2: note: expanded from macro 'list_entry'
           container_of(ptr, type, member)
           ^
   include/linux/kernel.h:495:61: note: expanded from macro 'container_of'
           BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) &&   \
                                                                      ^
   drivers/iio/industrialio-buffer.c:801:2: note: Taking false branch
           list_for_each_entry(buffer, &iio_dev_opaque->buffer_list, 
buffer_list) {
           ^
   include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
           for (pos = list_first_entry(head, typeof(*pos), member);        \
                      ^
   include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
           list_entry((ptr)->next, type, member)
           ^
   include/linux/list.h:511:2: note: expanded from macro 'list_entry'
           container_of(ptr, type, member)
           ^
   note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to 
see all)
   include/linux/compiler_types.h:322:2: note: expanded from macro 
'compiletime_assert'
           _compiletime_assert(condition, msg, __compiletime_assert_, 
__COUNTER__)
           ^
   include/linux/compiler_types.h:310:2: note: expanded from macro 
'_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
           ^
   include/linux/compiler_types.h:302:3: note: expanded from macro 
'__compiletime_assert'
                   if (!(condition))                                       \
                   ^
   drivers/iio/industrialio-buffer.c:801:2: note: Loop condition is false.  
Exiting loop
           list_for_each_entry(buffer, &iio_dev_opaque->buffer_list, 
buffer_list) {
           ^
   include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
           for (pos = list_first_entry(head, typeof(*pos), member);        \
                      ^
   include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
           list_entry((ptr)->next, type, member)
           ^
   include/linux/list.h:511:2: note: expanded from macro 'list_entry'
           container_of(ptr, type, member)
           ^
   note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to 
see all)
   include/linux/compiler_types.h:322:2: note: expanded from macro 
'compiletime_assert'
           _compiletime_assert(condition, msg, __compiletime_assert_, 
__COUNTER__)
           ^
   include/linux/compiler_types.h:310:2: note: expanded from macro 
'_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
           ^
   include/linux/compiler_types.h:300:2: note: expanded from macro 
'__compiletime_assert'
           do {                                                            \
           ^
   drivers/iio/industrialio-buffer.c:801:22: note: Value assigned to 'buffer'
           list_for_each_entry(buffer, &iio_dev_opaque->buffer_list, 
buffer_list) {
                               ^
   include/linux/list.h:628:7: note: expanded from macro 'list_for_each_entry'
           for (pos = list_first_entry(head, typeof(*pos), member);        \
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/iio/industrialio-buffer.c:801:2: note: Loop condition is true.  
Entering loop body
           list_for_each_entry(buffer, &iio_dev_opaque->buffer_list, 
buffer_list) {
           ^
   include/linux/list.h:628:2: note: expanded from macro 'list_for_each_entry'
           for (pos = list_first_entry(head, typeof(*pos), member);        \
           ^
   drivers/iio/industrialio-buffer.c:802:7: note: Assuming 'buffer' is equal to 
'remove_buffer'
                   if (buffer == remove_buffer)
                       ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/iio/industrialio-buffer.c:802:3: note: Taking true branch
                   if (buffer == remove_buffer)
                   ^
   drivers/iio/industrialio-buffer.c:803:4: note:  Execution continues on line 
801
                           continue;
                           ^
   drivers/iio/industrialio-buffer.c:801:2: note: Dereference of null pointer
           list_for_each_entry(buffer, &iio_dev_opaque->buffer_list, 
buffer_list) {
           ^
   include/linux/list.h:630:13: note: expanded from macro 'list_for_each_entry'
                pos = list_next_entry(pos, member))
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:555:2: note: expanded from macro 'list_next_entry'
           list_entry((pos)->member.next, typeof(*(pos)), member)
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:511:2: note: expanded from macro 'list_entry'
           container_of(ptr, type, member)
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:494:25: note: expanded from macro 'container_of'
           void *__mptr = (void *)(ptr);                                   \
                                  ^~~~~
   2 warnings generated.
>> sound/soc/qcom/qdsp6/audioreach.c:500:36: warning: Division by zero 
>> [clang-analyzer-core.DivideZero]
           num_modules_per_list = num_modules/num_containers;
                                  ~~~~~~~~~~~^~~~~~~~~~~~~~~
   sound/soc/qcom/qdsp6/audioreach.c:480:2: note: 'num_containers' initialized 
to 0
           int num_containers = 0;
           ^~~~~~~~~~~~~~~~~~
   sound/soc/qcom/qdsp6/audioreach.c:487:2: note: Left side of '&&' is false
           list_for_each_entry(sgs, sg_list, node) {
           ^
   include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
           for (pos = list_first_entry(head, typeof(*pos), member);        \
                      ^
   include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
           list_entry((ptr)->next, type, member)
           ^
   include/linux/list.h:511:2: note: expanded from macro 'list_entry'
           container_of(ptr, type, member)
           ^
   include/linux/kernel.h:495:61: note: expanded from macro 'container_of'
           BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) &&   \
                                                                      ^
   sound/soc/qcom/qdsp6/audioreach.c:487:2: note: Taking false branch
           list_for_each_entry(sgs, sg_list, node) {
           ^
   include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
           for (pos = list_first_entry(head, typeof(*pos), member);        \
                      ^
   include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
           list_entry((ptr)->next, type, member)
           ^
   include/linux/list.h:511:2: note: expanded from macro 'list_entry'
           container_of(ptr, type, member)
           ^
   note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to 
see all)
   include/linux/compiler_types.h:322:2: note: expanded from macro 
'compiletime_assert'
           _compiletime_assert(condition, msg, __compiletime_assert_, 
__COUNTER__)
           ^
   include/linux/compiler_types.h:310:2: note: expanded from macro 
'_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
           ^
   include/linux/compiler_types.h:302:3: note: expanded from macro 
'__compiletime_assert'
                   if (!(condition))                                       \
                   ^
   sound/soc/qcom/qdsp6/audioreach.c:487:2: note: Loop condition is false.  
Exiting loop
           list_for_each_entry(sgs, sg_list, node) {
           ^
   include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
           for (pos = list_first_entry(head, typeof(*pos), member);        \
                      ^
   include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
           list_entry((ptr)->next, type, member)
           ^
   include/linux/list.h:511:2: note: expanded from macro 'list_entry'
           container_of(ptr, type, member)
           ^
   note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to 
see all)
   include/linux/compiler_types.h:322:2: note: expanded from macro 
'compiletime_assert'
           _compiletime_assert(condition, msg, __compiletime_assert_, 
__COUNTER__)
           ^
   include/linux/compiler_types.h:310:2: note: expanded from macro 
'_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
           ^
   include/linux/compiler_types.h:300:2: note: expanded from macro 
'__compiletime_assert'
           do {                                                            \
           ^
   sound/soc/qcom/qdsp6/audioreach.c:487:2: note: Loop condition is false. 
Execution continues on line 499
           list_for_each_entry(sgs, sg_list, node) {
           ^
   include/linux/list.h:628:2: note: expanded from macro 'list_for_each_entry'
           for (pos = list_first_entry(head, typeof(*pos), member);        \
           ^
   sound/soc/qcom/qdsp6/audioreach.c:500:36: note: Division by zero
           num_modules_per_list = num_modules/num_containers;
                                  ~~~~~~~~~~~^~~~~~~~~~~~~~~
>> sound/soc/qcom/qdsp6/audioreach.c:558:2: warning: Value stored to 'p' is 
>> never read [clang-analyzer-deadcode.DeadStores]
           p += mc_sz;
           ^    ~~~~~
   sound/soc/qcom/qdsp6/audioreach.c:558:2: note: Value stored to 'p' is never 
read
           p += mc_sz;
           ^    ~~~~~
   1 warning generated.
   Suppressed 1 warnings (1 with check filters).
   2 warnings generated.
   Suppressed 2 warnings (1 in non-user code, 1 with check filters).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   3 warnings generated.
   net/sched/sch_fq_codel.c:196:11: warning: The left operand of '&' is a 
garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult]
                   if (ret & __NET_XMIT_BYPASS)
                       ~~~ ^
   net/sched/sch_fq_codel.c:190:2: note: 'ret' declared without an initial value
           int ret;
           ^~~~~~~
   net/sched/sch_fq_codel.c:194:8: note: Calling 'fq_codel_classify'
           idx = fq_codel_classify(skb, sch, &ret);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   net/sched/sch_fq_codel.c:84:6: note: Assuming the condition is false
           if (TC_H_MAJ(skb->priority) == sch->handle &&
               ^
   include/uapi/linux/pkt_sched.h:70:21: note: expanded from macro 'TC_H_MAJ'
   #define TC_H_MAJ(h) ((h)&TC_H_MAJ_MASK)
                       ^
   net/sched/sch_fq_codel.c:84:45: note: Left side of '&&' is false
           if (TC_H_MAJ(skb->priority) == sch->handle &&
                                                      ^
   net/sched/sch_fq_codel.c:89:11: note: Left side of '||' is false
           filter = rcu_dereference_bh(q->filter_list);
                    ^
   include/linux/rcupdate.h:604:31: note: expanded from macro 
'rcu_dereference_bh'
   #define rcu_dereference_bh(p) rcu_dereference_bh_check(p, 0)
                                 ^
   include/linux/rcupdate.h:543:2: note: expanded from macro 
'rcu_dereference_bh_check'
           __rcu_dereference_check((p), (c) || rcu_read_lock_bh_held(), __rcu)
           ^
   include/linux/rcupdate.h:389:48: note: expanded from macro 
'__rcu_dereference_check'
           typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
                                                         ^
   include/asm-generic/rwonce.h:49:2: note: expanded from macro 'READ_ONCE'
           compiletime_assert_rwonce_type(x);                              \
           ^
   include/asm-generic/rwonce.h:36:21: note: expanded from macro 
'compiletime_assert_rwonce_type'
           compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long 
long),  \
                              ^
   include/linux/compiler_types.h:290:3: note: expanded from macro 
'__native_word'
           (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \
            ^
   net/sched/sch_fq_codel.c:89:11: note: Left side of '||' is false
           filter = rcu_dereference_bh(q->filter_list);
                    ^
   include/linux/rcupdate.h:604:31: note: expanded from macro 
'rcu_dereference_bh'
   #define rcu_dereference_bh(p) rcu_dereference_bh_check(p, 0)
                                 ^
   include/linux/rcupdate.h:543:2: note: expanded from macro 
'rcu_dereference_bh_check'
           __rcu_dereference_check((p), (c) || rcu_read_lock_bh_held(), __rcu)
           ^
   include/linux/rcupdate.h:389:48: note: expanded from macro 
'__rcu_dereference_check'
           typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
                                                         ^
   include/asm-generic/rwonce.h:49:2: note: expanded from macro 'READ_ONCE'
           compiletime_assert_rwonce_type(x);                              \
           ^
   include/asm-generic/rwonce.h:36:21: note: expanded from macro 
'compiletime_assert_rwonce_type'
           compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long 
long),  \
                              ^
   include/linux/compiler_types.h:290:3: note: expanded from macro 
'__native_word'
           (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \
            ^
   net/sched/sch_fq_codel.c:89:11: note: Left side of '||' is true
           filter = rcu_dereference_bh(q->filter_list);
                    ^
   include/linux/rcupdate.h:604:31: note: expanded from macro 
'rcu_dereference_bh'
   #define rcu_dereference_bh(p) rcu_dereference_bh_check(p, 0)
                                 ^
   include/linux/rcupdate.h:543:2: note: expanded from macro 
'rcu_dereference_bh_check'
           __rcu_dereference_check((p), (c) || rcu_read_lock_bh_held(), __rcu)
           ^
   include/linux/rcupdate.h:389:48: note: expanded from macro 
'__rcu_dereference_check'
           typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
                                                         ^
   include/asm-generic/rwonce.h:49:2: note: expanded from macro 'READ_ONCE'
           compiletime_assert_rwonce_type(x);                              \
           ^
   include/asm-generic/rwonce.h:36:21: note: expanded from macro 
'compiletime_assert_rwonce_type'
           compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long 
long),  \
                              ^
   include/linux/compiler_types.h:291:28: note: expanded from macro 
'__native_word'
            sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
                                     ^
   net/sched/sch_fq_codel.c:89:11: note: Taking false branch
           filter = rcu_dereference_bh(q->filter_list);
                    ^
   include/linux/rcupdate.h:604:31: note: expanded from macro 
'rcu_dereference_bh'
   #define rcu_dereference_bh(p) rcu_dereference_bh_check(p, 0)
                                 ^
   include/linux/rcupdate.h:543:2: note: expanded from macro 
'rcu_dereference_bh_check'
           __rcu_dereference_check((p), (c) || rcu_read_lock_bh_held(), __rcu)

vim +500 sound/soc/qcom/qdsp6/audioreach.c

5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  464  
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  465  void 
*audioreach_alloc_graph_pkt(struct q6apm *apm, struct list_head *sg_list, int 
graph_id)
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  466  {
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  467     int payload_size, 
sg_sz, cont_sz, ml_sz, mp_sz, mc_sz;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  468     struct 
apm_module_param_data  *param_data;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  469     struct 
apm_container_params *cont_params;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  470     struct 
audioreach_container *container;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  471     struct 
apm_sub_graph_params *sg_params;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  472     struct 
apm_mod_conn_list_params *mcon;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  473     struct 
apm_graph_open_params params;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  474     struct 
apm_prop_list_params *mprop;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  475     struct 
audioreach_module *module;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  476     struct 
audioreach_sub_graph *sgs;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  477     struct apm_mod_list_obj 
*mlobj;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  478     int 
num_modules_per_list;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  479     int num_connections = 0;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  480     int num_containers = 0;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  481     int num_sub_graphs = 0;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  482     int num_modules = 0;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  483     int num_modules_list;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  484     struct gpr_pkt *pkt;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  485     void *p;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  486  
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26 @487     
list_for_each_entry(sgs, sg_list, node) {
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  488             
num_sub_graphs++;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  489             
list_for_each_entry(container, &sgs->container_list, node) {
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  490                     
num_containers++;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  491                     
num_modules += container->num_modules;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  492                     
list_for_each_container_module(module, container) {
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  493                             
if (module->src_mod_inst_id)
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  494                             
        num_connections++;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  495                     }
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  496             }
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  497     }
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  498  
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  499     num_modules_list = 
num_containers;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26 @500     num_modules_per_list = 
num_modules/num_containers;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  501     sg_sz = 
APM_SUB_GRAPH_PSIZE(sg_params, num_sub_graphs);
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  502     cont_sz = 
APM_CONTAINER_PSIZE(cont_params, num_containers);
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  503     ml_sz = 
ALIGN(sizeof(struct apm_module_list_params) +
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  504             
num_modules_list * APM_MOD_LIST_OBJ_PSIZE(mlobj,  num_modules_per_list), 8);
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  505     mp_sz = 
APM_MOD_PROP_PSIZE(mprop, num_modules);
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  506     mc_sz = 
APM_MOD_CONN_PSIZE(mcon, num_connections);
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  507  
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  508     payload_size = sg_sz + 
cont_sz + ml_sz + mp_sz + mc_sz;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  509     pkt = 
audioreach_alloc_apm_cmd_pkt(payload_size, APM_CMD_GRAPH_OPEN, 0);
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  510     if (IS_ERR(pkt))
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  511             return pkt;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  512  
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  513     p = (void *)pkt + 
GPR_HDR_SIZE + APM_CMD_HDR_SIZE;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  514  
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  515     /* SubGraph */
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  516     params.sg_data = p;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  517     param_data = 
&params.sg_data->param_data;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  518     
param_data->module_instance_id = APM_MODULE_INSTANCE_ID;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  519     param_data->param_id = 
APM_PARAM_ID_SUB_GRAPH_CONFIG;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  520     param_data->param_size 
= sg_sz - APM_MODULE_PARAM_DATA_SIZE;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  521     
params.sg_data->num_sub_graphs = num_sub_graphs;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  522     p += sg_sz;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  523  
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  524     /* Container */
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  525     params.cont_data = p;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  526     param_data = 
&params.cont_data->param_data;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  527     
param_data->module_instance_id = APM_MODULE_INSTANCE_ID;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  528     param_data->param_id = 
APM_PARAM_ID_CONTAINER_CONFIG;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  529     param_data->param_size 
= cont_sz - APM_MODULE_PARAM_DATA_SIZE;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  530     
params.cont_data->num_containers = num_containers;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  531     p += cont_sz;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  532  
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  533     /* Module List*/
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  534     params.mod_list_data = 
p;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  535     param_data = 
&params.mod_list_data->param_data;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  536     
param_data->module_instance_id = APM_MODULE_INSTANCE_ID;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  537     param_data->param_id = 
APM_PARAM_ID_MODULE_LIST;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  538     param_data->param_size 
= ml_sz - APM_MODULE_PARAM_DATA_SIZE;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  539     
params.mod_list_data->num_modules_list = num_sub_graphs;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  540     p += ml_sz;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  541  
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  542     /* Module Properties */
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  543     params.mod_prop_data = 
p;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  544     param_data = 
&params.mod_prop_data->param_data;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  545     
param_data->module_instance_id = APM_MODULE_INSTANCE_ID;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  546     param_data->param_id = 
APM_PARAM_ID_MODULE_PROP;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  547     param_data->param_size 
= mp_sz - APM_MODULE_PARAM_DATA_SIZE;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  548     
params.mod_prop_data->num_modules_prop_cfg = num_modules;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  549     p += mp_sz;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  550  
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  551     /* Module Connections */
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  552     
params.mod_conn_list_data = p;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  553     param_data = 
&params.mod_conn_list_data->param_data;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  554     
param_data->module_instance_id = APM_MODULE_INSTANCE_ID;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  555     param_data->param_id = 
APM_PARAM_ID_MODULE_CONN;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  556     param_data->param_size 
= mc_sz - APM_MODULE_PARAM_DATA_SIZE;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  557     
params.mod_conn_list_data->num_connections = num_connections;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26 @558     p += mc_sz;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  559  
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  560     
audioreach_populate_graph(&params, sg_list, num_sub_graphs);
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  561  
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  562     return pkt;
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  563  }
5477518b8a0e8a4 Srinivas Kandagatla 2021-10-26  564  
EXPORT_SYMBOL_GPL(audioreach_alloc_graph_pkt);
25ab80db6b133c2 Srinivas Kandagatla 2021-10-26  565  

:::::: The code at line 500 was first introduced by commit
:::::: 5477518b8a0e8a45239646acd80c9bafc4401522 ASoC: qdsp6: audioreach: add 
q6apm support

:::::: TO: Srinivas Kandagatla <[email protected]>
:::::: CC: Mark Brown <[email protected]>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to