From: kernel test robot <lkp@intel.com>
To: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
Linux Memory Management List <linux-mm@kvack.org>,
Miquel Raynal <miquel.raynal@bootlin.com>
Subject: [linux-next:master 7033/7280] drivers/mtd/maps/physmap-bt1-rom.c:39:10: warning: cast to smaller integer type 'unsigned int' from 'void
Date: Mon, 23 Nov 2020 10:12:42 +0800 [thread overview]
Message-ID: <202011231040.2TFdssKy-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3070 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 95065cb54210eba86bed10cb2118041524d54573
commit: 69a75a1a47d80aaade0c1604d1dcc1f2570515f4 [7033/7280] mtd: physmap: physmap-bt1-rom: Fix __iomem addrspace removal warning
config: arm64-randconfig-r031-20201123 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c8c3a411c50f541ce5362bd60ee3f8fe43ac2722)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=69a75a1a47d80aaade0c1604d1dcc1f2570515f4
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 69a75a1a47d80aaade0c1604d1dcc1f2570515f4
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
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/mtd/maps/physmap-bt1-rom.c:39:10: warning: cast to smaller integer type 'unsigned int' from 'void *' [-Wvoid-pointer-to-int-cast]
shift = (unsigned int)src & 0x3;
^~~~~~~~~~~~~~~~~
drivers/mtd/maps/physmap-bt1-rom.c:78:10: warning: cast to smaller integer type 'unsigned int' from 'void *' [-Wvoid-pointer-to-int-cast]
shift = (unsigned int)src & 0x3;
^~~~~~~~~~~~~~~~~
2 warnings generated.
vim +39 drivers/mtd/maps/physmap-bt1-rom.c
23
24 /*
25 * Baikal-T1 SoC ROMs are only accessible by the dword-aligned instructions.
26 * We have to take this into account when implementing the data read-methods.
27 * Note there is no need in bothering with endianness, since both Baikal-T1
28 * CPU and MMIO are LE.
29 */
30 static map_word __xipram bt1_rom_map_read(struct map_info *map,
31 unsigned long ofs)
32 {
33 void __iomem *src = map->virt + ofs;
34 unsigned int shift;
35 map_word ret;
36 u32 data;
37
38 /* Read data within offset dword. */
> 39 shift = (unsigned int)src & 0x3;
40 data = readl_relaxed(src - shift);
41 if (!shift) {
42 ret.x[0] = data;
43 return ret;
44 }
45 ret.x[0] = data >> (shift * BITS_PER_BYTE);
46
47 /* Read data from the next dword. */
48 shift = 4 - shift;
49 if (ofs + shift >= map->size)
50 return ret;
51
52 data = readl_relaxed(src + shift);
53 ret.x[0] |= data << (shift * BITS_PER_BYTE);
54
55 return ret;
56 }
57
---
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: 40296 bytes --]
reply other threads:[~2020-11-23 2:12 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=202011231040.2TFdssKy-lkp@intel.com \
--to=lkp@intel.com \
--cc=Sergey.Semin@baikalelectronics.ru \
--cc=clang-built-linux@googlegroups.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-mm@kvack.org \
--cc=miquel.raynal@bootlin.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