Re: [net-next PATCH v7 12/16] net: mdiobus: Introduce fwnode_mdiobus_register()
by kernel test robot
Hi Calvin,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Calvin-Johnson/ACPI-support-for-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 34bb975126419e86bc3b95e200dc41de6c6ca69c
config: x86_64-randconfig-a013-20210311 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 574a9dabc63ba1e7a04c08d4bde2eacd61b44ce1)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/fc2494f709d3130a0c1dbb4d3769904ee...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Calvin-Johnson/ACPI-support-for-dpaa2-driver/20210311-142527
git checkout fc2494f709d3130a0c1dbb4d3769904ee869185b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/net/mdio/fwnode_mdio.c:18:5: warning: no previous prototype for function 'fwnode_mdiobus_register_phy' [-Wmissing-prototypes]
int fwnode_mdiobus_register_phy(struct mii_bus *bus,
^
drivers/net/mdio/fwnode_mdio.c:18:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int fwnode_mdiobus_register_phy(struct mii_bus *bus,
^
static
>> drivers/net/mdio/fwnode_mdio.c:88:5: warning: no previous prototype for function 'fwnode_mdiobus_register' [-Wmissing-prototypes]
int fwnode_mdiobus_register(struct mii_bus *mdio, struct fwnode_handle *fwnode)
^
drivers/net/mdio/fwnode_mdio.c:88:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int fwnode_mdiobus_register(struct mii_bus *mdio, struct fwnode_handle *fwnode)
^
static
2 warnings generated.
vim +/fwnode_mdiobus_register +88 drivers/net/mdio/fwnode_mdio.c
17
> 18 int fwnode_mdiobus_register_phy(struct mii_bus *bus,
19 struct fwnode_handle *child, u32 addr)
20 {
21 struct mii_timestamper *mii_ts = NULL;
22 struct phy_device *phy;
23 bool is_c45 = false;
24 u32 phy_id;
25 int rc;
26
27 if (is_of_node(child)) {
28 mii_ts = of_find_mii_timestamper(to_of_node(child));
29 if (IS_ERR(mii_ts))
30 return PTR_ERR(mii_ts);
31 }
32
33 rc = fwnode_property_match_string(child, "compatible", "ethernet-phy-ieee802.3-c45");
34 if (rc >= 0)
35 is_c45 = true;
36
37 if (is_c45 || fwnode_get_phy_id(child, &phy_id))
38 phy = get_phy_device(bus, addr, is_c45);
39 else
40 phy = phy_device_create(bus, addr, phy_id, 0, NULL);
41 if (IS_ERR(phy)) {
42 unregister_mii_timestamper(mii_ts);
43 return PTR_ERR(phy);
44 }
45
46 if (is_acpi_node(child)) {
47 phy->irq = bus->irq[addr];
48
49 /* Associate the fwnode with the device structure so it
50 * can be looked up later.
51 */
52 phy->mdio.dev.fwnode = child;
53
54 /* All data is now stored in the phy struct, so register it */
55 rc = phy_device_register(phy);
56 if (rc) {
57 phy_device_free(phy);
58 fwnode_handle_put(phy->mdio.dev.fwnode);
59 return rc;
60 }
61 } else if (is_of_node(child)) {
62 rc = of_mdiobus_phy_device_register(bus, phy, to_of_node(child), addr);
63 if (rc) {
64 unregister_mii_timestamper(mii_ts);
65 phy_device_free(phy);
66 return rc;
67 }
68 }
69
70 /* phy->mii_ts may already be defined by the PHY driver. A
71 * mii_timestamper probed via the device tree will still have
72 * precedence.
73 */
74 if (mii_ts)
75 phy->mii_ts = mii_ts;
76 return 0;
77 }
78 EXPORT_SYMBOL(fwnode_mdiobus_register_phy);
79
80 /**
81 * fwnode_mdiobus_register - Register mii_bus and create PHYs from fwnode
82 * @mdio: pointer to mii_bus structure
83 * @fwnode: pointer to fwnode of MDIO bus.
84 *
85 * This function returns of_mdiobus_register() for DT and
86 * acpi_mdiobus_register() for ACPI.
87 */
> 88 int fwnode_mdiobus_register(struct mii_bus *mdio, struct fwnode_handle *fwnode)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[linux-next:master 3616/3917] mm/sparse-vmemmap.c:69:35: warning: operation on 'pte' may be undefined
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 98546348153dee5f8ced572fd6c4690461d20f51
commit: 342ec54e2df2b6944c883e078cfae855cc33cc31 [3616/3917] mm: hugetlb: free the vmemmap pages associated with each HugeTLB page
config: arm64-randconfig-r001-20210311 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
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
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
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 342ec54e2df2b6944c883e078cfae855cc33cc31
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/arm64/include/asm/memory.h:366,
from arch/arm64/include/asm/thread_info.h:17,
from include/linux/thread_info.h:58,
from arch/arm64/include/asm/preempt.h:5,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/mm.h:10,
from mm/sparse-vmemmap.c:21:
mm/sparse-vmemmap.c: In function 'vmemmap_pte_range':
>> mm/sparse-vmemmap.c:69:35: warning: operation on 'pte' may be undefined [-Wsequence-point]
69 | walk->reuse_page = pte_page(*pte++);
| ~~~^~
include/asm-generic/memory_model.h:54:40: note: in definition of macro '__pfn_to_page'
54 | #define __pfn_to_page(pfn) (vmemmap + (pfn))
| ^~~
arch/arm64/include/asm/pgtable.h:73:4: note: in expansion of macro 'pte_val'
73 | ((pte_val(pte) & PTE_ADDR_LOW) | ((pte_val(pte) & PTE_ADDR_HIGH) << 36))
| ^~~~~~~
arch/arm64/include/asm/pgtable.h:80:24: note: in expansion of macro '__pte_to_phys'
80 | #define pte_pfn(pte) (__pte_to_phys(pte) >> PAGE_SHIFT)
| ^~~~~~~~~~~~~
arch/arm64/include/asm/pgtable.h:86:37: note: in expansion of macro 'pte_pfn'
86 | #define pte_page(pte) (pfn_to_page(pte_pfn(pte)))
| ^~~~~~~
mm/sparse-vmemmap.c:69:22: note: in expansion of macro 'pte_page'
69 | walk->reuse_page = pte_page(*pte++);
| ^~~~~~~~
vim +/pte +69 mm/sparse-vmemmap.c
52
53 static void vmemmap_pte_range(pmd_t *pmd, unsigned long addr,
54 unsigned long end,
55 struct vmemmap_remap_walk *walk)
56 {
57 pte_t *pte;
58
59 pte = pte_offset_kernel(pmd, addr);
60
61 /*
62 * The reuse_page is found 'first' in table walk before we start
63 * remapping (which is calling @walk->remap_pte).
64 */
65 if (!walk->reuse_page) {
66 BUG_ON(pte_none(*pte));
67 BUG_ON(walk->reuse_addr != addr);
68
> 69 walk->reuse_page = pte_page(*pte++);
70 /*
71 * Because the reuse address is part of the range that we are
72 * walking, skip the reuse address range.
73 */
74 addr += PAGE_SIZE;
75 }
76
77 for (; addr != end; addr += PAGE_SIZE, pte++) {
78 BUG_ON(pte_none(*pte));
79
80 walk->remap_pte(pte, addr, walk);
81 }
82 }
83
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
drivers/gpu/drm/etnaviv/etnaviv_dump.c:213 etnaviv_core_dump() warn: should - mem_map) + arch_pfn_offset) << 12' be a 64 bit
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 28806e4d9b97865b450d72156e9ad229f2067f0b
commit: 050b2da268f8fc4f8123f6462c430a61547b2f7b arc: use FLATMEM with freeing of unused memory map instead of DISCONTIGMEM
date: 3 months ago
config: arc-randconfig-m031-20210311 (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
smatch warnings:
drivers/gpu/drm/etnaviv/etnaviv_dump.c:213 etnaviv_core_dump() warn: should '(((*pages++) - mem_map) + arch_pfn_offset) << 12' be a 64 bit type?
vim +213 drivers/gpu/drm/etnaviv/etnaviv_dump.c
a8c21a5451d831 The etnaviv authors 2015-12-03 112
9a1fdae5876016 Lucas Stach 2019-08-09 113 void etnaviv_core_dump(struct etnaviv_gem_submit *submit)
a8c21a5451d831 The etnaviv authors 2015-12-03 114 {
9a1fdae5876016 Lucas Stach 2019-08-09 115 struct etnaviv_gpu *gpu = submit->gpu;
a8c21a5451d831 The etnaviv authors 2015-12-03 116 struct core_dump_iterator iter;
a8c21a5451d831 The etnaviv authors 2015-12-03 117 struct etnaviv_gem_object *obj;
a8c21a5451d831 The etnaviv authors 2015-12-03 118 unsigned int n_obj, n_bomap_pages;
a8c21a5451d831 The etnaviv authors 2015-12-03 119 size_t file_size, mmu_size;
a8c21a5451d831 The etnaviv authors 2015-12-03 120 __le64 *bomap, *bomap_start;
9a1fdae5876016 Lucas Stach 2019-08-09 121 int i;
a8c21a5451d831 The etnaviv authors 2015-12-03 122
6d7a20c0776036 Lucas Stach 2017-12-06 123 /* Only catch the first event, or when manually re-armed */
6d7a20c0776036 Lucas Stach 2017-12-06 124 if (!etnaviv_dump_core)
6d7a20c0776036 Lucas Stach 2017-12-06 125 return;
6d7a20c0776036 Lucas Stach 2017-12-06 126 etnaviv_dump_core = false;
6d7a20c0776036 Lucas Stach 2017-12-06 127
27b67278e007b5 Lucas Stach 2019-07-05 128 mutex_lock(&gpu->mmu_context->lock);
1396500d673bd0 Lucas Stach 2019-05-21 129
27b67278e007b5 Lucas Stach 2019-07-05 130 mmu_size = etnaviv_iommu_dump_size(gpu->mmu_context);
a8c21a5451d831 The etnaviv authors 2015-12-03 131
9a1fdae5876016 Lucas Stach 2019-08-09 132 /* We always dump registers, mmu, ring, hanging cmdbuf and end marker */
9a1fdae5876016 Lucas Stach 2019-08-09 133 n_obj = 5;
a8c21a5451d831 The etnaviv authors 2015-12-03 134 n_bomap_pages = 0;
a8c21a5451d831 The etnaviv authors 2015-12-03 135 file_size = ARRAY_SIZE(etnaviv_dump_registers) *
a8c21a5451d831 The etnaviv authors 2015-12-03 136 sizeof(struct etnaviv_dump_registers) +
9a1fdae5876016 Lucas Stach 2019-08-09 137 mmu_size + gpu->buffer.size + submit->cmdbuf.size;
a8c21a5451d831 The etnaviv authors 2015-12-03 138
a8c21a5451d831 The etnaviv authors 2015-12-03 139 /* Add in the active buffer objects */
9a1fdae5876016 Lucas Stach 2019-08-09 140 for (i = 0; i < submit->nr_bos; i++) {
9a1fdae5876016 Lucas Stach 2019-08-09 141 obj = submit->bos[i].obj;
a8c21a5451d831 The etnaviv authors 2015-12-03 142 file_size += obj->base.size;
a8c21a5451d831 The etnaviv authors 2015-12-03 143 n_bomap_pages += obj->base.size >> PAGE_SHIFT;
a8c21a5451d831 The etnaviv authors 2015-12-03 144 n_obj++;
a8c21a5451d831 The etnaviv authors 2015-12-03 145 }
a8c21a5451d831 The etnaviv authors 2015-12-03 146
a8c21a5451d831 The etnaviv authors 2015-12-03 147 /* If we have any buffer objects, add a bomap object */
a8c21a5451d831 The etnaviv authors 2015-12-03 148 if (n_bomap_pages) {
a8c21a5451d831 The etnaviv authors 2015-12-03 149 file_size += n_bomap_pages * sizeof(__le64);
a8c21a5451d831 The etnaviv authors 2015-12-03 150 n_obj++;
a8c21a5451d831 The etnaviv authors 2015-12-03 151 }
a8c21a5451d831 The etnaviv authors 2015-12-03 152
a8c21a5451d831 The etnaviv authors 2015-12-03 153 /* Add the size of the headers */
a8c21a5451d831 The etnaviv authors 2015-12-03 154 file_size += sizeof(*iter.hdr) * n_obj;
a8c21a5451d831 The etnaviv authors 2015-12-03 155
a8c21a5451d831 The etnaviv authors 2015-12-03 156 /* Allocate the file in vmalloc memory, it's likely to be big */
88dca4ca5a93d2 Christoph Hellwig 2020-06-01 157 iter.start = __vmalloc(file_size, GFP_KERNEL | __GFP_NOWARN |
88dca4ca5a93d2 Christoph Hellwig 2020-06-01 158 __GFP_NORETRY);
a8c21a5451d831 The etnaviv authors 2015-12-03 159 if (!iter.start) {
27b67278e007b5 Lucas Stach 2019-07-05 160 mutex_unlock(&gpu->mmu_context->lock);
a8c21a5451d831 The etnaviv authors 2015-12-03 161 dev_warn(gpu->dev, "failed to allocate devcoredump file\n");
a8c21a5451d831 The etnaviv authors 2015-12-03 162 return;
a8c21a5451d831 The etnaviv authors 2015-12-03 163 }
a8c21a5451d831 The etnaviv authors 2015-12-03 164
a8c21a5451d831 The etnaviv authors 2015-12-03 165 /* Point the data member after the headers */
a8c21a5451d831 The etnaviv authors 2015-12-03 166 iter.hdr = iter.start;
a8c21a5451d831 The etnaviv authors 2015-12-03 167 iter.data = &iter.hdr[n_obj];
a8c21a5451d831 The etnaviv authors 2015-12-03 168
a8c21a5451d831 The etnaviv authors 2015-12-03 169 memset(iter.hdr, 0, iter.data - iter.start);
a8c21a5451d831 The etnaviv authors 2015-12-03 170
a8c21a5451d831 The etnaviv authors 2015-12-03 171 etnaviv_core_dump_registers(&iter, gpu);
27b67278e007b5 Lucas Stach 2019-07-05 172 etnaviv_core_dump_mmu(&iter, gpu->mmu_context, mmu_size);
2f9225dbc09abe Lucas Stach 2017-11-24 173 etnaviv_core_dump_mem(&iter, ETDUMP_BUF_RING, gpu->buffer.vaddr,
2f9225dbc09abe Lucas Stach 2017-11-24 174 gpu->buffer.size,
db82a0435b8be3 Lucas Stach 2019-07-05 175 etnaviv_cmdbuf_get_va(&gpu->buffer,
17e4660ae3d7e1 Lucas Stach 2019-07-05 176 &gpu->mmu_context->cmdbuf_mapping));
2f9225dbc09abe Lucas Stach 2017-11-24 177
2f9225dbc09abe Lucas Stach 2017-11-24 178 etnaviv_core_dump_mem(&iter, ETDUMP_BUF_CMD,
2f9225dbc09abe Lucas Stach 2017-11-24 179 submit->cmdbuf.vaddr, submit->cmdbuf.size,
db82a0435b8be3 Lucas Stach 2019-07-05 180 etnaviv_cmdbuf_get_va(&submit->cmdbuf,
17e4660ae3d7e1 Lucas Stach 2019-07-05 181 &gpu->mmu_context->cmdbuf_mapping));
a8c21a5451d831 The etnaviv authors 2015-12-03 182
ca8cb69580236f Lucas Stach 2019-10-16 183 mutex_unlock(&gpu->mmu_context->lock);
ca8cb69580236f Lucas Stach 2019-10-16 184
a8c21a5451d831 The etnaviv authors 2015-12-03 185 /* Reserve space for the bomap */
a8c21a5451d831 The etnaviv authors 2015-12-03 186 if (n_bomap_pages) {
a8c21a5451d831 The etnaviv authors 2015-12-03 187 bomap_start = bomap = iter.data;
a8c21a5451d831 The etnaviv authors 2015-12-03 188 memset(bomap, 0, sizeof(*bomap) * n_bomap_pages);
a8c21a5451d831 The etnaviv authors 2015-12-03 189 etnaviv_core_dump_header(&iter, ETDUMP_BUF_BOMAP,
a8c21a5451d831 The etnaviv authors 2015-12-03 190 bomap + n_bomap_pages);
a8c21a5451d831 The etnaviv authors 2015-12-03 191 } else {
a8c21a5451d831 The etnaviv authors 2015-12-03 192 /* Silence warning */
a8c21a5451d831 The etnaviv authors 2015-12-03 193 bomap_start = bomap = NULL;
a8c21a5451d831 The etnaviv authors 2015-12-03 194 }
a8c21a5451d831 The etnaviv authors 2015-12-03 195
9a1fdae5876016 Lucas Stach 2019-08-09 196 for (i = 0; i < submit->nr_bos; i++) {
9a1fdae5876016 Lucas Stach 2019-08-09 197 struct etnaviv_vram_mapping *vram;
a8c21a5451d831 The etnaviv authors 2015-12-03 198 struct page **pages;
a8c21a5451d831 The etnaviv authors 2015-12-03 199 void *vaddr;
a8c21a5451d831 The etnaviv authors 2015-12-03 200
9a1fdae5876016 Lucas Stach 2019-08-09 201 obj = submit->bos[i].obj;
9a1fdae5876016 Lucas Stach 2019-08-09 202 vram = submit->bos[i].mapping;
a8c21a5451d831 The etnaviv authors 2015-12-03 203
339073ef77e45e Lucas Stach 2016-01-22 204 mutex_lock(&obj->lock);
a8c21a5451d831 The etnaviv authors 2015-12-03 205 pages = etnaviv_gem_get_pages(obj);
339073ef77e45e Lucas Stach 2016-01-22 206 mutex_unlock(&obj->lock);
f8261c376e7f8c Dan Carpenter 2019-01-14 207 if (!IS_ERR(pages)) {
a8c21a5451d831 The etnaviv authors 2015-12-03 208 int j;
a8c21a5451d831 The etnaviv authors 2015-12-03 209
a8c21a5451d831 The etnaviv authors 2015-12-03 210 iter.hdr->data[0] = bomap - bomap_start;
a8c21a5451d831 The etnaviv authors 2015-12-03 211
a8c21a5451d831 The etnaviv authors 2015-12-03 212 for (j = 0; j < obj->base.size >> PAGE_SHIFT; j++)
a8c21a5451d831 The etnaviv authors 2015-12-03 @213 *bomap++ = cpu_to_le64(page_to_phys(*pages++));
:::::: The code at line 213 was first introduced by commit
:::::: a8c21a5451d831e67b7a6fb910f9ca8bc7b43554 drm/etnaviv: add initial etnaviv DRM driver
:::::: TO: The etnaviv authors <dri-devel(a)lists.freedesktop.org>
:::::: CC: Lucas Stach <l.stach(a)pengutronix.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[RFC PATCH] clk: si5341: si5341_remove() can be static
by kernel test robot
Reported-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
clk-si5341.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/clk-si5341.c b/drivers/clk/clk-si5341.c
index f01a20fdf0054..5a3128e58f18e 100644
--- a/drivers/clk/clk-si5341.c
+++ b/drivers/clk/clk-si5341.c
@@ -1707,7 +1707,7 @@ static int si5341_probe(struct i2c_client *client,
return err;
}
-int si5341_remove(struct i2c_client *client)
+static int si5341_remove(struct i2c_client *client)
{
struct clk_si5341 *data = i2c_get_clientdata(client);
int i;
1 year, 6 months
[andersson-remoteproc:ci-next 11/19] drivers/remoteproc/remoteproc_coredump.c:169:33: sparse: sparse: incorrect type in argument 2 (different address spaces)
by kernel test robot
tree: https://github.com/andersson/remoteproc ci-next
head: b07cb939c7e2dfd373ace364d5bd0a613bdaf559
commit: 40df0a91b2a5228ded8e5f75b80d28c96c6831cd [11/19] remoteproc: add is_iomem to da_to_va
config: arm-randconfig-s032-20210311 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-262-g5e674421-dirty
# https://github.com/andersson/remoteproc/commit/40df0a91b2a5228ded8e5f75b8...
git remote add andersson-remoteproc https://github.com/andersson/remoteproc
git fetch --no-tags andersson-remoteproc ci-next
git checkout 40df0a91b2a5228ded8e5f75b80d28c96c6831cd
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
>> drivers/remoteproc/remoteproc_coredump.c:169:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const volatile [noderef] __iomem *from @@ got void *[assigned] ptr @@
drivers/remoteproc/remoteproc_coredump.c:169:33: sparse: expected void const volatile [noderef] __iomem *from
drivers/remoteproc/remoteproc_coredump.c:169:33: sparse: got void *[assigned] ptr
vim +169 drivers/remoteproc/remoteproc_coredump.c
150
151 static void rproc_copy_segment(struct rproc *rproc, void *dest,
152 struct rproc_dump_segment *segment,
153 size_t offset, size_t size)
154 {
155 void *ptr;
156 bool is_iomem;
157
158 if (segment->dump) {
159 segment->dump(rproc, segment, dest, offset, size);
160 } else {
161 ptr = rproc_da_to_va(rproc, segment->da + offset, size, &is_iomem);
162 if (!ptr) {
163 dev_err(&rproc->dev,
164 "invalid copy request for segment %pad with offset %zu and size %zu)\n",
165 &segment->da, offset, size);
166 memset(dest, 0xff, size);
167 } else {
168 if (is_iomem)
> 169 memcpy_fromio(dest, ptr, size);
170 else
171 memcpy(dest, ptr, size);
172 }
173 }
174 }
175
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[andersson-remoteproc:ci-next 11/19] drivers/remoteproc/remoteproc_coredump.c:169:53: sparse: sparse: incorrect type in argument 2 (different address spaces)
by kernel test robot
tree: https://github.com/andersson/remoteproc ci-next
head: b07cb939c7e2dfd373ace364d5bd0a613bdaf559
commit: 40df0a91b2a5228ded8e5f75b80d28c96c6831cd [11/19] remoteproc: add is_iomem to da_to_va
config: arc-randconfig-s031-20210311 (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-262-g5e674421-dirty
# https://github.com/andersson/remoteproc/commit/40df0a91b2a5228ded8e5f75b8...
git remote add andersson-remoteproc https://github.com/andersson/remoteproc
git fetch --no-tags andersson-remoteproc ci-next
git checkout 40df0a91b2a5228ded8e5f75b80d28c96c6831cd
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
>> drivers/remoteproc/remoteproc_coredump.c:169:53: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void *[assigned] ptr @@
drivers/remoteproc/remoteproc_coredump.c:169:53: sparse: expected void const volatile [noderef] __iomem *addr
drivers/remoteproc/remoteproc_coredump.c:169:53: sparse: got void *[assigned] ptr
vim +169 drivers/remoteproc/remoteproc_coredump.c
150
151 static void rproc_copy_segment(struct rproc *rproc, void *dest,
152 struct rproc_dump_segment *segment,
153 size_t offset, size_t size)
154 {
155 void *ptr;
156 bool is_iomem;
157
158 if (segment->dump) {
159 segment->dump(rproc, segment, dest, offset, size);
160 } else {
161 ptr = rproc_da_to_va(rproc, segment->da + offset, size, &is_iomem);
162 if (!ptr) {
163 dev_err(&rproc->dev,
164 "invalid copy request for segment %pad with offset %zu and size %zu)\n",
165 &segment->da, offset, size);
166 memset(dest, 0xff, size);
167 } else {
168 if (is_iomem)
> 169 memcpy_fromio(dest, ptr, size);
170 else
171 memcpy(dest, ptr, size);
172 }
173 }
174 }
175
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[mark-rutland:arm64/entry/rework 11/16] arch/arm64/kernel/entry-common.c:286:25: warning: no previous prototype for function 'el1_error_handler'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arm64/entry/rework
head: c7071810c4aa3f59ecec504f7661d6cb8bb9b94f
commit: 2385fe70b3e6e547015c0d144ace14505d573a75 [11/16] arm64: entry: convert SError handlers to C
config: arm64-randconfig-r026-20210311 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 574a9dabc63ba1e7a04c08d4bde2eacd61b44ce1)
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/mark/linux.git/commit/?id...
git remote add mark-rutland https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git
git fetch --no-tags mark-rutland arm64/entry/rework
git checkout 2385fe70b3e6e547015c0d144ace14505d573a75
# 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(a)intel.com>
All warnings (new ones prefixed by >>):
>> arch/arm64/kernel/entry-common.c:286:25: warning: no previous prototype for function 'el1_error_handler' [-Wmissing-prototypes]
asmlinkage void noinstr el1_error_handler(struct pt_regs *regs)
^
arch/arm64/kernel/entry-common.c:286:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
asmlinkage void noinstr el1_error_handler(struct pt_regs *regs)
^
static
>> arch/arm64/kernel/entry-common.c:490:25: warning: no previous prototype for function 'el0_error_handler' [-Wmissing-prototypes]
asmlinkage void noinstr el0_error_handler(struct pt_regs *regs)
^
arch/arm64/kernel/entry-common.c:490:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
asmlinkage void noinstr el0_error_handler(struct pt_regs *regs)
^
static
2 warnings generated.
vim +/el1_error_handler +286 arch/arm64/kernel/entry-common.c
285
> 286 asmlinkage void noinstr el1_error_handler(struct pt_regs *regs)
287 {
288 unsigned long esr = read_sysreg(esr_el1);
289
290 if (system_uses_irq_prio_masking())
291 gic_write_pmr(GIC_PRIO_IRQON | GIC_PRIO_PSR_I_SET);
292
293 local_daif_restore(DAIF_ERRCTX);
294 do_serror(regs, esr);
295 }
296
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[leon-rdma:rdma-next 41/42] drivers/infiniband/hw/hfi1/init.c:1865: warning: expecting prototype for ahfi1_setup_eagerbufs(). Prototype was for hfi1_setup_eagerbufs() instead
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git rdma-next
head: 05f9b877d9328976740745c6f5451a83685920d6
commit: 8a9792233781a714da6cecba33b693bcabfc4b31 [41/42] RDMA: Fix kernel-doc compilation warnings
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git/commi...
git remote add leon-rdma https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git
git fetch --no-tags leon-rdma rdma-next
git checkout 8a9792233781a714da6cecba33b693bcabfc4b31
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/infiniband/hw/hfi1/init.c:1865: warning: expecting prototype for ahfi1_setup_eagerbufs(). Prototype was for hfi1_setup_eagerbufs() instead
vim +1865 drivers/infiniband/hw/hfi1/init.c
7724105686e718 drivers/staging/rdma/hfi1/init.c Mike Marciniszyn 2015-07-30 1853
7724105686e718 drivers/staging/rdma/hfi1/init.c Mike Marciniszyn 2015-07-30 1854 /**
8a9792233781a7 drivers/infiniband/hw/hfi1/init.c Leon Romanovsky 2021-03-11 1855 * ahfi1_setup_eagerbufs - llocate eager buffers, both kernel and user
8a9792233781a7 drivers/infiniband/hw/hfi1/init.c Leon Romanovsky 2021-03-11 1856 * contexts.
7724105686e718 drivers/staging/rdma/hfi1/init.c Mike Marciniszyn 2015-07-30 1857 * @rcd: the context we are setting up.
7724105686e718 drivers/staging/rdma/hfi1/init.c Mike Marciniszyn 2015-07-30 1858 *
7724105686e718 drivers/staging/rdma/hfi1/init.c Mike Marciniszyn 2015-07-30 1859 * Allocate the eager TID buffers and program them into hip.
7724105686e718 drivers/staging/rdma/hfi1/init.c Mike Marciniszyn 2015-07-30 1860 * They are no longer completely contiguous, we do multiple allocation
7724105686e718 drivers/staging/rdma/hfi1/init.c Mike Marciniszyn 2015-07-30 1861 * calls. Otherwise we get the OOM code involved, by asking for too
7724105686e718 drivers/staging/rdma/hfi1/init.c Mike Marciniszyn 2015-07-30 1862 * much per call, with disastrous results on some kernels.
7724105686e718 drivers/staging/rdma/hfi1/init.c Mike Marciniszyn 2015-07-30 1863 */
7724105686e718 drivers/staging/rdma/hfi1/init.c Mike Marciniszyn 2015-07-30 1864 int hfi1_setup_eagerbufs(struct hfi1_ctxtdata *rcd)
7724105686e718 drivers/staging/rdma/hfi1/init.c Mike Marciniszyn 2015-07-30 @1865 {
:::::: The code at line 1865 was first introduced by commit
:::::: 7724105686e718ac476a6ad3304fea2fbcfcffde IB/hfi1: add driver files
:::::: TO: Mike Marciniszyn <mike.marciniszyn(a)intel.com>
:::::: CC: Doug Ledford <dledford(a)redhat.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months