CC: [email protected]
CC: [email protected]
TO: Cezary Rojewski <[email protected]>
CC: Mark Brown <[email protected]>

Hi Cezary,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   92477dd1faa650e50bd3bb35a6c0b8d09198cc35
commit: 1b99d50b9709a2cddaba4a7faf1862b4f7bec865 ASoC: Intel: Skylake: Compile 
when any configuration is selected
date:   7 months ago
:::::: branch date: 6 days ago
:::::: commit date: 7 months ago
config: ia64-randconfig-m031-20210927 (attached as .config)
compiler: ia64-linux-gcc (GCC) 11.2.0

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

smatch warnings:
sound/soc/intel/skylake/cnl-sst.c:146 cnl_load_base_firmware() error: we 
previously assumed 'ctx->fw' could be null (see line 130)
sound/soc/intel/skylake/skl-sst-utils.c:406 skl_prepare_lib_load() error: we 
previously assumed 'linfo->fw' could be null (see line 390)
sound/soc/intel/skylake/bxt-sst.c:202 bxt_load_base_firmware() error: we 
previously assumed 'ctx->fw' could be null (see line 187)
sound/soc/intel/skylake/skl-sst.c:96 skl_load_base_firmware() error: we 
previously assumed 'ctx->fw' could be null (see line 76)
sound/soc/intel/skylake/skl.c:967 skl_first_init() warn: 'skl->pci' not 
released on lines: 921,929,947,965.

vim +146 sound/soc/intel/skylake/cnl-sst.c

