From: kernel test robot <lkp@intel.com>
To: Leon Romanovsky <leonro@nvidia.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [leon-rdma:dmabuf-vfio 39/44] arch/powerpc/platforms/ps3/system-bus.c:594:3: warning: non-void function 'ps3_ioc0_map_phys' should return a value
Date: Sat, 20 Sep 2025 05:10:44 +0800 [thread overview]
Message-ID: <202509200518.VAevT8GF-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git dmabuf-vfio
head: d42f66e173967159357a213dd04777137478de3b
commit: 05219b5f489decdb1f4b89b4eeaf14206d2a3f39 [39/44] powerpc: Convert to physical address DMA mapping
config: powerpc-allyesconfig (https://download.01.org/0day-ci/archive/20250920/202509200518.VAevT8GF-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 7c861bcedf61607b6c087380ac711eb7ff918ca6)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250920/202509200518.VAevT8GF-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202509200518.VAevT8GF-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from <built-in>:3:
In file included from include/linux/compiler_types.h:171:
include/linux/compiler-clang.h:28:9: warning: '__SANITIZE_ADDRESS__' macro redefined [-Wmacro-redefined]
28 | #define __SANITIZE_ADDRESS__
| ^
<built-in>:352:9: note: previous definition is here
352 | #define __SANITIZE_ADDRESS__ 1
| ^
>> arch/powerpc/platforms/ps3/system-bus.c:594:3: warning: non-void function 'ps3_ioc0_map_phys' should return a value [-Wreturn-mismatch]
594 | return;
| ^
2 warnings generated.
vim +/ps3_ioc0_map_phys +594 arch/powerpc/platforms/ps3/system-bus.c
581
582 static dma_addr_t ps3_ioc0_map_phys(struct device *_dev, phys_addr_t phys,
583 size_t size,
584 enum dma_data_direction direction,
585 unsigned long attrs)
586 {
587 struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
588 int result;
589 dma_addr_t bus_addr;
590 u64 iopte_flag;
591 void *ptr = phys_to_virt(phys);
592
593 if (attrs & DMA_ATTR_MMIO)
> 594 return;
595
596 iopte_flag = CBE_IOPTE_M;
597 switch (direction) {
598 case DMA_BIDIRECTIONAL:
599 iopte_flag |= CBE_IOPTE_PP_R | CBE_IOPTE_PP_W | CBE_IOPTE_SO_RW;
600 break;
601 case DMA_TO_DEVICE:
602 iopte_flag |= CBE_IOPTE_PP_R | CBE_IOPTE_SO_R;
603 break;
604 case DMA_FROM_DEVICE:
605 iopte_flag |= CBE_IOPTE_PP_W | CBE_IOPTE_SO_RW;
606 break;
607 default:
608 /* not happened */
609 BUG();
610 }
611 result = ps3_dma_map(dev->d_region, (unsigned long)ptr, size,
612 &bus_addr, iopte_flag);
613
614 if (result) {
615 pr_debug("%s:%d: ps3_dma_map failed (%d)\n",
616 __func__, __LINE__, result);
617 }
618 return bus_addr;
619 }
620
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-09-19 21:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202509200518.VAevT8GF-lkp@intel.com \
--to=lkp@intel.com \
--cc=leonro@nvidia.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/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.