Alsa-Devel Archive on lore.kernel.org
 help / color / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Hui Wang <hui.wang@canonical.com>,
	alsa-devel@alsa-project.org, broonie@kernel.org,
	Vijendar.Mukunda@amd.com
Cc: kbuild-all@lists.01.org
Subject: Re: [PATCH v2] ASoC: amd: put off registering mach platform_dev to avoid -517 err
Date: Sat, 23 May 2020 03:10:38 +0800
Message-ID: <202005230348.CRSVXs2s%lkp@intel.com> (raw)
In-Reply-To: <20200522081738.11636-1-hui.wang@canonical.com>


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

Hi Hui,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on asoc/for-next]
[also build test WARNING on next-20200522]
[cannot apply to v5.7-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Hui-Wang/ASoC-amd-put-off-registering-mach-platform_dev-to-avoid-517-err/20200522-162223
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-193-gb8fad4bc-dirty
        # save the attached .config to linux build tree
        make W=1 C=1 ARCH=x86_64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

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


sparse warnings: (new ones prefixed by >>)

>> sound/soc/amd/renoir/acp3x-pdm-dma.c:405:49: sparse: sparse: Using plain integer as NULL pointer

vim +405 sound/soc/amd/renoir/acp3x-pdm-dma.c

   398	
   399	static int acp_pdm_audio_probe(struct platform_device *pdev)
   400	{
   401		struct resource *res;
   402		struct pdm_dev_data *adata;
   403		unsigned int irqflags;
   404		int status;
 > 405		struct platform_device_info pdevinfo = {0};
   406	
   407		if (!pdev->dev.platform_data) {
   408			dev_err(&pdev->dev, "platform_data not retrieved\n");
   409			return -ENODEV;
   410		}
   411		irqflags = *((unsigned int *)(pdev->dev.platform_data));
   412	
   413		res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
   414		if (!res) {
   415			dev_err(&pdev->dev, "IORESOURCE_MEM FAILED\n");
   416			return -ENODEV;
   417		}
   418	
   419		adata = devm_kzalloc(&pdev->dev, sizeof(*adata), GFP_KERNEL);
   420		if (!adata)
   421			return -ENOMEM;
   422	
   423		adata->acp_base = devm_ioremap(&pdev->dev, res->start,
   424					       resource_size(res));
   425		if (!adata->acp_base)
   426			return -ENOMEM;
   427	
   428		res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
   429		if (!res) {
   430			dev_err(&pdev->dev, "IORESOURCE_IRQ FAILED\n");
   431			return -ENODEV;
   432		}
   433	
   434		adata->pdm_irq = res->start;
   435		adata->capture_stream = NULL;
   436	
   437		dev_set_drvdata(&pdev->dev, adata);
   438		status = devm_snd_soc_register_component(&pdev->dev,
   439							 &acp_pdm_component,
   440							 &acp_pdm_dai_driver, 1);
   441		if (status) {
   442			dev_err(&pdev->dev, "Fail to register acp pdm dai\n");
   443	
   444			return -ENODEV;
   445		}
   446		status = devm_request_irq(&pdev->dev, adata->pdm_irq, pdm_irq_handler,
   447					  irqflags, "ACP_PDM_IRQ", adata);
   448		if (status) {
   449			dev_err(&pdev->dev, "ACP PDM IRQ request failed\n");
   450			return -ENODEV;
   451		}
   452	
   453		pdevinfo.name = "acp_pdm_mach";
   454		pdevinfo.id = 0;
   455		pdevinfo.parent = &pdev->dev;
   456		adata->m_pdev = platform_device_register_full(&pdevinfo);
   457		if (IS_ERR(adata->m_pdev)) {
   458			dev_err(&pdev->dev, "cannot register %s device\n",
   459				pdevinfo.name);
   460			return PTR_ERR(adata->m_pdev);
   461		}
   462		pm_runtime_set_autosuspend_delay(&pdev->dev, ACP_SUSPEND_DELAY_MS);
   463		pm_runtime_use_autosuspend(&pdev->dev);
   464		pm_runtime_enable(&pdev->dev);
   465		pm_runtime_allow(&pdev->dev);
   466		return 0;
   467	}
   468	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

      parent reply index

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-22  8:17 Hui Wang
2020-05-22  9:16 ` Mukunda, Vijendar
2020-05-22 11:08 ` Mark Brown
2020-05-22 11:13   ` Mukunda, Vijendar
2020-05-22 11:22     ` Mark Brown
2020-05-22 11:28       ` Mukunda, Vijendar
2020-05-22 12:59         ` Hui Wang
2020-05-22 13:57           ` Hui Wang
2020-05-22 14:30             ` Mukunda, Vijendar
2020-05-22 15:14               ` Mukunda, Vijendar
2020-05-22 15:32                 ` Mark Brown
2020-05-23  0:11                   ` Mukunda, Vijendar
2020-05-25  3:32                     ` Hui Wang
2020-05-22 19:10 ` kbuild test robot [this message]

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=202005230348.CRSVXs2s%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Vijendar.Mukunda@amd.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=hui.wang@canonical.com \
    --cc=kbuild-all@lists.01.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

Alsa-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/alsa-devel/0 alsa-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 alsa-devel alsa-devel/ https://lore.kernel.org/alsa-devel \
		alsa-devel@alsa-project.org
	public-inbox-index alsa-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.alsa-project.alsa-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git