From: kbuild test robot <lkp@intel.com>
To: "He, Bo" <bo.he@intel.com>
Cc: kbuild-all@01.org,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"pierre-louis.bossart@linux.intel.com"
<pierre-louis.bossart@linux.intel.com>,
"liam.r.girdwood@linux.intel.com"
<liam.r.girdwood@linux.intel.com>,
"perex@perex.cz" <perex@perex.cz>,
"tiwai@suse.com" <tiwai@suse.com>,
"Singh, Guneshwor O" <guneshwor.o.singh@intel.com>,
"Periyasamy, SriramX" <sriramx.periyasamy@intel.com>,
"Kale, Sanyog R" <sanyog.r.kale@intel.com>,
"Kesapragada,
Pardha Saradhi" <pardha.saradhi.kesapragada@intel.com>,
"kuninori.morimoto.gx@renesas.com"
<kuninori.morimoto.gx@renesas.com>,
"guruprasadx.pawse@intel.com" <guruprasadx.pawse@intel.com>,
"Ughreja, Rakesh A" <rakesh.a.ughreja@intel.com>,
"Prakash, Divya1" <divya1.prakash@intel.com>,
"Diwakar, Praveen" <praveen.diwakar@intel.com>,
"Zhang, Yanmin" <yanmin.zhang@intel.com>
Subject: Re: [PATCH] fix the kernel panic due to wrong use the dev memory API
Date: Mon, 5 Nov 2018 18:38:06 +0800 [thread overview]
Message-ID: <201811051843.7JyCkJpC%fengguang.wu@intel.com> (raw)
In-Reply-To: <CD6925E8781EFD4D8E11882D20FC406D529FE3B6@SHSMSX104.ccr.corp.intel.com>
[-- Attachment #1: Type: text/plain, Size: 2856 bytes --]
Hi Bo,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on asoc/for-next]
[also build test WARNING on v4.20-rc1 next-20181105]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/He-Bo/fix-the-kernel-panic-due-to-wrong-use-the-dev-memory-API/20181105-175620
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: i386-randconfig-x014-201844 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All warnings (new ones prefixed by >>):
sound/soc/intel/skylake/skl-pcm.c: In function 'skl_platform_register':
>> sound/soc/intel/skylake/skl-pcm.c:1489:28: warning: passing argument 2 of 'devm_kcalloc' makes integer from pointer without a cast [-Wint-conversion]
dais = devm_kcalloc(dev, skl->dais, sizeof(skl_fe_dai) +
^~~
In file included from include/linux/pci.h:31:0,
from sound/soc/intel/skylake/skl-pcm.c:22:
include/linux/device.h:690:21: note: expected 'size_t {aka unsigned int}' but argument is of type 'struct snd_soc_dai_driver *'
static inline void *devm_kcalloc(struct device *dev,
^~~~~~~~~~~~
vim +/devm_kcalloc +1489 sound/soc/intel/skylake/skl-pcm.c
1468
1469 int skl_platform_register(struct device *dev)
1470 {
1471 int ret;
1472 struct snd_soc_dai_driver *dais;
1473 int num_dais = ARRAY_SIZE(skl_platform_dai);
1474 struct hdac_bus *bus = dev_get_drvdata(dev);
1475 struct skl *skl = bus_to_skl(bus);
1476
1477 INIT_LIST_HEAD(&skl->ppl_list);
1478 INIT_LIST_HEAD(&skl->bind_list);
1479
1480 skl->dais = kmemdup(skl_platform_dai, sizeof(skl_platform_dai),
1481 GFP_KERNEL);
1482 if (!skl->dais) {
1483 ret = -ENOMEM;
1484 goto err;
1485 }
1486
1487 if (!skl->use_tplg_pcm) {
1488 devm_kfree(dev, skl->dais);
> 1489 dais = devm_kcalloc(dev, skl->dais, sizeof(skl_fe_dai) +
1490 sizeof(skl_platform_dai), GFP_KERNEL);
1491 if (!dais) {
1492 ret = -ENOMEM;
1493 goto err;
1494 }
1495
1496 skl->dais = dais;
1497 memcpy(&skl->dais[ARRAY_SIZE(skl_platform_dai)], skl_fe_dai,
1498 sizeof(skl_fe_dai));
1499 num_dais += ARRAY_SIZE(skl_fe_dai);
1500 }
1501
1502 ret = devm_snd_soc_register_component(dev, &skl_component,
1503 skl->dais, num_dais);
1504 if (ret)
1505 dev_err(dev, "soc component registration failed %d\n", ret);
1506 err:
1507 return ret;
1508 }
1509
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 27737 bytes --]
next prev parent reply other threads:[~2018-11-05 10:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-05 8:29 He, Bo
2018-11-05 10:38 ` kbuild test robot [this message]
2018-11-05 17:01 ` [alsa-devel] " Pierre-Louis Bossart
2018-11-06 0:58 ` He, Bo
2018-11-06 14:39 ` Pierre-Louis Bossart
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=201811051843.7JyCkJpC%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=bo.he@intel.com \
--cc=divya1.prakash@intel.com \
--cc=guneshwor.o.singh@intel.com \
--cc=guruprasadx.pawse@intel.com \
--cc=kbuild-all@01.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=liam.r.girdwood@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pardha.saradhi.kesapragada@intel.com \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=praveen.diwakar@intel.com \
--cc=rakesh.a.ughreja@intel.com \
--cc=sanyog.r.kale@intel.com \
--cc=sriramx.periyasamy@intel.com \
--cc=tiwai@suse.com \
--cc=yanmin.zhang@intel.com \
/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®