cb6a552846297094 Guneshwor Singh 2017-08-02  123  
cb6a552846297094 Guneshwor Singh 2017-08-02  124  static int 
cnl_load_base_firmware(struct sst_dsp *ctx)
cb6a552846297094 Guneshwor Singh 2017-08-02  125  {
cb6a552846297094 Guneshwor Singh 2017-08-02  126        struct firmware 
stripped_fw;
bcc2a2dc3ba8c3a7 Cezary Rojewski 2019-07-23  127        struct skl_dev *cnl = 
ctx->thread_context;
024aa45f55ccd407 Cezary Rojewski 2020-03-05  128        int ret, i;
cb6a552846297094 Guneshwor Singh 2017-08-02  129  
cb6a552846297094 Guneshwor Singh 2017-08-02 @130        if (!ctx->fw) {
cb6a552846297094 Guneshwor Singh 2017-08-02  131                ret = 
request_firmware(&ctx->fw, ctx->fw_name, ctx->dev);
cb6a552846297094 Guneshwor Singh 2017-08-02  132                if (ret < 0) {
cb6a552846297094 Guneshwor Singh 2017-08-02  133                        
dev_err(ctx->dev, "request firmware failed: %d\n", ret);
cb6a552846297094 Guneshwor Singh 2017-08-02  134                        goto 
cnl_load_base_firmware_failed;
cb6a552846297094 Guneshwor Singh 2017-08-02  135                }
cb6a552846297094 Guneshwor Singh 2017-08-02  136        }
cb6a552846297094 Guneshwor Singh 2017-08-02  137  
cb6a552846297094 Guneshwor Singh 2017-08-02  138        /* parse uuids if first 
boot */
cb6a552846297094 Guneshwor Singh 2017-08-02  139        if (cnl->is_first_boot) 
{
cb6a552846297094 Guneshwor Singh 2017-08-02  140                ret = 
snd_skl_parse_uuids(ctx, ctx->fw,
cb6a552846297094 Guneshwor Singh 2017-08-02  141                                
          CNL_ADSP_FW_HDR_OFFSET, 0);
cb6a552846297094 Guneshwor Singh 2017-08-02  142                if (ret < 0)
cb6a552846297094 Guneshwor Singh 2017-08-02  143                        goto 
cnl_load_base_firmware_failed;
cb6a552846297094 Guneshwor Singh 2017-08-02  144        }
cb6a552846297094 Guneshwor Singh 2017-08-02  145  
cb6a552846297094 Guneshwor Singh 2017-08-02 @146        stripped_fw.data = 
ctx->fw->data;
cb6a552846297094 Guneshwor Singh 2017-08-02  147        stripped_fw.size = 
ctx->fw->size;
cb6a552846297094 Guneshwor Singh 2017-08-02  148        
skl_dsp_strip_extended_manifest(&stripped_fw);
cb6a552846297094 Guneshwor Singh 2017-08-02  149  
024aa45f55ccd407 Cezary Rojewski 2020-03-05  150        for (i = 0; i < 
BXT_FW_ROM_INIT_RETRY; i++) {
cb6a552846297094 Guneshwor Singh 2017-08-02  151                ret = 
cnl_prepare_fw(ctx, stripped_fw.data, stripped_fw.size);
024aa45f55ccd407 Cezary Rojewski 2020-03-05  152                if (!ret)
024aa45f55ccd407 Cezary Rojewski 2020-03-05  153                        break;
024aa45f55ccd407 Cezary Rojewski 2020-03-05  154                
dev_dbg(ctx->dev, "prepare firmware failed: %d\n", ret);
cb6a552846297094 Guneshwor Singh 2017-08-02  155        }
cb6a552846297094 Guneshwor Singh 2017-08-02  156  
024aa45f55ccd407 Cezary Rojewski 2020-03-05  157        if (ret < 0)
024aa45f55ccd407 Cezary Rojewski 2020-03-05  158                goto 
cnl_load_base_firmware_failed;
024aa45f55ccd407 Cezary Rojewski 2020-03-05  159  
cb6a552846297094 Guneshwor Singh 2017-08-02  160        ret = 
sst_transfer_fw_host_dma(ctx);
cb6a552846297094 Guneshwor Singh 2017-08-02  161        if (ret < 0) {
cb6a552846297094 Guneshwor Singh 2017-08-02  162                
dev_err(ctx->dev, "transfer firmware failed: %d\n", ret);
cb6a552846297094 Guneshwor Singh 2017-08-02  163                
cnl_dsp_disable_core(ctx, SKL_DSP_CORE0_MASK);
cb6a552846297094 Guneshwor Singh 2017-08-02  164                goto 
cnl_load_base_firmware_failed;
cb6a552846297094 Guneshwor Singh 2017-08-02  165        }
cb6a552846297094 Guneshwor Singh 2017-08-02  166  
cb6a552846297094 Guneshwor Singh 2017-08-02  167        ret = 
wait_event_timeout(cnl->boot_wait, cnl->boot_complete,
cb6a552846297094 Guneshwor Singh 2017-08-02  168                                
 msecs_to_jiffies(SKL_IPC_BOOT_MSECS));
cb6a552846297094 Guneshwor Singh 2017-08-02  169        if (ret == 0) {
cb6a552846297094 Guneshwor Singh 2017-08-02  170                
dev_err(ctx->dev, "FW ready timed-out\n");
cb6a552846297094 Guneshwor Singh 2017-08-02  171                
cnl_dsp_disable_core(ctx, SKL_DSP_CORE0_MASK);
cb6a552846297094 Guneshwor Singh 2017-08-02  172                ret = -EIO;
cb6a552846297094 Guneshwor Singh 2017-08-02  173                goto 
cnl_load_base_firmware_failed;
cb6a552846297094 Guneshwor Singh 2017-08-02  174        }
cb6a552846297094 Guneshwor Singh 2017-08-02  175  
cb6a552846297094 Guneshwor Singh 2017-08-02  176        cnl->fw_loaded = true;
cb6a552846297094 Guneshwor Singh 2017-08-02  177  
cb6a552846297094 Guneshwor Singh 2017-08-02  178        return 0;
cb6a552846297094 Guneshwor Singh 2017-08-02  179  
cb6a552846297094 Guneshwor Singh 2017-08-02  180  cnl_load_base_firmware_failed:
024aa45f55ccd407 Cezary Rojewski 2020-03-05  181        dev_err(ctx->dev, 
"firmware load failed: %d\n", ret);
cb6a552846297094 Guneshwor Singh 2017-08-02  182        
release_firmware(ctx->fw);
cb6a552846297094 Guneshwor Singh 2017-08-02  183        ctx->fw = NULL;
cb6a552846297094 Guneshwor Singh 2017-08-02  184  
cb6a552846297094 Guneshwor Singh 2017-08-02  185        return ret;
cb6a552846297094 Guneshwor Singh 2017-08-02  186  }
cb6a552846297094 Guneshwor Singh 2017-08-02  187  

:::::: The code at line 146 was first introduced by commit
:::::: cb6a552846297094aac942a588fe7ed7922a6c11 ASoC: Intel: cnl: Add sst 
library functions for cnl platform

:::::: TO: Guneshwor Singh <[email protected]>
:::::: CC: Mark Brown <[email protected]>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to