[chrome-os:chromeos-4.19 20/62] /tmp/cgroup-195689.s:7035: Error: bad expression
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-4.19
head: d2eeef58809494b0ea811ce578163de7a2478a22
commit: 0c8c2eaf12587ba14280b4e6388198d0183841ca [20/62] FROMLIST: ARM: dts: rockchip: Add marvell BT irq config
config: s390-randconfig-r006-20200615 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 487ca07fcc75d52755c9fe2ee05bcb3b6eeeec44)
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 s390 cross compiling tool for clang build
# apt-get install binutils-s390-linux-gnu
git checkout 0c8c2eaf12587ba14280b4e6388198d0183841ca
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Note: the chrome-os/chromeos-4.19 HEAD d2eeef58809494b0ea811ce578163de7a2478a22 builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>, old ones prefixed by <<):
^
In file included from kernel/cgroup/cgroup.c:35:
In file included from include/linux/init_task.h:17:
In file included from include/net/net_namespace.h:36:
In file included from include/linux/skbuff.h:34:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:79:
include/asm-generic/io.h:499:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : ^
include/uapi/linux/swab.h:21:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | ^
In file included from kernel/cgroup/cgroup.c:35:
In file included from include/linux/init_task.h:17:
In file included from include/net/net_namespace.h:36:
In file included from include/linux/skbuff.h:34:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:79:
include/asm-generic/io.h:499:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : ^
include/uapi/linux/swab.h:22:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0xff000000UL) >> 24)))
^
In file included from kernel/cgroup/cgroup.c:35:
In file included from include/linux/init_task.h:17:
In file included from include/net/net_namespace.h:36:
In file included from include/linux/skbuff.h:34:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:79:
include/asm-generic/io.h:499:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32'
__fswab32(x))
^
In file included from kernel/cgroup/cgroup.c:35:
In file included from include/linux/init_task.h:17:
In file included from include/net/net_namespace.h:36:
In file included from include/linux/skbuff.h:34:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:79:
include/asm-generic/io.h:510:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:520:46: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew(cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:530:46: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel(cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:592:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:600:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:608:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:626:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:635:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
In file included from kernel/cgroup/cgroup.c:62:
In file included from include/trace/events/cgroup.h:155:
In file included from include/trace/define_trace.h:96:
In file included from include/trace/trace_events.h:20:
In file included from include/linux/trace_events.h:7:
In file included from include/linux/trace_seq.h:5:
include/linux/seq_buf.h:35:12: warning: assigning to 'char *' from 'unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign]
s->buffer = buf;
^ ~~~
35 warnings generated.
/tmp/cgroup-195689.s: Assembler messages:
>> /tmp/cgroup-195689.s:7035: Error: bad expression
>> /tmp/cgroup-195689.s:7035: Error: junk at end of line, first unrecognized character is `r'
/tmp/cgroup-195689.s:21410: Error: bad expression
/tmp/cgroup-195689.s:21410: Error: junk at end of line, first unrecognized character is `r'
/tmp/cgroup-195689.s:21532: Error: bad expression
/tmp/cgroup-195689.s:21532: Error: junk at end of line, first unrecognized character is `r'
/tmp/cgroup-195689.s:32678: Error: bad expression
/tmp/cgroup-195689.s:32678: Error: junk at end of line, first unrecognized character is `r'
/tmp/cgroup-195689.s:33209: Error: bad expression
/tmp/cgroup-195689.s:33209: Error: junk at end of line, first unrecognized character is `r'
/tmp/cgroup-195689.s:34634: Error: bad expression
/tmp/cgroup-195689.s:34634: Error: junk at end of line, first unrecognized character is `r'
/tmp/cgroup-195689.s:35006: Error: bad expression
/tmp/cgroup-195689.s:35006: Error: junk at end of line, first unrecognized character is `r'
/tmp/cgroup-195689.s:44152: Error: bad expression
/tmp/cgroup-195689.s:44152: Error: junk at end of line, first unrecognized character is `r'
/tmp/cgroup-195689.s:44729: Error: bad expression
/tmp/cgroup-195689.s:44729: Error: junk at end of line, first unrecognized character is `r'
/tmp/cgroup-195689.s:45850: Error: bad expression
/tmp/cgroup-195689.s:45850: Error: junk at end of line, first unrecognized character is `r'
clang-11: error: assembler command failed with exit code 1 (use -v to see invocation)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[linux-next:master 717/2089] drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:1586:41: sparse: sparse: incompatible types in conditional expression (different base types):
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 5fcb9628fd1227a5f11d87171cb1b8b5c414d9d9
commit: bcdc7c05bd2dd8fa8afbd725110d5ec3075d4b42 [717/2089] drm/amd/powerplay: enable thermal throttling logging support V2
config: x86_64-randconfig-s022-20200617 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-rc1-6-g78f577f8-dirty
git checkout bcdc7c05bd2dd8fa8afbd725110d5ec3075d4b42
# save the attached .config to linux build tree
make W=1 C=1 ARCH=x86_64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
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/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:177:31: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:185:25: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:185:25: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:185:25: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:210:17: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:314:28: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:315:17: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:332:36: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:333:25: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:335:21: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:336:53: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:337:33: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:360:25: sparse: sparse: cast to restricted __le16
drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:361:25: sparse: sparse: cast to restricted __le16
drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:587:45: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:601:46: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:615:43: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:629:43: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:643:43: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:660:51: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:1076:28: sparse: sparse: cast to restricted __le32
>> drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:1586:41: sparse: sparse: incompatible types in conditional expression (different base types):
>> drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:1586:41: sparse: void
>> drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:1586:41: sparse: int
vim +1586 drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c
1522
1523 static int smu_v11_0_irq_process(struct amdgpu_device *adev,
1524 struct amdgpu_irq_src *source,
1525 struct amdgpu_iv_entry *entry)
1526 {
1527 struct smu_context *smu = &adev->smu;
1528 uint32_t client_id = entry->client_id;
1529 uint32_t src_id = entry->src_id;
1530 /*
1531 * ctxid is used to distinguish different
1532 * events for SMCToHost interrupt.
1533 */
1534 uint32_t ctxid = entry->src_data[0];
1535 uint32_t data;
1536 /*
1537 * if the throttling continues, the logging will be performed every
1538 * minute to avoid log flooding.
1539 */
1540 static DEFINE_RATELIMIT_STATE(ratelimit_state, 60 * HZ, 1);
1541
1542 if (client_id == SOC15_IH_CLIENTID_THM) {
1543 switch (src_id) {
1544 case THM_11_0__SRCID__THM_DIG_THERM_L2H:
1545 dev_emerg(adev->dev, "ERROR: GPU over temperature range(SW CTF) detected!\n");
1546 /*
1547 * SW CTF just occurred.
1548 * Try to do a graceful shutdown to prevent further damage.
1549 */
1550 dev_emerg(adev->dev, "ERROR: System is going to shutdown due to GPU SW CTF!\n");
1551 orderly_poweroff(true);
1552 break;
1553 case THM_11_0__SRCID__THM_DIG_THERM_H2L:
1554 dev_emerg(adev->dev, "ERROR: GPU under temperature range detected\n");
1555 break;
1556 default:
1557 dev_emerg(adev->dev, "ERROR: GPU under temperature range unknown src id (%d)\n",
1558 src_id);
1559 break;
1560 }
1561 } else if (client_id == SOC15_IH_CLIENTID_ROM_SMUIO) {
1562 dev_emerg(adev->dev, "ERROR: GPU HW Critical Temperature Fault(aka CTF) detected!\n");
1563 /*
1564 * HW CTF just occurred. Shutdown to prevent further damage.
1565 */
1566 dev_emerg(adev->dev, "ERROR: System is going to shutdown due to GPU HW CTF!\n");
1567 orderly_poweroff(true);
1568 } else if (client_id == SOC15_IH_CLIENTID_MP1) {
1569 if (src_id == 0xfe) {
1570 /* ACK SMUToHost interrupt */
1571 data = RREG32_SOC15(MP1, 0, mmMP1_SMN_IH_SW_INT_CTRL);
1572 data = REG_SET_FIELD(data, MP1_SMN_IH_SW_INT_CTRL, INT_ACK, 1);
1573 WREG32_SOC15(MP1, 0, mmMP1_SMN_IH_SW_INT_CTRL, data);
1574
1575 switch (ctxid) {
1576 case 0x3:
1577 dev_dbg(adev->dev, "Switched to AC mode!\n");
1578 smu_v11_0_ack_ac_dc_interrupt(&adev->smu);
1579 break;
1580 case 0x4:
1581 dev_dbg(adev->dev, "Switched to DC mode!\n");
1582 smu_v11_0_ack_ac_dc_interrupt(&adev->smu);
1583 break;
1584 case 0x7:
1585 if (__ratelimit(&ratelimit_state))
> 1586 smu_log_thermal_throttling(smu);
1587
1588 break;
1589 }
1590 }
1591 }
1592
1593 return 0;
1594 }
1595
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
drivers/net/ethernet/amazon/ena/ena_netdev.c:312:9: warning: missing braces around initializer
by kernel test robot
Hi Sameeh,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 69119673bd50b176ded34032fadd41530fb5af21
commit: 548c4940b9f1f527f81509468dd60b61418880b6 net: ena: Implement XDP_TX action
date: 6 months ago
config: i386-randconfig-r004-20200617 (attached as .config)
compiler: gcc-4.9 (Ubuntu 4.9.3-13ubuntu2) 4.9.3
reproduce (this is a W=1 build):
git checkout 548c4940b9f1f527f81509468dd60b61418880b6
# save the attached .config to linux build tree
make W=1 ARCH=i386
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 >>, old ones prefixed by <<):
drivers/net/ethernet/amazon/ena/ena_netdev.c: In function 'ena_xdp_xmit_buff':
>> drivers/net/ethernet/amazon/ena/ena_netdev.c:312:9: warning: missing braces around initializer [-Wmissing-braces]
struct ena_com_tx_ctx ena_tx_ctx = {0};
^
drivers/net/ethernet/amazon/ena/ena_netdev.c:312:9: warning: (near initialization for 'ena_tx_ctx.ena_meta') [-Wmissing-braces]
drivers/net/ethernet/amazon/ena/ena_netdev.c:315:19: warning: variable 'rx_ring' set but not used [-Wunused-but-set-variable]
struct ena_ring *rx_ring;
^
drivers/net/ethernet/amazon/ena/ena_netdev.c: At top level:
drivers/net/ethernet/amazon/ena/ena_netdev.c:465:6: warning: no previous prototype for 'ena_xdp_exchange_program_rx_in_range' [-Wmissing-prototypes]
void ena_xdp_exchange_program_rx_in_range(struct ena_adapter *adapter,
^
drivers/net/ethernet/amazon/ena/ena_netdev.c:486:6: warning: no previous prototype for 'ena_xdp_exchange_program' [-Wmissing-prototypes]
void ena_xdp_exchange_program(struct ena_adapter *adapter,
^
drivers/net/ethernet/amazon/ena/ena_netdev.c:1553:5: warning: no previous prototype for 'ena_xdp_handle_buff' [-Wmissing-prototypes]
int ena_xdp_handle_buff(struct ena_ring *rx_ring, struct xdp_buff *xdp)
^
vim +312 drivers/net/ethernet/amazon/ena/ena_netdev.c
305
306 static int ena_xdp_xmit_buff(struct net_device *dev,
307 struct xdp_buff *xdp,
308 int qid,
309 struct ena_rx_buffer *rx_info)
310 {
311 struct ena_adapter *adapter = netdev_priv(dev);
> 312 struct ena_com_tx_ctx ena_tx_ctx = {0};
313 struct ena_tx_buffer *tx_info;
314 struct ena_ring *xdp_ring;
315 struct ena_ring *rx_ring;
316 u16 next_to_use, req_id;
317 int rc;
318 void *push_hdr;
319 u32 push_len;
320
321 xdp_ring = &adapter->tx_ring[qid];
322 next_to_use = xdp_ring->next_to_use;
323 req_id = xdp_ring->free_ids[next_to_use];
324 tx_info = &xdp_ring->tx_buffer_info[req_id];
325 tx_info->num_of_bufs = 0;
326 rx_ring = &xdp_ring->adapter->rx_ring[qid -
327 xdp_ring->adapter->xdp_first_ring];
328 page_ref_inc(rx_info->page);
329 tx_info->xdp_rx_page = rx_info->page;
330
331 rc = ena_xdp_tx_map_buff(xdp_ring, tx_info, xdp, &push_hdr, &push_len);
332 if (unlikely(rc))
333 goto error_drop_packet;
334
335 ena_tx_ctx.ena_bufs = tx_info->bufs;
336 ena_tx_ctx.push_header = push_hdr;
337 ena_tx_ctx.num_bufs = tx_info->num_of_bufs;
338 ena_tx_ctx.req_id = req_id;
339 ena_tx_ctx.header_len = push_len;
340
341 rc = ena_xmit_common(dev,
342 xdp_ring,
343 tx_info,
344 &ena_tx_ctx,
345 next_to_use,
346 xdp->data_end - xdp->data);
347 if (rc)
348 goto error_unmap_dma;
349 /* trigger the dma engine. ena_com_write_sq_doorbell()
350 * has a mb
351 */
352 ena_com_write_sq_doorbell(xdp_ring->ena_com_io_sq);
353 u64_stats_update_begin(&xdp_ring->syncp);
354 xdp_ring->tx_stats.doorbells++;
355 u64_stats_update_end(&xdp_ring->syncp);
356
357 return NETDEV_TX_OK;
358
359 error_unmap_dma:
360 ena_unmap_tx_buff(xdp_ring, tx_info);
361 tx_info->xdpf = NULL;
362 error_drop_packet:
363
364 return NETDEV_TX_OK;
365 }
366
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
drivers/irqchip/irq-bcm7038-l1.c:312:13: error: implicit declaration of function 'cpu_logical_map'
by kernel test robot
Hi Justin,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 69119673bd50b176ded34032fadd41530fb5af21
commit: 6468fc18b00685c82408f40e9569c0d3527862b8 irqchip/irq-bcm7038-l1: Add PM support
date: 7 months ago
config: mips-randconfig-r002-20200617 (attached as .config)
compiler: mips-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
git checkout 6468fc18b00685c82408f40e9569c0d3527862b8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
drivers/irqchip/irq-bcm7038-l1.c: In function 'bcm7038_l1_suspend':
>> drivers/irqchip/irq-bcm7038-l1.c:312:13: error: implicit declaration of function 'cpu_logical_map' [-Werror=implicit-function-declaration]
312 | boot_cpu = cpu_logical_map(0);
| ^~~~~~~~~~~~~~~
drivers/irqchip/irq-bcm7038-l1.c: At top level:
drivers/irqchip/irq-bcm7038-l1.c:393:12: warning: no previous prototype for 'bcm7038_l1_of_init' [-Wmissing-prototypes]
393 | int __init bcm7038_l1_of_init(struct device_node *dn,
| ^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/cpu_logical_map +312 drivers/irqchip/irq-bcm7038-l1.c
305
306 static int bcm7038_l1_suspend(void)
307 {
308 struct bcm7038_l1_chip *intc;
309 int boot_cpu, word;
310
311 /* Wakeup interrupt should only come from the boot cpu */
> 312 boot_cpu = cpu_logical_map(0);
313
314 list_for_each_entry(intc, &bcm7038_l1_intcs_list, list) {
315 for (word = 0; word < intc->n_words; word++) {
316 l1_writel(~intc->wake_mask[word],
317 intc->cpus[boot_cpu]->map_base + reg_mask_set(intc, word));
318 l1_writel(intc->wake_mask[word],
319 intc->cpus[boot_cpu]->map_base + reg_mask_clr(intc, word));
320 }
321 }
322
323 return 0;
324 }
325
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[kbuild] drivers/hwtracing/coresight/coresight-cti.c:862 cti_probe() error: we previously assumed 'drvdata' could be null (see line 759)
by Dan Carpenter
Hi Mike,
Here is the buggy line:
861 err_out:
862 cti_pm_release(drvdata);
^^^^^^^
To me it's a red flag any time there is a label called "out:". The
label should say what is being released like "goto unregister_notifier;".
The style of error handling here is called a "free everything function"
and it is the most error prone style of error handling.
A better way to write error handling is to track the most recently
allocated resource and free it with a well named goto.
a = alloc();
if (!a)
return -ENOMEM;
b = alloc();
if (!b) {
ret = -ENOMEM;
goto free_a;
}
c = alloc();
if (!c) {
ret = -ENOMEM;
goto free_b;
...
return 0;
free_b:
free(b);
free_a:
free(a);
The advantage of this is that 1) You only have to track the most recent
allocation. 2) You can easily verify that the most recent allocation
is freed. 3) Now you can create a free function by copy and pasting
and adding a free(c);
void my_free(struct whatever *p)
{
free(c);
free(b);
free(a);
}
This style uses about the same number of lines of code because although
we duplicate the free(b) and free(a), we can remove some if statements
so it ends up being about the same.
The main problem with free everything function is that they free things
which have not been allocated. I have added more explanation at the
bottom of this bug report.
I am also sending a patch which hopefully is clear but I can't actually
compile it. :(
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b791d1bdf9212d944d749a5c7ff6febdba241771
commit: e9b880581d555c8f7b58c7d19cc3f8f9016a1b5f coresight: cti: Add CPU Hotplug handling to CTI driver
config: arm-randconfig-m031-20200612 (attached as .config)
compiler: arm-linux-gnueabi-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>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/hwtracing/coresight/coresight-cti.c:862 cti_probe() error: we previously assumed 'drvdata' could be null (see line 759)
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git remote update linus
git checkout e9b880581d555c8f7b58c7d19cc3f8f9016a1b5f
vim +/drvdata +862 drivers/hwtracing/coresight/coresight-cti.c
835d722ba10ac92 Mike Leach 2020-03-20 747 static int cti_probe(struct amba_device *adev, const struct amba_id *id)
835d722ba10ac92 Mike Leach 2020-03-20 748 {
835d722ba10ac92 Mike Leach 2020-03-20 749 int ret = 0;
835d722ba10ac92 Mike Leach 2020-03-20 750 void __iomem *base;
835d722ba10ac92 Mike Leach 2020-03-20 751 struct device *dev = &adev->dev;
835d722ba10ac92 Mike Leach 2020-03-20 752 struct cti_drvdata *drvdata = NULL;
835d722ba10ac92 Mike Leach 2020-03-20 753 struct coresight_desc cti_desc;
835d722ba10ac92 Mike Leach 2020-03-20 754 struct coresight_platform_data *pdata = NULL;
835d722ba10ac92 Mike Leach 2020-03-20 755 struct resource *res = &adev->res;
835d722ba10ac92 Mike Leach 2020-03-20 756
835d722ba10ac92 Mike Leach 2020-03-20 757 /* driver data*/
835d722ba10ac92 Mike Leach 2020-03-20 758 drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL);
835d722ba10ac92 Mike Leach 2020-03-20 @759 if (!drvdata) {
835d722ba10ac92 Mike Leach 2020-03-20 760 ret = -ENOMEM;
835d722ba10ac92 Mike Leach 2020-03-20 761 dev_info(dev, "%s, mem err\n", __func__);
No need to print an error message for kmalloc() failures. It already
has a stack trace built in.
835d722ba10ac92 Mike Leach 2020-03-20 762 goto err_out;
^^^^^^^^^^^^
835d722ba10ac92 Mike Leach 2020-03-20 763 }
835d722ba10ac92 Mike Leach 2020-03-20 764
835d722ba10ac92 Mike Leach 2020-03-20 765 /* Validity for the resource is already checked by the AMBA core */
835d722ba10ac92 Mike Leach 2020-03-20 766 base = devm_ioremap_resource(dev, res);
835d722ba10ac92 Mike Leach 2020-03-20 767 if (IS_ERR(base)) {
835d722ba10ac92 Mike Leach 2020-03-20 768 ret = PTR_ERR(base);
835d722ba10ac92 Mike Leach 2020-03-20 769 dev_err(dev, "%s, remap err\n", __func__);
At this point "drvdata->ctidev.cpu" is zero.
835d722ba10ac92 Mike Leach 2020-03-20 770 goto err_out;
835d722ba10ac92 Mike Leach 2020-03-20 771 }
835d722ba10ac92 Mike Leach 2020-03-20 772 drvdata->base = base;
835d722ba10ac92 Mike Leach 2020-03-20 773
835d722ba10ac92 Mike Leach 2020-03-20 774 dev_set_drvdata(dev, drvdata);
835d722ba10ac92 Mike Leach 2020-03-20 775
835d722ba10ac92 Mike Leach 2020-03-20 776 /* default CTI device info */
835d722ba10ac92 Mike Leach 2020-03-20 777 drvdata->ctidev.cpu = -1;
^^^^^^^^^^^^^^^^^^^^^^^^
835d722ba10ac92 Mike Leach 2020-03-20 778 drvdata->ctidev.nr_trig_con = 0;
835d722ba10ac92 Mike Leach 2020-03-20 779 drvdata->ctidev.ctm_id = 0;
835d722ba10ac92 Mike Leach 2020-03-20 780 INIT_LIST_HEAD(&drvdata->ctidev.trig_cons);
835d722ba10ac92 Mike Leach 2020-03-20 781
835d722ba10ac92 Mike Leach 2020-03-20 782 spin_lock_init(&drvdata->spinlock);
835d722ba10ac92 Mike Leach 2020-03-20 783
835d722ba10ac92 Mike Leach 2020-03-20 784 /* initialise CTI driver config values */
835d722ba10ac92 Mike Leach 2020-03-20 785 cti_set_default_config(dev, drvdata);
835d722ba10ac92 Mike Leach 2020-03-20 786
835d722ba10ac92 Mike Leach 2020-03-20 787 pdata = coresight_cti_get_platform_data(dev);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This function sets drvdata->ctidev.cpu on some success paths and also
on certain failure paths.
835d722ba10ac92 Mike Leach 2020-03-20 788 if (IS_ERR(pdata)) {
835d722ba10ac92 Mike Leach 2020-03-20 789 dev_err(dev, "coresight_cti_get_platform_data err\n");
835d722ba10ac92 Mike Leach 2020-03-20 790 ret = PTR_ERR(pdata);
835d722ba10ac92 Mike Leach 2020-03-20 791 goto err_out;
835d722ba10ac92 Mike Leach 2020-03-20 792 }
835d722ba10ac92 Mike Leach 2020-03-20 793
835d722ba10ac92 Mike Leach 2020-03-20 794 /* default to powered - could change on PM notifications */
835d722ba10ac92 Mike Leach 2020-03-20 795 drvdata->config.hw_powered = true;
835d722ba10ac92 Mike Leach 2020-03-20 796
835d722ba10ac92 Mike Leach 2020-03-20 797 /* set up device name - will depend if cpu bound or otherwise */
835d722ba10ac92 Mike Leach 2020-03-20 798 if (drvdata->ctidev.cpu >= 0)
835d722ba10ac92 Mike Leach 2020-03-20 799 cti_desc.name = devm_kasprintf(dev, GFP_KERNEL, "cti_cpu%d",
835d722ba10ac92 Mike Leach 2020-03-20 800 drvdata->ctidev.cpu);
835d722ba10ac92 Mike Leach 2020-03-20 801 else
835d722ba10ac92 Mike Leach 2020-03-20 802 cti_desc.name = coresight_alloc_device_name(&cti_sys_devs, dev);
835d722ba10ac92 Mike Leach 2020-03-20 803 if (!cti_desc.name) {
835d722ba10ac92 Mike Leach 2020-03-20 804 ret = -ENOMEM;
835d722ba10ac92 Mike Leach 2020-03-20 805 goto err_out;
835d722ba10ac92 Mike Leach 2020-03-20 806 }
835d722ba10ac92 Mike Leach 2020-03-20 807
e9b880581d555c8 Mike Leach 2020-05-18 808 /* setup CPU power management handling for CPU bound CTI devices. */
e9b880581d555c8 Mike Leach 2020-05-18 809 if (drvdata->ctidev.cpu >= 0) {
e9b880581d555c8 Mike Leach 2020-05-18 810 cti_cpu_drvdata[drvdata->ctidev.cpu] = drvdata;
e9b880581d555c8 Mike Leach 2020-05-18 811 if (!nr_cti_cpu++) {
^^^^^^^^^^^^
e9b880581d555c8 Mike Leach 2020-05-18 812 cpus_read_lock();
e9b880581d555c8 Mike Leach 2020-05-18 813 ret = cpuhp_setup_state_nocalls_cpuslocked(
e9b880581d555c8 Mike Leach 2020-05-18 814 CPUHP_AP_ARM_CORESIGHT_CTI_STARTING,
e9b880581d555c8 Mike Leach 2020-05-18 815 "arm/coresight_cti:starting",
e9b880581d555c8 Mike Leach 2020-05-18 816 cti_starting_cpu, cti_dying_cpu);
e9b880581d555c8 Mike Leach 2020-05-18 817
e9b880581d555c8 Mike Leach 2020-05-18 818 cpus_read_unlock();
e9b880581d555c8 Mike Leach 2020-05-18 819 if (ret)
e9b880581d555c8 Mike Leach 2020-05-18 820 goto err_out;
e9b880581d555c8 Mike Leach 2020-05-18 821 }
e9b880581d555c8 Mike Leach 2020-05-18 822 }
e9b880581d555c8 Mike Leach 2020-05-18 823
3c5597e398124e6 Mike Leach 2020-03-20 824 /* create dynamic attributes for connections */
3c5597e398124e6 Mike Leach 2020-03-20 825 ret = cti_create_cons_sysfs(dev, drvdata);
3c5597e398124e6 Mike Leach 2020-03-20 826 if (ret) {
3c5597e398124e6 Mike Leach 2020-03-20 827 dev_err(dev, "%s: create dynamic sysfs entries failed\n",
3c5597e398124e6 Mike Leach 2020-03-20 828 cti_desc.name);
3c5597e398124e6 Mike Leach 2020-03-20 829 goto err_out;
3c5597e398124e6 Mike Leach 2020-03-20 830 }
3c5597e398124e6 Mike Leach 2020-03-20 831
835d722ba10ac92 Mike Leach 2020-03-20 832 /* set up coresight component description */
835d722ba10ac92 Mike Leach 2020-03-20 833 cti_desc.pdata = pdata;
835d722ba10ac92 Mike Leach 2020-03-20 834 cti_desc.type = CORESIGHT_DEV_TYPE_ECT;
835d722ba10ac92 Mike Leach 2020-03-20 835 cti_desc.subtype.ect_subtype = CORESIGHT_DEV_SUBTYPE_ECT_CTI;
835d722ba10ac92 Mike Leach 2020-03-20 836 cti_desc.ops = &cti_ops;
3c5597e398124e6 Mike Leach 2020-03-20 837 cti_desc.groups = drvdata->ctidev.con_groups;
835d722ba10ac92 Mike Leach 2020-03-20 838 cti_desc.dev = dev;
835d722ba10ac92 Mike Leach 2020-03-20 839 drvdata->csdev = coresight_register(&cti_desc);
835d722ba10ac92 Mike Leach 2020-03-20 840 if (IS_ERR(drvdata->csdev)) {
835d722ba10ac92 Mike Leach 2020-03-20 841 ret = PTR_ERR(drvdata->csdev);
835d722ba10ac92 Mike Leach 2020-03-20 842 goto err_out;
835d722ba10ac92 Mike Leach 2020-03-20 843 }
835d722ba10ac92 Mike Leach 2020-03-20 844
835d722ba10ac92 Mike Leach 2020-03-20 845 /* add to list of CTI devices */
835d722ba10ac92 Mike Leach 2020-03-20 846 mutex_lock(&ect_mutex);
835d722ba10ac92 Mike Leach 2020-03-20 847 list_add(&drvdata->node, &ect_net);
177af8285b59a38 Mike Leach 2020-03-20 848 /* set any cross references */
177af8285b59a38 Mike Leach 2020-03-20 849 cti_update_conn_xrefs(drvdata);
835d722ba10ac92 Mike Leach 2020-03-20 850 mutex_unlock(&ect_mutex);
835d722ba10ac92 Mike Leach 2020-03-20 851
835d722ba10ac92 Mike Leach 2020-03-20 852 /* set up release chain */
835d722ba10ac92 Mike Leach 2020-03-20 853 drvdata->csdev_release = drvdata->csdev->dev.release;
835d722ba10ac92 Mike Leach 2020-03-20 854 drvdata->csdev->dev.release = cti_device_release;
835d722ba10ac92 Mike Leach 2020-03-20 855
835d722ba10ac92 Mike Leach 2020-03-20 856 /* all done - dec pm refcount */
835d722ba10ac92 Mike Leach 2020-03-20 857 pm_runtime_put(&adev->dev);
835d722ba10ac92 Mike Leach 2020-03-20 858 dev_info(&drvdata->csdev->dev, "CTI initialized\n");
835d722ba10ac92 Mike Leach 2020-03-20 859 return 0;
835d722ba10ac92 Mike Leach 2020-03-20 860
835d722ba10ac92 Mike Leach 2020-03-20 861 err_out:
e9b880581d555c8 Mike Leach 2020-05-18 @862 cti_pm_release(drvdata);
^^^^^^^
835d722ba10ac92 Mike Leach 2020-03-20 863 return ret;
835d722ba10ac92 Mike Leach 2020-03-20 864 }
750 /* release PM registrations */
751 static void cti_pm_release(struct cti_drvdata *drvdata)
752 {
753 if (drvdata->ctidev.cpu >= 0) {
^^^^^^^
We are dereferencing this when it wasn't allocated.
754 if (--nr_cti_cpu == 0) {
^^^^^^^^^^^^
If devm_kasprintf() fails then we are decrementing this when it wasn't
incremented so now it can be negative.
755 cpu_pm_unregister_notifier(&cti_cpu_pm_nb);
If the cpu_pm_register_notifier() fails then we are unregistering this
when it wasn't registered. It turns out this is harmless but if we
only free things which have been allocated then it becomes a lot
easier to audit the code.
756
757 cpuhp_remove_state_nocalls(
758 CPUHP_AP_ARM_CORESIGHT_CTI_STARTING);
If cpuhp_setup_state_nocalls_cpuslocked() failed then this wasn't
allocated. I believe this is harmless.
759 }
760 cti_cpu_drvdata[drvdata->ctidev.cpu] = NULL;
761 }
762 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org
2 years, 3 months
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:192:16: sparse: sparse: incompatible types in comparison expression (different type sizes):
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 69119673bd50b176ded34032fadd41530fb5af21
commit: c12b84d6e0d70f1185e6daddfd12afb671791b6e drm/amdgpu: use the BAR if possible in amdgpu_device_vram_access v2
date: 4 months ago
config: x86_64-randconfig-s022-20200617 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-rc1-6-g78f577f8-dirty
git checkout c12b84d6e0d70f1185e6daddfd12afb671791b6e
# save the attached .config to linux build tree
make W=1 C=1 ARCH=x86_64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
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/gpu/drm/amd/amdgpu/amdgpu_device.c:192:16: sparse: sparse: incompatible types in comparison expression (different type sizes):
>> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:192:16: sparse: unsigned long *
>> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:192:16: sparse: unsigned long long *
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:442:39: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:462:31: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1551:65: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1556:55: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1557:50: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1558:50: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1559:56: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1561:25: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1562:45: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1563:51: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1564:55: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1565:57: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1567:25: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1568:53: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1570:25: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1572:25: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1573:46: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1577:73: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1579:33: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1581:33: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1592:73: sparse: sparse: cast to restricted __le32
vim +192 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
171
172 /**
173 * VRAM access helper functions.
174 *
175 * amdgpu_device_vram_access - read/write a buffer in vram
176 *
177 * @adev: amdgpu_device pointer
178 * @pos: offset of the buffer in vram
179 * @buf: virtual address of the buffer in system memory
180 * @size: read/write size, sizeof(@buf) must > @size
181 * @write: true - write to vram, otherwise - read from vram
182 */
183 void amdgpu_device_vram_access(struct amdgpu_device *adev, loff_t pos,
184 uint32_t *buf, size_t size, bool write)
185 {
186 unsigned long flags;
187 uint32_t hi = ~0;
188 uint64_t last;
189
190
191 #ifdef CONFIG_64BIT
> 192 last = min(pos + size, adev->gmc.visible_vram_size);
193 if (last > pos) {
194 void __iomem *addr = adev->mman.aper_base_kaddr + pos;
195 size_t count = last - pos;
196
197 if (write) {
198 memcpy_toio(addr, buf, count);
199 mb();
200 amdgpu_asic_flush_hdp(adev, NULL);
201 } else {
202 amdgpu_asic_invalidate_hdp(adev, NULL);
203 mb();
204 memcpy_fromio(buf, addr, count);
205 }
206
207 if (count == size)
208 return;
209
210 pos += count;
211 buf += count / 4;
212 size -= count;
213 }
214 #endif
215
216 spin_lock_irqsave(&adev->mmio_idx_lock, flags);
217 for (last = pos + size; pos < last; pos += 4) {
218 uint32_t tmp = pos >> 31;
219
220 WREG32_NO_KIQ(mmMM_INDEX, ((uint32_t)pos) | 0x80000000);
221 if (tmp != hi) {
222 WREG32_NO_KIQ(mmMM_INDEX_HI, tmp);
223 hi = tmp;
224 }
225 if (write)
226 WREG32_NO_KIQ(mmMM_DATA, *buf++);
227 else
228 *buf++ = RREG32_NO_KIQ(mmMM_DATA);
229 }
230 spin_unlock_irqrestore(&adev->mmio_idx_lock, flags);
231 }
232
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c:32:5: warning: no previous prototype for 'amdgpu_fru_read_eeprom'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 69119673bd50b176ded34032fadd41530fb5af21
commit: bd607166af7fe31f8d8e9c575f4561a4b56b9f24 drm/amdgpu: Enable reading FRU chip via I2C v3
date: 3 months ago
config: ia64-randconfig-r012-20200617 (attached as .config)
compiler: ia64-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
git checkout bd607166af7fe31f8d8e9c575f4561a4b56b9f24
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
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 >>, old ones prefixed by <<):
>> drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c:32:5: warning: no previous prototype for 'amdgpu_fru_read_eeprom' [-Wmissing-prototypes]
32 | int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_t addrptr,
| ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c:69:5: warning: no previous prototype for 'amdgpu_fru_get_product_info' [-Wmissing-prototypes]
69 | int amdgpu_fru_get_product_info(struct amdgpu_device *adev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c:23:
drivers/gpu/drm/amd/amdgpu/amdgpu.h:177:18: warning: 'sched_policy' defined but not used [-Wunused-const-variable=]
177 | static const int sched_policy = KFD_SCHED_POLICY_HWS;
| ^~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:33,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
from drivers/gpu/drm/amd/amdgpu/../include/dm_pp_interface.h:26,
from drivers/gpu/drm/amd/amdgpu/amdgpu.h:53,
from drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c:23:
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:76:32: warning: 'dc_fixpt_ln2_div_2' defined but not used [-Wunused-const-variable=]
76 | static const struct fixed31_32 dc_fixpt_ln2_div_2 = { 1488522236LL };
| ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:75:32: warning: 'dc_fixpt_ln2' defined but not used [-Wunused-const-variable=]
75 | static const struct fixed31_32 dc_fixpt_ln2 = { 2977044471LL };
| ^~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:74:32: warning: 'dc_fixpt_e' defined but not used [-Wunused-const-variable=]
74 | static const struct fixed31_32 dc_fixpt_e = { 11674931555LL };
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:73:32: warning: 'dc_fixpt_two_pi' defined but not used [-Wunused-const-variable=]
73 | static const struct fixed31_32 dc_fixpt_two_pi = { 26986075409LL };
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:72:32: warning: 'dc_fixpt_pi' defined but not used [-Wunused-const-variable=]
72 | static const struct fixed31_32 dc_fixpt_pi = { 13493037705LL };
| ^~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:67:32: warning: 'dc_fixpt_zero' defined but not used [-Wunused-const-variable=]
67 | static const struct fixed31_32 dc_fixpt_zero = { 0 };
| ^~~~~~~~~~~~~
vim +/amdgpu_fru_read_eeprom +32 drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
31
> 32 int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_t addrptr,
33 unsigned char *buff)
34 {
35 int ret, size;
36 struct i2c_msg msg = {
37 .addr = I2C_PRODUCT_INFO_ADDR,
38 .flags = I2C_M_RD,
39 .buf = buff,
40 };
41 buff[0] = 0;
42 buff[1] = addrptr;
43 msg.len = I2C_PRODUCT_INFO_ADDR_SIZE + 1;
44 ret = i2c_transfer(&adev->pm.smu_i2c, &msg, 1);
45
46 if (ret < 1) {
47 DRM_WARN("FRU: Failed to get size field");
48 return ret;
49 }
50
51 /* The size returned by the i2c requires subtraction of 0xC0 since the
52 * size apparently always reports as 0xC0+actual size.
53 */
54 size = buff[2] - I2C_PRODUCT_INFO_OFFSET;
55 /* Add 1 since address field was 1 byte */
56 buff[1] = addrptr + 1;
57
58 msg.len = I2C_PRODUCT_INFO_ADDR_SIZE + size;
59 ret = i2c_transfer(&adev->pm.smu_i2c, &msg, 1);
60
61 if (ret < 1) {
62 DRM_WARN("FRU: Failed to get data field");
63 return ret;
64 }
65
66 return size;
67 }
68
> 69 int amdgpu_fru_get_product_info(struct amdgpu_device *adev)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn21/rn_clk_mgr.c:465:6: warning: no previous prototype for 'clk_mgr_helper_populate_bw_params'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 69119673bd50b176ded34032fadd41530fb5af21
commit: 07842d54b95a1c236ba2bc237e32eeac476fc967 drm/amd/display: add Renoir to kconfig
date: 10 months ago
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
git checkout 07842d54b95a1c236ba2bc237e32eeac476fc967
# save the attached .config to linux build tree
make W=1 ARCH=i386
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 >>, old ones prefixed by <<):
drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn21/rn_clk_mgr.c:55:6: warning: no previous prototype for 'rn_update_clocks' [-Wmissing-prototypes]
55 | void rn_update_clocks(struct clk_mgr *clk_mgr_base,
| ^~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn21/rn_clk_mgr.c: In function 'rn_dump_clk_registers':
drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn21/rn_clk_mgr.c:199:37: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
199 | if (regs_and_bypass->dppclk_bypass < 0 || regs_and_bypass->dppclk_bypass > 4)
| ^
drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn21/rn_clk_mgr.c:202:37: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
202 | if (regs_and_bypass->dcfclk_bypass < 0 || regs_and_bypass->dcfclk_bypass > 4)
| ^
drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn21/rn_clk_mgr.c:205:38: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
205 | if (regs_and_bypass->dispclk_bypass < 0 || regs_and_bypass->dispclk_bypass > 4)
| ^
drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn21/rn_clk_mgr.c:208:39: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
208 | if (regs_and_bypass->dprefclk_bypass < 0 || regs_and_bypass->dprefclk_bypass > 4)
| ^
drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn21/rn_clk_mgr.c: At top level:
drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn21/rn_clk_mgr.c:315:6: warning: no previous prototype for 'rn_get_clk_states' [-Wmissing-prototypes]
315 | void rn_get_clk_states(struct clk_mgr *clk_mgr_base, struct clk_states *s)
| ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn21/rn_clk_mgr.c:325:6: warning: no previous prototype for 'rn_enable_pme_wa' [-Wmissing-prototypes]
325 | void rn_enable_pme_wa(struct clk_mgr *clk_mgr_base)
| ^~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn21/rn_clk_mgr.c:408:6: warning: no previous prototype for 'build_watermark_ranges' [-Wmissing-prototypes]
408 | void build_watermark_ranges(struct clk_bw_params *bw_params, struct pp_smu_wm_range_sets *ranges)
| ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn21/rn_clk_mgr.c:465:6: warning: no previous prototype for 'clk_mgr_helper_populate_bw_params' [-Wmissing-prototypes]
465 | void clk_mgr_helper_populate_bw_params(struct clk_bw_params *bw_params, struct dpm_clocks *clock_table, struct hw_asic_id *asic_id)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn21/rn_clk_mgr.c:43:
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:221:29: warning: 'UVD0_BASE' defined but not used [-Wunused-const-variable=]
221 | static const struct IP_BASE UVD0_BASE ={ { { { 0x00007800, 0x00007E00, 0x02403000, 0, 0 } },
| ^~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:214:29: warning: 'USB0_BASE' defined but not used [-Wunused-const-variable=]
214 | static const struct IP_BASE USB0_BASE ={ { { { 0x0242A800, 0x05B00000, 0, 0, 0 } },
| ^~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:207:29: warning: 'UMC_BASE' defined but not used [-Wunused-const-variable=]
207 | static const struct IP_BASE UMC_BASE ={ { { { 0x00014000, 0x02425800, 0, 0, 0 } },
| ^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:200:29: warning: 'THM_BASE' defined but not used [-Wunused-const-variable=]
200 | static const struct IP_BASE THM_BASE ={ { { { 0x00016600, 0x02400C00, 0, 0, 0 } },
| ^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:193:29: warning: 'SMUIO_BASE' defined but not used [-Wunused-const-variable=]
193 | static const struct IP_BASE SMUIO_BASE ={ { { { 0x00016800, 0x00016A00, 0x02401000, 0x00440000, 0 } },
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:186:29: warning: 'SDMA0_BASE' defined but not used [-Wunused-const-variable=]
186 | static const struct IP_BASE SDMA0_BASE ={ { { { 0x00001260, 0x0240A800, 0, 0, 0 } },
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:179:29: warning: 'PCIE0_BASE' defined but not used [-Wunused-const-variable=]
179 | static const struct IP_BASE PCIE0_BASE ={ { { { 0x02411800, 0x04440000, 0, 0, 0 } },
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:172:29: warning: 'OSSSYS_BASE' defined but not used [-Wunused-const-variable=]
172 | static const struct IP_BASE OSSSYS_BASE ={ { { { 0x000010A0, 0x0240A000, 0, 0, 0 } },
| ^~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:165:29: warning: 'NBIF0_BASE' defined but not used [-Wunused-const-variable=]
165 | static const struct IP_BASE NBIF0_BASE ={ { { { 0x00000000, 0x00000014, 0x00000D20, 0x00010400, 0x0241B000 } },
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:158:29: warning: 'MP1_BASE' defined but not used [-Wunused-const-variable=]
158 | static const struct IP_BASE MP1_BASE ={ { { { 0x00016200, 0x02400400, 0x00E80000, 0x00EC0000, 0x00F00000 } },
| ^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:151:29: warning: 'MP0_BASE' defined but not used [-Wunused-const-variable=]
151 | static const struct IP_BASE MP0_BASE ={ { { { 0x00016000, 0x0243FC00, 0x00DC0000, 0x00E00000, 0x00E40000 } },
| ^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:144:29: warning: 'MMHUB_BASE' defined but not used [-Wunused-const-variable=]
144 | static const struct IP_BASE MMHUB_BASE ={ { { { 0x0001A000, 0x02408800, 0, 0, 0 } },
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:137:29: warning: 'L2IMU0_BASE' defined but not used [-Wunused-const-variable=]
137 | static const struct IP_BASE L2IMU0_BASE ={ { { { 0x00007DC0, 0x02407000, 0x00900000, 0x04FC0000, 0x055C0000 } },
| ^~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:130:29: warning: 'ISP_BASE' defined but not used [-Wunused-const-variable=]
130 | static const struct IP_BASE ISP_BASE ={ { { { 0x00018000, 0x0240B000, 0, 0, 0 } },
| ^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:123:29: warning: 'IOHC0_BASE' defined but not used [-Wunused-const-variable=]
123 | static const struct IP_BASE IOHC0_BASE ={ { { { 0x00010000, 0x02406000, 0x04EC0000, 0, 0 } },
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:116:29: warning: 'HDP_BASE' defined but not used [-Wunused-const-variable=]
116 | static const struct IP_BASE HDP_BASE ={ { { { 0x00000F20, 0x0240A400, 0, 0, 0 } },
| ^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:109:29: warning: 'HDA_BASE' defined but not used [-Wunused-const-variable=]
109 | static const struct IP_BASE HDA_BASE ={ { { { 0x02404800, 0x004C0000, 0, 0, 0 } },
| ^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:102:29: warning: 'GC_BASE' defined but not used [-Wunused-const-variable=]
102 | static const struct IP_BASE GC_BASE ={ { { { 0x00002000, 0x0000A000, 0x02402C00, 0, 0 } },
| ^~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:95:29: warning: 'FUSE_BASE' defined but not used [-Wunused-const-variable=]
95 | static const struct IP_BASE FUSE_BASE ={ { { { 0x00017400, 0x02401400, 0, 0, 0 } },
| ^~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:88:29: warning: 'DPCS_BASE' defined but not used [-Wunused-const-variable=]
88 | static const struct IP_BASE DPCS_BASE ={ { { { 0x00000012, 0x000000C0, 0x000034C0, 0x00009000, 0x02403C00 } },
| ^~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:81:29: warning: 'DMU_BASE' defined but not used [-Wunused-const-variable=]
81 | static const struct IP_BASE DMU_BASE ={ { { { 0x00000012, 0x000000C0, 0x000034C0, 0x00009000, 0x02403C00 } },
| ^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:74:29: warning: 'DIO_BASE' defined but not used [-Wunused-const-variable=]
74 | static const struct IP_BASE DIO_BASE ={ { { { 0x02404000, 0, 0, 0, 0 } },
| ^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:67:29: warning: 'DF_BASE' defined but not used [-Wunused-const-variable=]
67 | static const struct IP_BASE DF_BASE ={ { { { 0x00007000, 0x0240B800, 0, 0, 0 } },
| ^~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:60:29: warning: 'DBGU_IO0_BASE' defined but not used [-Wunused-const-variable=]
60 | static const struct IP_BASE DBGU_IO0_BASE ={ { { { 0x000001E0, 0x0240B400, 0, 0, 0 } },
| ^~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:46:29: warning: 'ATHUB_BASE' defined but not used [-Wunused-const-variable=]
46 | static const struct IP_BASE ATHUB_BASE ={ { { { 0x00000C20, 0x02408C00, 0, 0, 0 } },
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:39:29: warning: 'ACP_BASE' defined but not used [-Wunused-const-variable=]
39 | static const struct IP_BASE ACP_BASE ={ { { { 0x02403800, 0x00480000, 0, 0, 0 } },
| ^~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/inc/core_types.h:32,
from drivers/gpu/drm/amd/amdgpu/../display/dc/inc/resource.h:28,
from drivers/gpu/drm/amd/amdgpu/../display/dc/inc/hw/clk_mgr_internal.h:36,
from drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn21/rn_clk_mgr.c:27:
drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:122:22: warning: 'DP_DVI_CONVERTER_ID_4' defined but not used [-Wunused-const-variable=]
122 | static const uint8_t DP_DVI_CONVERTER_ID_4[] = "m2DVIa";
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:120:22: warning: 'DP_VGA_LVDS_CONVERTER_ID_3' defined but not used [-Wunused-const-variable=]
120 | static const uint8_t DP_VGA_LVDS_CONVERTER_ID_3[] = "dnomlA";
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:118:22: warning: 'DP_VGA_LVDS_CONVERTER_ID_2' defined but not used [-Wunused-const-variable=]
118 | static const uint8_t DP_VGA_LVDS_CONVERTER_ID_2[] = "sivarT";
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/inc/hw/dccg.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn21/rn_clk_mgr.c:26:
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:76:32: warning: 'dc_fixpt_ln2_div_2' defined but not used [-Wunused-const-variable=]
76 | static const struct fixed31_32 dc_fixpt_ln2_div_2 = { 1488522236LL };
| ^~~~~~~~~~~~~~~~~~
--
| ^~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:281:19: note: in expansion of macro 'BASE_INNER'
281 | #define BASE(seg) BASE_INNER(seg)
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:288:14: note: in expansion of macro 'BASE'
288 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + | ^~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dpp.h:165:2: note: in expansion of macro 'SRI'
165 | SRI(CURSOR_CONTROL, CURSOR0_, id), | ^~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:598:2: note: in expansion of macro 'TF_REG_LIST_DCN20'
598 | TF_REG_LIST_DCN20(id), | ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:604:2: note: in expansion of macro 'tf_regs'
604 | tf_regs(2),
| ^~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:484:52: note: (near initialization for 'tf_regs[2].CURSOR_CONTROL')
484 | #define DMU_BASE__INST0_SEG2 0x000034C0
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:279:25: note: in expansion of macro 'DMU_BASE__INST0_SEG2'
279 | #define BASE_INNER(seg) DMU_BASE__INST0_SEG ## seg
| ^~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:281:19: note: in expansion of macro 'BASE_INNER'
281 | #define BASE(seg) BASE_INNER(seg)
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:288:14: note: in expansion of macro 'BASE'
288 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + | ^~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dpp.h:165:2: note: in expansion of macro 'SRI'
165 | SRI(CURSOR_CONTROL, CURSOR0_, id), | ^~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:598:2: note: in expansion of macro 'TF_REG_LIST_DCN20'
598 | TF_REG_LIST_DCN20(id), | ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:604:2: note: in expansion of macro 'tf_regs'
604 | tf_regs(2),
| ^~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:484:52: warning: initialized field overwritten [-Woverride-init]
484 | #define DMU_BASE__INST0_SEG2 0x000034C0
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:279:25: note: in expansion of macro 'DMU_BASE__INST0_SEG2'
279 | #define BASE_INNER(seg) DMU_BASE__INST0_SEG ## seg
| ^~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:281:19: note: in expansion of macro 'BASE_INNER'
281 | #define BASE(seg) BASE_INNER(seg)
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:288:14: note: in expansion of macro 'BASE'
288 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + | ^~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dpp.h:165:2: note: in expansion of macro 'SRI'
165 | SRI(CURSOR_CONTROL, CURSOR0_, id), | ^~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:598:2: note: in expansion of macro 'TF_REG_LIST_DCN20'
598 | TF_REG_LIST_DCN20(id), | ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:605:2: note: in expansion of macro 'tf_regs'
605 | tf_regs(3),
| ^~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:484:52: note: (near initialization for 'tf_regs[3].CURSOR_CONTROL')
484 | #define DMU_BASE__INST0_SEG2 0x000034C0
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:279:25: note: in expansion of macro 'DMU_BASE__INST0_SEG2'
279 | #define BASE_INNER(seg) DMU_BASE__INST0_SEG ## seg
| ^~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:281:19: note: in expansion of macro 'BASE_INNER'
281 | #define BASE(seg) BASE_INNER(seg)
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:288:14: note: in expansion of macro 'BASE'
288 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + | ^~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dpp.h:165:2: note: in expansion of macro 'SRI'
165 | SRI(CURSOR_CONTROL, CURSOR0_, id), | ^~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:598:2: note: in expansion of macro 'TF_REG_LIST_DCN20'
598 | TF_REG_LIST_DCN20(id), | ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:605:2: note: in expansion of macro 'tf_regs'
605 | tf_regs(3),
| ^~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:707:20: warning: no previous prototype for 'dcn21_i2c_hw_create' [-Wmissing-prototypes]
707 | struct dce_i2c_hw *dcn21_i2c_hw_create(
| ^~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:975:6: warning: no previous prototype for 'dcn21_calculate_wm' [-Wmissing-prototypes]
975 | void dcn21_calculate_wm(
| ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1058:6: warning: no previous prototype for 'dcn21_validate_bandwidth' [-Wmissing-prototypes]
1058 | bool dcn21_validate_bandwidth(struct dc *dc, struct dc_state *context,
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1188:32: warning: no previous prototype for 'dcn21_opp_create' [-Wmissing-prototypes]
1188 | struct output_pixel_processor *dcn21_opp_create(
| ^~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1204:26: warning: no previous prototype for 'dcn21_timing_generator_create' [-Wmissing-prototypes]
1204 | struct timing_generator *dcn21_timing_generator_create(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1226:13: warning: no previous prototype for 'dcn21_mpc_create' [-Wmissing-prototypes]
1226 | struct mpc *dcn21_mpc_create(struct dc_context *ctx)
| ^~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1254:35: warning: no previous prototype for 'dcn21_dsc_create' [-Wmissing-prototypes]
1254 | struct display_stream_compressor *dcn21_dsc_create(
| ^~~~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1318:20: warning: no previous prototype for 'dummy_set_wm_ranges' [-Wmissing-prototypes]
1318 | enum pp_smu_status dummy_set_wm_ranges(struct pp_smu *pp,
| ^~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1324:20: warning: no previous prototype for 'dummy_get_dpm_clock_table' [-Wmissing-prototypes]
1324 | enum pp_smu_status dummy_get_dpm_clock_table(struct pp_smu *pp,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1331:22: warning: no previous prototype for 'dcn21_pp_smu_create' [-Wmissing-prototypes]
1331 | struct pp_smu_funcs *dcn21_pp_smu_create(struct dc_context *ctx)
| ^~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1343:6: warning: no previous prototype for 'dcn21_pp_smu_destroy' [-Wmissing-prototypes]
1343 | void dcn21_pp_smu_destroy(struct pp_smu_funcs **pp_smu)
| ^~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1362:24: warning: no previous prototype for 'dcn21_stream_encoder_create' [-Wmissing-prototypes]
1362 | struct stream_encoder *dcn21_stream_encoder_create(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:62:
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:484:52: warning: initialized field overwritten [-Woverride-init]
484 | #define DMU_BASE__INST0_SEG2 0x000034C0
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:279:25: note: in expansion of macro 'DMU_BASE__INST0_SEG2'
279 | #define BASE_INNER(seg) DMU_BASE__INST0_SEG ## seg
| ^~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:281:19: note: in expansion of macro 'BASE_INNER'
281 | #define BASE(seg) BASE_INNER(seg)
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:284:15: note: in expansion of macro 'BASE'
284 | .reg_name = BASE(mm ## reg_name ## _BASE_IDX) + | ^~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_hwseq.h:157:2: note: in expansion of macro 'SR'
157 | SR(DCFCLK_CNTL), | ^~
drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_hwseq.h:283:2: note: in expansion of macro 'HWSEQ_DCN_REG_LIST'
283 | HWSEQ_DCN_REG_LIST(), | ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1380:3: note: in expansion of macro 'HWSEQ_DCN21_REG_LIST'
1380 | HWSEQ_DCN21_REG_LIST()
| ^~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:484:52: note: (near initialization for 'hwseq_reg.DCFCLK_CNTL')
484 | #define DMU_BASE__INST0_SEG2 0x000034C0
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:279:25: note: in expansion of macro 'DMU_BASE__INST0_SEG2'
279 | #define BASE_INNER(seg) DMU_BASE__INST0_SEG ## seg
| ^~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:281:19: note: in expansion of macro 'BASE_INNER'
281 | #define BASE(seg) BASE_INNER(seg)
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:284:15: note: in expansion of macro 'BASE'
284 | .reg_name = BASE(mm ## reg_name ## _BASE_IDX) + | ^~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_hwseq.h:157:2: note: in expansion of macro 'SR'
157 | SR(DCFCLK_CNTL), | ^~
drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_hwseq.h:283:2: note: in expansion of macro 'HWSEQ_DCN_REG_LIST'
283 | HWSEQ_DCN_REG_LIST(), | ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1380:3: note: in expansion of macro 'HWSEQ_DCN21_REG_LIST'
1380 | HWSEQ_DCN21_REG_LIST()
| ^~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:73:
drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_dmcu.h:274:23: warning: 'abm_gain_stepsize' defined but not used [-Wunused-const-variable=]
274 | static const uint32_t abm_gain_stepsize = 0x0060;
| ^~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:62:
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:221:29: warning: 'UVD0_BASE' defined but not used [-Wunused-const-variable=]
221 | static const struct IP_BASE UVD0_BASE ={ { { { 0x00007800, 0x00007E00, 0x02403000, 0, 0 } },
| ^~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:214:29: warning: 'USB0_BASE' defined but not used [-Wunused-const-variable=]
214 | static const struct IP_BASE USB0_BASE ={ { { { 0x0242A800, 0x05B00000, 0, 0, 0 } },
| ^~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:207:29: warning: 'UMC_BASE' defined but not used [-Wunused-const-variable=]
207 | static const struct IP_BASE UMC_BASE ={ { { { 0x00014000, 0x02425800, 0, 0, 0 } },
| ^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:200:29: warning: 'THM_BASE' defined but not used [-Wunused-const-variable=]
200 | static const struct IP_BASE THM_BASE ={ { { { 0x00016600, 0x02400C00, 0, 0, 0 } },
| ^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:193:29: warning: 'SMUIO_BASE' defined but not used [-Wunused-const-variable=]
193 | static const struct IP_BASE SMUIO_BASE ={ { { { 0x00016800, 0x00016A00, 0x02401000, 0x00440000, 0 } },
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:186:29: warning: 'SDMA0_BASE' defined but not used [-Wunused-const-variable=]
186 | static const struct IP_BASE SDMA0_BASE ={ { { { 0x00001260, 0x0240A800, 0, 0, 0 } },
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:179:29: warning: 'PCIE0_BASE' defined but not used [-Wunused-const-variable=]
179 | static const struct IP_BASE PCIE0_BASE ={ { { { 0x02411800, 0x04440000, 0, 0, 0 } },
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:172:29: warning: 'OSSSYS_BASE' defined but not used [-Wunused-const-variable=]
172 | static const struct IP_BASE OSSSYS_BASE ={ { { { 0x000010A0, 0x0240A000, 0, 0, 0 } },
| ^~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:165:29: warning: 'NBIF0_BASE' defined but not used [-Wunused-const-variable=]
165 | static const struct IP_BASE NBIF0_BASE ={ { { { 0x00000000, 0x00000014, 0x00000D20, 0x00010400, 0x0241B000 } },
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:158:29: warning: 'MP1_BASE' defined but not used [-Wunused-const-variable=]
158 | static const struct IP_BASE MP1_BASE ={ { { { 0x00016200, 0x02400400, 0x00E80000, 0x00EC0000, 0x00F00000 } },
| ^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:151:29: warning: 'MP0_BASE' defined but not used [-Wunused-const-variable=]
151 | static const struct IP_BASE MP0_BASE ={ { { { 0x00016000, 0x0243FC00, 0x00DC0000, 0x00E00000, 0x00E40000 } },
| ^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:144:29: warning: 'MMHUB_BASE' defined but not used [-Wunused-const-variable=]
144 | static const struct IP_BASE MMHUB_BASE ={ { { { 0x0001A000, 0x02408800, 0, 0, 0 } },
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:137:29: warning: 'L2IMU0_BASE' defined but not used [-Wunused-const-variable=]
137 | static const struct IP_BASE L2IMU0_BASE ={ { { { 0x00007DC0, 0x02407000, 0x00900000, 0x04FC0000, 0x055C0000 } },
| ^~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:130:29: warning: 'ISP_BASE' defined but not used [-Wunused-const-variable=]
130 | static const struct IP_BASE ISP_BASE ={ { { { 0x00018000, 0x0240B000, 0, 0, 0 } },
| ^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:123:29: warning: 'IOHC0_BASE' defined but not used [-Wunused-const-variable=]
123 | static const struct IP_BASE IOHC0_BASE ={ { { { 0x00010000, 0x02406000, 0x04EC0000, 0, 0 } },
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:116:29: warning: 'HDP_BASE' defined but not used [-Wunused-const-variable=]
116 | static const struct IP_BASE HDP_BASE ={ { { { 0x00000F20, 0x0240A400, 0, 0, 0 } },
vim +/clk_mgr_helper_populate_bw_params +465 drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn21/rn_clk_mgr.c
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 464
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 @465 void clk_mgr_helper_populate_bw_params(struct clk_bw_params *bw_params, struct dpm_clocks *clock_table, struct hw_asic_id *asic_id)
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 466 {
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 467 int i;
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 468
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 469 ASSERT(PP_SMU_NUM_FCLK_DPM_LEVELS <= MAX_NUM_DPM_LVL);
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 470
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 471 for (i = 0; i < PP_SMU_NUM_FCLK_DPM_LEVELS; i++) {
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 472 if (clock_table->FClocks[i].Freq == 0)
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 473 break;
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 474
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 475 bw_params->clk_table.entries[i].dcfclk_mhz = clock_table->DcfClocks[i].Freq;
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 476 bw_params->clk_table.entries[i].fclk_mhz = clock_table->FClocks[i].Freq;
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 477 bw_params->clk_table.entries[i].memclk_mhz = clock_table->MemClocks[i].Freq;
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 478 bw_params->clk_table.entries[i].socclk_mhz = clock_table->SocClocks[i].Freq;
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 479 bw_params->clk_table.entries[i].voltage = clock_table->FClocks[i].Vol;
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 480 }
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 481 bw_params->clk_table.num_entries = i;
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 482
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 483 bw_params->vram_type = asic_id->vram_type;
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 484 bw_params->num_channels = asic_id->vram_width / DDR4_DRAM_WIDTH;
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 485
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 486 for (i = 0; i < WM_SET_COUNT; i++) {
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 487 bw_params->wm_table.entries[i].wm_inst = i;
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 488
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 489 if (clock_table->FClocks[i].Freq == 0) {
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 490 bw_params->wm_table.entries[i].valid = false;
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 491 continue;
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 492 }
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 493
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 494 bw_params->wm_table.entries[i].wm_type = WM_TYPE_PSTATE_CHG;
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 495 bw_params->wm_table.entries[i].valid = true;
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 496 }
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 497
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 498 if (bw_params->vram_type == LpDdr4MemType) {
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 499 /*
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 500 * WM set D will be re-purposed for memory retraining
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 501 */
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 502 bw_params->wm_table.entries[WM_D].pstate_latency_us = LPDDR_MEM_RETRAIN_LATENCY;
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 503 bw_params->wm_table.entries[WM_D].wm_inst = WM_D;
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 504 bw_params->wm_table.entries[WM_D].wm_type = WM_TYPE_RETRAINING;
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 505 bw_params->wm_table.entries[WM_D].valid = true;
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 506 }
4edb6fc9187860 Bhawanpreet Lakha 2019-07-26 507
:::::: The code at line 465 was first introduced by commit
:::::: 4edb6fc91878603f325c79314ee7675558932f7f drm/amd/display: Add Renoir clock manager
:::::: TO: Bhawanpreet Lakha <Bhawanpreet.Lakha(a)amd.com>
:::::: CC: Alex Deucher <alexander.deucher(a)amd.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
drivers/media/platform/pxa_camera.c:2573:34: warning: unused variable 'pxa_camera_of_match'
by kernel test robot
Hi Mauro,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 69119673bd50b176ded34032fadd41530fb5af21
commit: a19f228b8dd9a67e8de4ebd4eac8a4c94ec39d1a media: Kconfig: not all V4L2 platform drivers are for camera
date: 9 weeks ago
config: x86_64-randconfig-r001-20200617 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 487ca07fcc75d52755c9fe2ee05bcb3b6eeeec44)
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
git checkout a19f228b8dd9a67e8de4ebd4eac8a4c94ec39d1a
# 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 >>, old ones prefixed by <<):
>> drivers/media/platform/pxa_camera.c:2573:34: warning: unused variable 'pxa_camera_of_match' [-Wunused-const-variable]
static const struct of_device_id pxa_camera_of_match[] = {
^
1 warning generated.
--
>> drivers/media/platform/renesas-ceu.c:1616:30: warning: unused variable 'ceu_data_rz' [-Wunused-const-variable]
static const struct ceu_data ceu_data_rz = {
^
1 warning generated.
--
>> drivers/media/platform/am437x/am437x-vpfe.c:2623:34: warning: unused variable 'vpfe_of_match' [-Wunused-const-variable]
static const struct of_device_id vpfe_of_match[] = {
^
1 warning generated.
vim +/pxa_camera_of_match +2573 drivers/media/platform/pxa_camera.c
7254026cedd42d drivers/media/video/pxa_camera.c Guennadi Liakhovetski 2011-06-29 2572
e9a1d94fa85542 drivers/media/platform/soc_camera/pxa_camera.c Robert Jarzmik 2014-06-29 @2573 static const struct of_device_id pxa_camera_of_match[] = {
e9a1d94fa85542 drivers/media/platform/soc_camera/pxa_camera.c Robert Jarzmik 2014-06-29 2574 { .compatible = "marvell,pxa270-qci", },
e9a1d94fa85542 drivers/media/platform/soc_camera/pxa_camera.c Robert Jarzmik 2014-06-29 2575 {},
e9a1d94fa85542 drivers/media/platform/soc_camera/pxa_camera.c Robert Jarzmik 2014-06-29 2576 };
e9a1d94fa85542 drivers/media/platform/soc_camera/pxa_camera.c Robert Jarzmik 2014-06-29 2577 MODULE_DEVICE_TABLE(of, pxa_camera_of_match);
e9a1d94fa85542 drivers/media/platform/soc_camera/pxa_camera.c Robert Jarzmik 2014-06-29 2578
:::::: The code at line 2573 was first introduced by commit
:::::: e9a1d94fa85542d4f3046ac82d234a3c8349c948 [media] media: pxa_camera device-tree support
:::::: TO: Robert Jarzmik <robert.jarzmik(a)free.fr>
:::::: CC: Mauro Carvalho Chehab <m.chehab(a)samsung.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[linux-next:master 827/2089] drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:140:53: sparse: sparse: cast to restricted __le32
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 5fcb9628fd1227a5f11d87171cb1b8b5c414d9d9
commit: 157e72e831cb8f323108b5df6d0b148aef9507fb [827/2089] drm/amdgpu: add sdma ip block for sienna_cichlid (v5)
config: i386-randconfig-s001-20200617 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-rc1-6-g78f577f8-dirty
git checkout 157e72e831cb8f323108b5df6d0b148aef9507fb
# save the attached .config to linux build tree
make W=1 C=1 ARCH=i386 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
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/gpu/drm/amd/amdgpu/sdma_v5_2.c:140:53: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:141:58: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:153:33: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:153:33: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:153:33: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:742:27: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:746:33: sparse: sparse: cast to restricted __le32
>> drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:833:28: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int volatile [usertype] @@ got restricted __le32 [usertype] @@
>> drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:833:28: sparse: expected unsigned int volatile [usertype]
>> drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:833:28: sparse: got restricted __le32 [usertype]
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:851:23: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:894:28: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int volatile [usertype] @@ got restricted __le32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:894:28: sparse: expected unsigned int volatile [usertype]
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:894:28: sparse: got restricted __le32 [usertype]
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:926:15: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:1322:21: sparse: sparse: cast to restricted __le32
vim +140 drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
96
97 /**
98 * sdma_v5_2_init_microcode - load ucode images from disk
99 *
100 * @adev: amdgpu_device pointer
101 *
102 * Use the firmware interface to load the ucode images into
103 * the driver (not loaded into hw).
104 * Returns 0 on success, error on failure.
105 */
106
107 // emulation only, won't work on real chip
108 // navi10 real chip need to use PSP to load firmware
109 static int sdma_v5_2_init_microcode(struct amdgpu_device *adev)
110 {
111 const char *chip_name;
112 char fw_name[40];
113 int err = 0, i;
114 struct amdgpu_firmware_info *info = NULL;
115 const struct common_firmware_header *header = NULL;
116 const struct sdma_firmware_header_v1_0 *hdr;
117
118 DRM_DEBUG("\n");
119
120 switch (adev->asic_type) {
121 case CHIP_SIENNA_CICHLID:
122 chip_name = "sienna_cichlid";
123 break;
124 default:
125 BUG();
126 }
127
128 for (i = 0; i < adev->sdma.num_instances; i++) {
129 if (i == 0)
130 snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_sdma.bin", chip_name);
131 else
132 snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_sdma%d.bin", chip_name, i);
133 err = request_firmware(&adev->sdma.instance[i].fw, fw_name, adev->dev);
134 if (err)
135 goto out;
136 err = amdgpu_ucode_validate(adev->sdma.instance[i].fw);
137 if (err)
138 goto out;
139 hdr = (const struct sdma_firmware_header_v1_0 *)adev->sdma.instance[i].fw->data;
> 140 adev->sdma.instance[i].fw_version = le32_to_cpu(hdr->header.ucode_version);
141 adev->sdma.instance[i].feature_version = le32_to_cpu(hdr->ucode_feature_version);
142 if (adev->sdma.instance[i].feature_version >= 20)
143 adev->sdma.instance[i].burst_nop = true;
144 DRM_DEBUG("psp_load == '%s'\n",
145 adev->firmware.load_type == AMDGPU_FW_LOAD_PSP ? "true" : "false");
146
147 if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
148 info = &adev->firmware.ucode[AMDGPU_UCODE_ID_SDMA0 + i];
149 info->ucode_id = AMDGPU_UCODE_ID_SDMA0 + i;
150 info->fw = adev->sdma.instance[i].fw;
151 header = (const struct common_firmware_header *)info->fw->data;
152 adev->firmware.fw_size +=
153 ALIGN(le32_to_cpu(header->ucode_size_bytes), PAGE_SIZE);
154 }
155 }
156 out:
157 if (err) {
158 DRM_ERROR("sdma_v5_2: Failed to load firmware \"%s\"\n", fw_name);
159 for (i = 0; i < adev->sdma.num_instances; i++) {
160 release_firmware(adev->sdma.instance[i].fw);
161 adev->sdma.instance[i].fw = NULL;
162 }
163 }
164 return err;
165 }
166
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months