CC:
kbuil...@lists.01.org
In-Reply-To: <
20200208183641.6674-6-p...@bp.renesas.com>
References: <
20200208183641.6674-6-p...@bp.renesas.com>
TO: Lad Prabhakar <
prabhaka...@gmail.com>
CC: Bjorn Helgaas <
bhel...@google.com>, Rob Herring <
rob...@kernel.org>, Mark Rutland <
mark.r...@arm.com>, Catalin Marinas <
catalin...@arm.com>, Will Deacon <
wi...@kernel.org>, Kishon Vijay Abraham I <
kis...@ti.com>, Lorenzo Pieralisi <
lorenzo....@arm.com>, Arnd Bergmann <
ar...@arndb.de>, Greg Kroah-Hartman <
gre...@linuxfoundation.org>, Jingoo Han <
jingo...@gmail.com>, Gustavo Pimentel <
gustavo....@synopsys.com>, Marek Vasut <
marek.vas...@gmail.com>, Yoshihiro Shimoda <
yoshihiro....@renesas.com>, Shawn Lin <
shaw...@rock-chips.com>, Heiko Stuebner <
he...@sntech.de>
CC: Andrew Murray <
andrew...@arm.com>,
linu...@vger.kernel.org,
linux-ar...@lists.infradead.org,
linux-re...@vger.kernel.org,
linux-r...@lists.infradead.org,
linux-...@vger.kernel.org,
devic...@vger.kernel.org, Lad Prabhakar <
prabhakar.ma...@bp.renesas.com>
Hi Lad,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on pci/next]
[also build test WARNING on robh/for-next arm64/for-next/core char-misc/char-misc-testing v5.6-rc1 next-20200211]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see
https://stackoverflow.com/a/37406982]
url:
https://github.com/0day-ci/linux/commits/Lad-Prabhakar/Add-support-for-PCIe-controller-to-work-in-endpoint-mode-on-R-Car-SoCs/20200211-191403
base:
https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (git://gitmirror/llvm_project 4dcc029edbe4bd5e30d4f0cdcf123ea4ed2b6418)
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <
l...@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/pci/controller/pcie-rcar-ep.c:226:8: warning: explicitly assigning value of variable of type 'u64' (aka 'unsigned long long') to itself [-Wself-assign]
size = size;
~~~~ ^ ~~~~
1 warning generated.
vim +226 drivers/pci/controller/pcie-rcar-ep.c
193
194 static int rcar_pcie_ep_set_bar(struct pci_epc *epc, u8 func_no,
195 struct pci_epf_bar *epf_bar)
196 {
197 struct rcar_pcie *ep = epc_get_drvdata(epc);
198 dma_addr_t cpu_addr = epf_bar->phys_addr;
199 int flags = epf_bar->flags | LAR_ENABLE | LAM_64BIT;
200 enum pci_barno bar = epf_bar->barno;
201 u64 size = 1ULL << fls64(epf_bar->size - 1);
202 u32 mask;
203 int idx;
204 int err;
205
206 idx = find_first_zero_bit(ep->ib_window_map, ep->num_ib_windows);
207 if (idx >= ep->num_ib_windows) {
208 dev_err(ep->dev, "no free inbound window\n");
209 return -EINVAL;
210 }
211
212 if ((flags & PCI_BASE_ADDRESS_SPACE) == PCI_BASE_ADDRESS_SPACE_IO)
213 flags |= IO_SPACE;
214
215 ep->bar_to_atu[bar] = idx;
216 /* use 64 bit bars */
217 set_bit(idx, ep->ib_window_map);
218 set_bit(idx + 1, ep->ib_window_map);
219
220 if (cpu_addr > 0) {
221 unsigned long nr_zeros = __ffs64(cpu_addr);
222 u64 alignment = 1ULL << nr_zeros;
223
224 size = min(size, alignment);
225 } else {
> 226 size = size;
227 }
228
229 size = min(size, 1ULL << 32);
230
231 mask = roundup_pow_of_two(size) - 1;
232 mask &= ~0xf;
233
234 rcar_pcie_set_inbound(ep->base, cpu_addr,
235 0x0, mask | flags, idx, false);
236
237 err = rcar_pcie_wait_for_phyrdy(ep->base);
238 if (err) {
239 dev_err(ep->dev, "phy not ready\n");
240 return -EINVAL;
241 }
242
243 return 0;
244 }
245
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuil...@lists.01.org