From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [linux-next:master 3480/6773] drivers/bus/mhi/pci_generic.c:276:25: warning: implicit conversion from 'unsigned long long' to 'dma_addr_t' (aka 'unsigned int') changes value from 18446744073709551615 to 4294967295
Date: Thu, 19 Nov 2020 00:29:56 +0800 [thread overview]
Message-ID: <202011190052.FArg0ryc-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4339 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 2052923327794192c5d884623b5ee5fec1867bda
commit: c40eadc74f43c5d41c3ae94081248c18bf606cb3 [3480/6773] bus: mhi: Add MHI PCI support for WWAN modems
config: powerpc64-randconfig-r011-20201118 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b2613fb2f0f53691dd0211895afbb9413457fca7)
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 powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=c40eadc74f43c5d41c3ae94081248c18bf606cb3
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout c40eadc74f43c5d41c3ae94081248c18bf606cb3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/bus/mhi/pci_generic.c:276:25: warning: implicit conversion from 'unsigned long long' to 'dma_addr_t' (aka 'unsigned int') changes value from 18446744073709551615 to 4294967295 [-Wconstant-conversion]
mhi_cntrl->iova_stop = DMA_BIT_MASK(info->dma_data_width);
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:76:40: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^~~~~
1 warning generated.
vim +276 drivers/bus/mhi/pci_generic.c
259
260 static int mhi_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
261 {
262 const struct mhi_pci_dev_info *info = (struct mhi_pci_dev_info *) id->driver_data;
263 const struct mhi_controller_config *mhi_cntrl_config;
264 struct mhi_controller *mhi_cntrl;
265 int err;
266
267 dev_dbg(&pdev->dev, "MHI PCI device found: %s\n", info->name);
268
269 mhi_cntrl = mhi_alloc_controller();
270 if (!mhi_cntrl)
271 return -ENOMEM;
272
273 mhi_cntrl_config = info->config;
274 mhi_cntrl->cntrl_dev = &pdev->dev;
275 mhi_cntrl->iova_start = 0;
> 276 mhi_cntrl->iova_stop = DMA_BIT_MASK(info->dma_data_width);
277 mhi_cntrl->fw_image = info->fw;
278 mhi_cntrl->edl_image = info->edl;
279
280 mhi_cntrl->read_reg = mhi_pci_read_reg;
281 mhi_cntrl->write_reg = mhi_pci_write_reg;
282 mhi_cntrl->status_cb = mhi_pci_status_cb;
283 mhi_cntrl->runtime_get = mhi_pci_runtime_get;
284 mhi_cntrl->runtime_put = mhi_pci_runtime_put;
285
286 err = mhi_pci_claim(mhi_cntrl, info->bar_num, DMA_BIT_MASK(info->dma_data_width));
287 if (err)
288 goto err_release;
289
290 err = mhi_pci_get_irqs(mhi_cntrl, mhi_cntrl_config);
291 if (err)
292 goto err_release;
293
294 pci_set_drvdata(pdev, mhi_cntrl);
295
296 err = mhi_register_controller(mhi_cntrl, mhi_cntrl_config);
297 if (err)
298 goto err_release;
299
300 /* MHI bus does not power up the controller by default */
301 err = mhi_prepare_for_power_up(mhi_cntrl);
302 if (err) {
303 dev_err(&pdev->dev, "failed to prepare MHI controller\n");
304 goto err_unregister;
305 }
306
307 err = mhi_sync_power_up(mhi_cntrl);
308 if (err) {
309 dev_err(&pdev->dev, "failed to power up MHI controller\n");
310 goto err_unprepare;
311 }
312
313 return 0;
314
315 err_unprepare:
316 mhi_unprepare_after_power_down(mhi_cntrl);
317 err_unregister:
318 mhi_unregister_controller(mhi_cntrl);
319 err_release:
320 mhi_free_controller(mhi_cntrl);
321
322 return err;
323 }
324
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 44838 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Loic Poulain <loic.poulain@linaro.org>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
Linux Memory Management List <linux-mm@kvack.org>,
Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
Bhaumik Bhatt <bbhatt@codeaurora.org>,
Hemant Kumar <hemantk@codeaurora.org>
Subject: [linux-next:master 3480/6773] drivers/bus/mhi/pci_generic.c:276:25: warning: implicit conversion from 'unsigned long long' to 'dma_addr_t' (aka 'unsigned int') changes value from 18446744073709551615 to 4294967295
Date: Thu, 19 Nov 2020 00:29:56 +0800 [thread overview]
Message-ID: <202011190052.FArg0ryc-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4235 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 2052923327794192c5d884623b5ee5fec1867bda
commit: c40eadc74f43c5d41c3ae94081248c18bf606cb3 [3480/6773] bus: mhi: Add MHI PCI support for WWAN modems
config: powerpc64-randconfig-r011-20201118 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b2613fb2f0f53691dd0211895afbb9413457fca7)
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 powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=c40eadc74f43c5d41c3ae94081248c18bf606cb3
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout c40eadc74f43c5d41c3ae94081248c18bf606cb3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/bus/mhi/pci_generic.c:276:25: warning: implicit conversion from 'unsigned long long' to 'dma_addr_t' (aka 'unsigned int') changes value from 18446744073709551615 to 4294967295 [-Wconstant-conversion]
mhi_cntrl->iova_stop = DMA_BIT_MASK(info->dma_data_width);
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:76:40: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^~~~~
1 warning generated.
vim +276 drivers/bus/mhi/pci_generic.c
259
260 static int mhi_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
261 {
262 const struct mhi_pci_dev_info *info = (struct mhi_pci_dev_info *) id->driver_data;
263 const struct mhi_controller_config *mhi_cntrl_config;
264 struct mhi_controller *mhi_cntrl;
265 int err;
266
267 dev_dbg(&pdev->dev, "MHI PCI device found: %s\n", info->name);
268
269 mhi_cntrl = mhi_alloc_controller();
270 if (!mhi_cntrl)
271 return -ENOMEM;
272
273 mhi_cntrl_config = info->config;
274 mhi_cntrl->cntrl_dev = &pdev->dev;
275 mhi_cntrl->iova_start = 0;
> 276 mhi_cntrl->iova_stop = DMA_BIT_MASK(info->dma_data_width);
277 mhi_cntrl->fw_image = info->fw;
278 mhi_cntrl->edl_image = info->edl;
279
280 mhi_cntrl->read_reg = mhi_pci_read_reg;
281 mhi_cntrl->write_reg = mhi_pci_write_reg;
282 mhi_cntrl->status_cb = mhi_pci_status_cb;
283 mhi_cntrl->runtime_get = mhi_pci_runtime_get;
284 mhi_cntrl->runtime_put = mhi_pci_runtime_put;
285
286 err = mhi_pci_claim(mhi_cntrl, info->bar_num, DMA_BIT_MASK(info->dma_data_width));
287 if (err)
288 goto err_release;
289
290 err = mhi_pci_get_irqs(mhi_cntrl, mhi_cntrl_config);
291 if (err)
292 goto err_release;
293
294 pci_set_drvdata(pdev, mhi_cntrl);
295
296 err = mhi_register_controller(mhi_cntrl, mhi_cntrl_config);
297 if (err)
298 goto err_release;
299
300 /* MHI bus does not power up the controller by default */
301 err = mhi_prepare_for_power_up(mhi_cntrl);
302 if (err) {
303 dev_err(&pdev->dev, "failed to prepare MHI controller\n");
304 goto err_unregister;
305 }
306
307 err = mhi_sync_power_up(mhi_cntrl);
308 if (err) {
309 dev_err(&pdev->dev, "failed to power up MHI controller\n");
310 goto err_unprepare;
311 }
312
313 return 0;
314
315 err_unprepare:
316 mhi_unprepare_after_power_down(mhi_cntrl);
317 err_unregister:
318 mhi_unregister_controller(mhi_cntrl);
319 err_release:
320 mhi_free_controller(mhi_cntrl);
321
322 return err;
323 }
324
---
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: 44838 bytes --]
next reply other threads:[~2020-11-18 16:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-18 16:29 kernel test robot [this message]
2020-11-18 16:29 ` [linux-next:master 3480/6773] drivers/bus/mhi/pci_generic.c:276:25: warning: implicit conversion from 'unsigned long long' to 'dma_addr_t' (aka 'unsigned int') changes value from 18446744073709551615 to 4294967295 kernel test robot
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=202011190052.FArg0ryc-lkp@intel.com \
--to=lkp@intel.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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.