[RFC PATCH] drivers/net/virtio_net: virtnet_get_hashflow() can be static
by kernel test robot
drivers/net/virtio_net.c:2278:6: warning: symbol 'virtnet_get_hashflow' was not declared. Should it be static?
drivers/net/virtio_net.c:2330:6: warning: symbol 'virtnet_set_hashflow' was not declared. Should it be static?
drivers/net/virtio_net.c:2627:5: warning: symbol 'virtnet_get_rxfh_key_size' was not declared. Should it be static?
drivers/net/virtio_net.c:2632:5: warning: symbol 'virtnet_get_rxfh_indir_size' was not declared. Should it be static?
drivers/net/virtio_net.c:2637:5: warning: symbol 'virtnet_get_rxfh' was not declared. Should it be static?
drivers/net/virtio_net.c:2656:5: warning: symbol 'virtnet_set_rxfh' was not declared. Should it be static?
drivers/net/virtio_net.c:2676:5: warning: symbol 'virtnet_get_rxnfc' was not declared. Should it be static?
Reported-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
virtio_net.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 6a52eeaf929289..ea8f9c4050ffa8 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -2275,7 +2275,7 @@ static void virtnet_init_default_rss(struct virtnet_info *vi)
netdev_rss_key_fill(vi->ctrl->rss.key, vi->rss_key_size);
}
-void virtnet_get_hashflow(const struct virtnet_info *vi, struct ethtool_rxnfc *info)
+static void virtnet_get_hashflow(const struct virtnet_info *vi, struct ethtool_rxnfc *info)
{
info->data = 0;
switch (info->flow_type) {
@@ -2327,7 +2327,7 @@ void virtnet_get_hashflow(const struct virtnet_info *vi, struct ethtool_rxnfc *i
}
}
-bool virtnet_set_hashflow(struct virtnet_info *vi, struct ethtool_rxnfc *info)
+static bool virtnet_set_hashflow(struct virtnet_info *vi, struct ethtool_rxnfc *info)
{
u64 is_iphash = info->data & (RXH_IP_SRC | RXH_IP_DST);
u64 is_porthash = info->data & (RXH_L4_B_0_1 | RXH_L4_B_2_3);
@@ -2624,17 +2624,17 @@ static void virtnet_update_settings(struct virtnet_info *vi)
vi->duplex = duplex;
}
-u32 virtnet_get_rxfh_key_size(struct net_device *dev)
+static u32 virtnet_get_rxfh_key_size(struct net_device *dev)
{
return ((struct virtnet_info *)netdev_priv(dev))->rss_key_size;
}
-u32 virtnet_get_rxfh_indir_size(struct net_device *dev)
+static u32 virtnet_get_rxfh_indir_size(struct net_device *dev)
{
return ((struct virtnet_info *)netdev_priv(dev))->rss_indir_table_size;
}
-int virtnet_get_rxfh(struct net_device *dev, u32 *indir, u8 *key, u8 *hfunc)
+static int virtnet_get_rxfh(struct net_device *dev, u32 *indir, u8 *key, u8 *hfunc)
{
struct virtnet_info *vi = netdev_priv(dev);
int i;
@@ -2653,7 +2653,7 @@ int virtnet_get_rxfh(struct net_device *dev, u32 *indir, u8 *key, u8 *hfunc)
return 0;
}
-int virtnet_set_rxfh(struct net_device *dev, const u32 *indir, const u8 *key, const u8 hfunc)
+static int virtnet_set_rxfh(struct net_device *dev, const u32 *indir, const u8 *key, const u8 hfunc)
{
struct virtnet_info *vi = netdev_priv(dev);
int i;
@@ -2673,7 +2673,7 @@ int virtnet_set_rxfh(struct net_device *dev, const u32 *indir, const u8 *key, co
return 0;
}
-int virtnet_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info, u32 *rule_locs)
+static int virtnet_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info, u32 *rule_locs)
{
struct virtnet_info *vi = netdev_priv(dev);
int rc = 0;
1 year, 1 month
Re: [RFC PATCH 3/3] drivers/net/virtio_net: Added RSS hash report.
by kernel test robot
Hi Andrew,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on vhost/linux-next]
[also build test WARNING on net-next/master net/master linus/master sparc-next/master v5.14-rc6 next-20210818]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Andrew-Melnychenko/drivers-net-v...
base: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next
config: i386-randconfig-s001-20210818 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-348-gf0e6938b-dirty
# https://github.com/0day-ci/linux/commit/2205ca0b751f734cf3ea53258d9b8e3f3...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Andrew-Melnychenko/drivers-net-virtio_net-Added-RSS-support/20210819-015744
git checkout 2205ca0b751f734cf3ea53258d9b8e3f3849fe16
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/net/
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/net/virtio_net.c:1185:33: sparse: sparse: restricted __le16 degrades to integer
>> drivers/net/virtio_net.c:1185:33: sparse: sparse: restricted __le16 degrades to integer
>> drivers/net/virtio_net.c:1185:33: sparse: sparse: restricted __le16 degrades to integer
>> drivers/net/virtio_net.c:1185:33: sparse: sparse: restricted __le16 degrades to integer
>> drivers/net/virtio_net.c:1185:33: sparse: sparse: restricted __le16 degrades to integer
>> drivers/net/virtio_net.c:1185:33: sparse: sparse: restricted __le16 degrades to integer
>> drivers/net/virtio_net.c:1185:33: sparse: sparse: restricted __le16 degrades to integer
>> drivers/net/virtio_net.c:1185:33: sparse: sparse: restricted __le16 degrades to integer
>> drivers/net/virtio_net.c:1185:33: sparse: sparse: restricted __le16 degrades to integer
>> drivers/net/virtio_net.c:1203:43: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned int [usertype] hash @@ got restricted __le32 [usertype] hash_value @@
drivers/net/virtio_net.c:1203:43: sparse: expected unsigned int [usertype] hash
drivers/net/virtio_net.c:1203:43: sparse: got restricted __le32 [usertype] hash_value
>> drivers/net/virtio_net.c:2262:45: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] hash_types @@ got unsigned int [usertype] rss_hash_types_supported @@
drivers/net/virtio_net.c:2262:45: sparse: expected restricted __le32 [usertype] hash_types
drivers/net/virtio_net.c:2262:45: sparse: got unsigned int [usertype] rss_hash_types_supported
>> drivers/net/virtio_net.c:2264:57: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] indirection_table_mask @@ got int @@
drivers/net/virtio_net.c:2264:57: sparse: expected restricted __le16 [usertype] indirection_table_mask
drivers/net/virtio_net.c:2264:57: sparse: got int
>> drivers/net/virtio_net.c:2278:6: sparse: sparse: symbol 'virtnet_get_hashflow' was not declared. Should it be static?
>> drivers/net/virtio_net.c:2396:53: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] hash_types @@ got unsigned int [usertype] rss_hash_types_saved @@
drivers/net/virtio_net.c:2396:53: sparse: expected restricted __le32 [usertype] hash_types
drivers/net/virtio_net.c:2396:53: sparse: got unsigned int [usertype] rss_hash_types_saved
>> drivers/net/virtio_net.c:2330:6: sparse: sparse: symbol 'virtnet_set_hashflow' was not declared. Should it be static?
>> drivers/net/virtio_net.c:2627:5: sparse: sparse: symbol 'virtnet_get_rxfh_key_size' was not declared. Should it be static?
>> drivers/net/virtio_net.c:2632:5: sparse: sparse: symbol 'virtnet_get_rxfh_indir_size' was not declared. Should it be static?
>> drivers/net/virtio_net.c:2637:5: sparse: sparse: symbol 'virtnet_get_rxfh' was not declared. Should it be static?
>> drivers/net/virtio_net.c:2656:5: sparse: sparse: symbol 'virtnet_set_rxfh' was not declared. Should it be static?
>> drivers/net/virtio_net.c:2676:5: sparse: sparse: symbol 'virtnet_get_rxnfc' was not declared. Should it be static?
drivers/net/virtio_net.c:2988:61: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] hash_types @@ got unsigned int [usertype] rss_hash_types_saved @@
drivers/net/virtio_net.c:2988:61: sparse: expected restricted __le32 [usertype] hash_types
drivers/net/virtio_net.c:2988:61: sparse: got unsigned int [usertype] rss_hash_types_saved
Please review and possibly fold the followup patch.
vim +1185 drivers/net/virtio_net.c
1145
1146 static void receive_buf(struct virtnet_info *vi, struct receive_queue *rq,
1147 void *buf, unsigned int len, void **ctx,
1148 unsigned int *xdp_xmit,
1149 struct virtnet_rq_stats *stats)
1150 {
1151 struct net_device *dev = vi->dev;
1152 struct sk_buff *skb;
1153 struct virtio_net_hdr_mrg_rxbuf *hdr;
1154 struct virtio_net_hdr_v1_hash *hdr_hash;
1155 enum pkt_hash_types rss_hash_type;
1156
1157 if (unlikely(len < vi->hdr_len + ETH_HLEN)) {
1158 pr_debug("%s: short packet %i\n", dev->name, len);
1159 dev->stats.rx_length_errors++;
1160 if (vi->mergeable_rx_bufs) {
1161 put_page(virt_to_head_page(buf));
1162 } else if (vi->big_packets) {
1163 give_pages(rq, buf);
1164 } else {
1165 put_page(virt_to_head_page(buf));
1166 }
1167 return;
1168 }
1169
1170 if (vi->mergeable_rx_bufs)
1171 skb = receive_mergeable(dev, vi, rq, buf, ctx, len, xdp_xmit,
1172 stats);
1173 else if (vi->big_packets)
1174 skb = receive_big(dev, vi, rq, buf, len, stats);
1175 else
1176 skb = receive_small(dev, vi, rq, buf, ctx, len, xdp_xmit, stats);
1177
1178 if (unlikely(!skb))
1179 return;
1180
1181 hdr = skb_vnet_hdr(skb);
1182 if (vi->has_rss_hash_report && (dev->features & NETIF_F_RXHASH)) {
1183 hdr_hash = (struct virtio_net_hdr_v1_hash *)(hdr);
1184
> 1185 switch (hdr_hash->hash_report) {
1186 case VIRTIO_NET_HASH_REPORT_TCPv4:
1187 case VIRTIO_NET_HASH_REPORT_UDPv4:
1188 case VIRTIO_NET_HASH_REPORT_TCPv6:
1189 case VIRTIO_NET_HASH_REPORT_UDPv6:
1190 case VIRTIO_NET_HASH_REPORT_TCPv6_EX:
1191 case VIRTIO_NET_HASH_REPORT_UDPv6_EX:
1192 rss_hash_type = PKT_HASH_TYPE_L4;
1193 break;
1194 case VIRTIO_NET_HASH_REPORT_IPv4:
1195 case VIRTIO_NET_HASH_REPORT_IPv6:
1196 case VIRTIO_NET_HASH_REPORT_IPv6_EX:
1197 rss_hash_type = PKT_HASH_TYPE_L3;
1198 break;
1199 case VIRTIO_NET_HASH_REPORT_NONE:
1200 default:
1201 rss_hash_type = PKT_HASH_TYPE_NONE;
1202 }
> 1203 skb_set_hash(skb, hdr_hash->hash_value, rss_hash_type);
1204 }
1205
1206 if (hdr->hdr.flags & VIRTIO_NET_HDR_F_DATA_VALID)
1207 skb->ip_summed = CHECKSUM_UNNECESSARY;
1208
1209 if (virtio_net_hdr_to_skb(skb, &hdr->hdr,
1210 virtio_is_little_endian(vi->vdev))) {
1211 net_warn_ratelimited("%s: bad gso: type: %u, size: %u\n",
1212 dev->name, hdr->hdr.gso_type,
1213 hdr->hdr.gso_size);
1214 goto frame_err;
1215 }
1216
1217 skb_record_rx_queue(skb, vq2rxq(rq->vq));
1218 skb->protocol = eth_type_trans(skb, dev);
1219 pr_debug("Receiving skb proto 0x%04x len %i type %i\n",
1220 ntohs(skb->protocol), skb->len, skb->pkt_type);
1221
1222 napi_gro_receive(&rq->napi, skb);
1223 return;
1224
1225 frame_err:
1226 dev->stats.rx_frame_errors++;
1227 dev_kfree_skb(skb);
1228 }
1229
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[spi:for-5.15 28/29] drivers/spi/spi-rockchip-sfc.c:456:32: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-5.15
head: 02cea7039ad52593ee05824c19233366914df9b2
commit: 0b89fc0a367edab09065af722894d186bd0ccb0d [28/29] spi: rockchip-sfc: add rockchip serial flash controller
config: riscv-allyesconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 11.2.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-348-gf0e6938b-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git/commit/?i...
git remote add spi https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git
git fetch --no-tags spi for-5.15
git checkout 0b89fc0a367edab09065af722894d186bd0ccb0d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=riscv
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/spi/spi-rockchip-sfc.c:456:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void *buffer @@
drivers/spi/spi-rockchip-sfc.c:456:32: sparse: expected void volatile [noderef] __iomem *addr
drivers/spi/spi-rockchip-sfc.c:456:32: sparse: got void *buffer
>> drivers/spi/spi-rockchip-sfc.c:465:51: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void *buffer @@
drivers/spi/spi-rockchip-sfc.c:465:51: sparse: expected void const volatile [noderef] __iomem *addr
drivers/spi/spi-rockchip-sfc.c:465:51: sparse: got void *buffer
vim +456 drivers/spi/spi-rockchip-sfc.c
447
448 static int rockchip_sfc_xfer_data_dma(struct rockchip_sfc *sfc,
449 const struct spi_mem_op *op, u32 len)
450 {
451 int ret;
452
453 dev_dbg(sfc->dev, "sfc xfer_dma len=%x\n", len);
454
455 if (op->data.dir == SPI_MEM_DATA_OUT)
> 456 memcpy_toio(sfc->buffer, op->data.buf.out, len);
457
458 ret = rockchip_sfc_fifo_transfer_dma(sfc, sfc->dma_buffer, len);
459 if (!wait_for_completion_timeout(&sfc->cp, msecs_to_jiffies(2000))) {
460 dev_err(sfc->dev, "DMA wait for transfer finish timeout\n");
461 ret = -ETIMEDOUT;
462 }
463 rockchip_sfc_irq_mask(sfc, SFC_IMR_DMA);
464 if (op->data.dir == SPI_MEM_DATA_IN)
> 465 memcpy_fromio(op->data.buf.in, sfc->buffer, len);
466
467 return ret;
468 }
469
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[ogabbay:habanalabs-next 51/55] drivers/misc/habanalabs/common/debugfs.c:360:7: warning: format specifies type 'unsigned long long' but the argument has type 'dma_addr_t' (aka 'unsigned int')
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git habanalabs-next
head: 7ff0882e4eb53de988df67bc47c0d153dc343962
commit: bff4f13b946858c7fb2c1e56d7b34a4109fae5f7 [51/55] habanalabs: add userptr_lookup node in debugfs
config: riscv-randconfig-r042-20210816 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d2b574a4dea5b718e4386bf2e26af0126e5978ce)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git/commit/...
git remote add ogabbay https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git
git fetch --no-tags ogabbay habanalabs-next
git checkout bff4f13b946858c7fb2c1e56d7b34a4109fae5f7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
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/misc/habanalabs/common/debugfs.c:360:7: warning: format specifies type 'unsigned long long' but the argument has type 'dma_addr_t' (aka 'unsigned int') [-Wformat]
dma_addr, userptr->pid,
^~~~~~~~
1 warning generated.
vim +360 drivers/misc/habanalabs/common/debugfs.c
322
323 static int userptr_lookup_show(struct seq_file *s, void *data)
324 {
325 struct hl_debugfs_entry *entry = s->private;
326 struct hl_dbg_device_entry *dev_entry = entry->dev_entry;
327 struct scatterlist *sg;
328 struct hl_userptr *userptr;
329 bool first = true;
330 u64 total_npages, npages, sg_start, sg_end;
331 dma_addr_t dma_addr;
332 int i;
333
334 spin_lock(&dev_entry->userptr_spinlock);
335
336 list_for_each_entry(userptr, &dev_entry->userptr_list, debugfs_list) {
337 if (dev_entry->userptr_lookup >= userptr->addr &&
338 dev_entry->userptr_lookup < userptr->addr + userptr->size) {
339 total_npages = 0;
340 for_each_sg(userptr->sgt->sgl, sg, userptr->sgt->nents,
341 i) {
342 npages = hl_get_sg_info(sg, &dma_addr);
343 sg_start = userptr->addr +
344 total_npages * PAGE_SIZE;
345 sg_end = userptr->addr +
346 (total_npages + npages) * PAGE_SIZE;
347
348 if (dev_entry->userptr_lookup >= sg_start &&
349 dev_entry->userptr_lookup < sg_end) {
350 dma_addr += (dev_entry->userptr_lookup -
351 sg_start);
352 if (first) {
353 first = false;
354 seq_puts(s, "\n");
355 seq_puts(s, " user virtual address dma address pid region start region size\n");
356 seq_puts(s, "---------------------------------------------------------------------------------------\n");
357 }
358 seq_printf(s, " 0x%-18llx 0x%-16llx %-8u 0x%-16llx %-12llu\n",
359 dev_entry->userptr_lookup,
> 360 dma_addr, userptr->pid,
361 userptr->addr, userptr->size);
362 }
363 total_npages += npages;
364 }
365 }
366 }
367
368 spin_unlock(&dev_entry->userptr_spinlock);
369
370 if (!first)
371 seq_puts(s, "\n");
372
373 return 0;
374 }
375
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
Re: [PATCH 28/30] IMG DEC V4L2 Interface function implementations
by kernel test robot
Hi,
I love your patch! Yet something to improve:
[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on staging/staging-testing driver-core/driver-core-testing linus/master v5.14-rc6 next-20210818]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/sidraya-bj-pathpartnertech-com/T...
base: git://linuxtv.org/media_tree.git master
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 11.2.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://github.com/0day-ci/linux/commit/ed83bf9b395e58893b5d92675196aee8f...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review sidraya-bj-pathpartnertech-com/TI-Video-Decoder-driver-upstreaming-to-v5-14-rc6-kernel/20210818-221811
git checkout ed83bf9b395e58893b5d92675196aee8f619efc9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
drivers/staging/media/vxd/decoder/vxd_core.c: In function 'stream_worker':
>> drivers/staging/media/vxd/decoder/vxd_core.c:549:25: warning: variable 'vxd' set but not used [-Wunused-but-set-variable]
549 | struct vxd_dev *vxd = NULL;
| ^~~
--
drivers/staging/media/vxd/decoder/vxd_v4l2.c: In function 'vxd_dec_buf_prepare':
>> drivers/staging/media/vxd/decoder/vxd_v4l2.c:712:36: error: implicit declaration of function 'phys_to_page'; did you mean 'pfn_to_page'? [-Werror=implicit-function-declaration]
712 | new_page = phys_to_page(vb2_dma_contig_plane_dma_addr(vb, plane));
| ^~~~~~~~~~~~
| pfn_to_page
>> drivers/staging/media/vxd/decoder/vxd_v4l2.c:712:34: warning: assignment to 'struct page *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
712 | new_page = phys_to_page(vb2_dma_contig_plane_dma_addr(vb, plane));
| ^
>> drivers/staging/media/vxd/decoder/vxd_v4l2.c:618:13: warning: variable 'pages' set but not used [-Wunused-but-set-variable]
618 | int pages;
| ^~~~~
In file included from drivers/staging/media/vxd/decoder/vxd_props.h:19,
from drivers/staging/media/vxd/decoder/decoder.h:29,
from drivers/staging/media/vxd/decoder/core.h:20,
from drivers/staging/media/vxd/decoder/vxd_v4l2.c:52:
At top level:
drivers/staging/media/vxd/common/imgmmu.h:65:28: warning: 'VIRT_DIR_IDX_MASK' defined but not used [-Wunused-const-variable=]
65 | static const unsigned long VIRT_DIR_IDX_MASK = (~((1 << MMU_DIR_SHIFT) - 1));
| ^~~~~~~~~~~~~~~~~
drivers/staging/media/vxd/common/imgmmu.h:62:28: warning: 'VIRT_PAGE_TBL_MASK' defined but not used [-Wunused-const-variable=]
62 | static const unsigned long VIRT_PAGE_TBL_MASK =
| ^~~~~~~~~~~~~~~~~~
drivers/staging/media/vxd/common/imgmmu.h:60:28: warning: 'VIRT_PAGE_OFF_MASK' defined but not used [-Wunused-const-variable=]
60 | static const unsigned long VIRT_PAGE_OFF_MASK = ((1 << MMU_PAGE_SHIFT) - 1);
| ^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
drivers/staging/media/vxd/decoder/hevc_secure_parser.c: In function 'bspp_hevc_parse_vps':
>> drivers/staging/media/vxd/decoder/hevc_secure_parser.c:594:1: warning: the frame size of 1168 bytes is larger than 1024 bytes [-Wframe-larger-than=]
594 | }
| ^
vim +712 drivers/staging/media/vxd/decoder/vxd_v4l2.c
604
605 static int vxd_dec_buf_prepare(struct vb2_buffer *vb)
606 {
607 struct vxd_dec_ctx *ctx = vb2_get_drv_priv(vb->vb2_queue);
608 struct device *dev = ctx->dev->dev;
609 struct vxd_dec_q_data *q_data;
610 void *sgt;
611 #ifdef CAPTURE_CONTIG_ALLOC
612 struct page *new_page;
613 #else
614 void *sgl;
615 #endif
616 struct sg_table *sgt_new;
617 void *sgl_new;
> 618 int pages;
619 int nents = 0;
620 int size = 0;
621 int plane, num_planes, ret = 0;
622 struct vxd_buffer *buf =
623 container_of(vb, struct vxd_buffer, buffer.vb.vb2_buf);
624
625 q_data = get_q_data(ctx, vb->vb2_queue->type);
626 if (!q_data)
627 return -EINVAL;
628
629 num_planes = q_data->fmt->num_planes;
630
631 for (plane = 0; plane < num_planes; plane++) {
632 if (vb2_plane_size(vb, plane) < q_data->size_image[plane]) {
633 dev_err(dev, "data will not fit into plane (%lu < %lu)\n",
634 vb2_plane_size(vb, plane),
635 (long)q_data->size_image[plane]);
636 return -EINVAL;
637 }
638 }
639
640 if (buf->mapped)
641 return 0;
642
643 buf->buf_info.cpu_linear_addr = vb2_plane_vaddr(vb, 0);
644 buf->buf_info.buf_size = vb2_plane_size(vb, 0);
645 buf->buf_info.fd = -1;
646 sgt = vb2_dma_sg_plane_desc(vb, 0);
647 if (!sgt) {
648 dev_err(dev, "Could not get sg_table from plane 0\n");
649 return -EINVAL;
650 }
651
652 if (V4L2_TYPE_IS_OUTPUT(vb->type)) {
653 ret = core_stream_map_buf_sg(ctx->res_str_id,
654 VDEC_BUFTYPE_BITSTREAM,
655 &buf->buf_info, sgt,
656 &buf->buf_map_id);
657 if (ret) {
658 dev_err(dev, "OUTPUT core_stream_map_buf_sg failed\n");
659 return ret;
660 }
661
662 buf->bstr_info.buf_size = q_data->size_image[0];
663 buf->bstr_info.cpu_virt_addr = buf->buf_info.cpu_linear_addr;
664 buf->bstr_info.mem_attrib =
665 SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE |
666 SYS_MEMATTRIB_INPUT | SYS_MEMATTRIB_CPU_WRITE;
667 buf->bstr_info.bufmap_id = buf->buf_map_id;
668 lst_init(&buf->seq_unit.bstr_seg_list);
669 lst_init(&buf->pic_unit.bstr_seg_list);
670 lst_init(&buf->end_unit.bstr_seg_list);
671
672 list_add_tail(&buf->list, &ctx->out_buffers);
673 } else {
674 /* Create a single sgt from the plane(s) */
675 sgt_new = kmalloc(sizeof(*sgt_new), GFP_KERNEL);
676 if (!sgt_new)
677 return -EINVAL;
678
679 for (plane = 0; plane < num_planes; plane++) {
680 size += ALIGN(vb2_plane_size(vb, plane), PAGE_SIZE);
681 sgt = vb2_dma_sg_plane_desc(vb, plane);
682 if (!sgt) {
683 dev_err(dev, "Could not get sg_table from plane %d\n", plane);
684 kfree(sgt_new);
685 return -EINVAL;
686 }
687 #ifdef CAPTURE_CONTIG_ALLOC
688 nents += 1;
689 #else
690 nents += sg_nents(img_mmu_get_sgl(sgt));
691 #endif
692 }
693 buf->buf_info.buf_size = size;
694
695 pages = (size + PAGE_SIZE - 1) / PAGE_SIZE;
696 ret = sg_alloc_table(sgt_new, nents, GFP_KERNEL);
697 if (ret) {
698 kfree(sgt_new);
699 return -EINVAL;
700 }
701 sgl_new = img_mmu_get_sgl(sgt_new);
702
703 for (plane = 0; plane < num_planes; plane++) {
704 sgt = vb2_dma_sg_plane_desc(vb, plane);
705 if (!sgt) {
706 dev_err(dev, "Could not get sg_table from plane %d\n", plane);
707 sg_free_table(sgt_new);
708 kfree(sgt_new);
709 return -EINVAL;
710 }
711 #ifdef CAPTURE_CONTIG_ALLOC
> 712 new_page = phys_to_page(vb2_dma_contig_plane_dma_addr(vb, plane));
713 sg_set_page(sgl_new, new_page, ALIGN(vb2_plane_size(vb, plane),
714 PAGE_SIZE), 0);
715 sgl_new = sg_next(sgl_new);
716 #else
717 sgl = img_mmu_get_sgl(sgt);
718
719 while (sgl) {
720 sg_set_page(sgl_new, sg_page(sgl), img_mmu_get_sgl_length(sgl), 0);
721 sgl = sg_next(sgl);
722 sgl_new = sg_next(sgl_new);
723 }
724 #endif
725 }
726
727 buf->buf_info.pictbuf_cfg = ctx->pict_bufcfg;
728 ret = core_stream_map_buf_sg(ctx->res_str_id,
729 VDEC_BUFTYPE_PICTURE,
730 &buf->buf_info, sgt_new,
731 &buf->buf_map_id);
732 sg_free_table(sgt_new);
733 kfree(sgt_new);
734 if (ret) {
735 dev_err(dev, "CAPTURE core_stream_map_buf_sg failed\n");
736 return ret;
737 }
738 list_add_tail(&buf->list, &ctx->cap_buffers);
739 }
740 buf->mapped = TRUE;
741 buf->reuse = TRUE;
742
743 return 0;
744 }
745
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[kees:kspp/array-bounds/next-20210816/v1 10/10] kernel/cgroup/cgroup.c:651:56: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git kspp/array-bounds/next-20210816/v1
head: b07d5e8190ca172b1ffddd1412b921296000b379
commit: b07d5e8190ca172b1ffddd1412b921296000b379 [10/10] Makefile: Enable -Wzero-length-bounds
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.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/kees/linux.git/commit/?id...
git remote add kees https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git
git fetch --no-tags kees kspp/array-bounds/next-20210816/v1
git checkout b07d5e8190ca172b1ffddd1412b921296000b379
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arm
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/arm/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:264,
from include/uapi/linux/swab.h:6,
from include/linux/swab.h:5,
from arch/arm/include/asm/opcodes.h:86,
from arch/arm/include/asm/bug.h:7,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/current.h:5,
from ./arch/arm/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from include/linux/cgroup.h:12,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
kernel/cgroup/cgroup.c: In function 'of_css':
>> kernel/cgroup/cgroup.c:651:56: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
651 | return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
| ^
include/linux/rcupdate.h:403:32: note: in expansion of macro 'READ_ONCE'
403 | typeof(p) ________p1 = READ_ONCE(p); \
| ^~~~~~~~~
kernel/cgroup/cgroup.c:651:24: note: in expansion of macro 'rcu_dereference_raw'
651 | return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
| ^~~~~~~~~~~~~~~~~~~
In file included from include/linux/cgroup.h:28,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
426 | struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
| ^~~~~~
In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:264,
from include/uapi/linux/swab.h:6,
from include/linux/swab.h:5,
from arch/arm/include/asm/opcodes.h:86,
from arch/arm/include/asm/bug.h:7,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/current.h:5,
from ./arch/arm/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from include/linux/cgroup.h:12,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
kernel/cgroup/cgroup.c: In function 'cgroup_file_write':
kernel/cgroup/cgroup.c:476:58: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
476 | return rcu_dereference_check(cgrp->subsys[ss->id],
include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
| ^
include/linux/rcupdate.h:389:55: note: in expansion of macro 'READ_ONCE'
389 | typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
| ^~~~~~~~~
include/linux/rcupdate.h:528:9: note: in expansion of macro '__rcu_dereference_check'
528 | __rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
| ^~~~~~~~~~~~~~~~~~~~~~~
kernel/cgroup/cgroup.c:476:24: note: in expansion of macro 'rcu_dereference_check'
476 | return rcu_dereference_check(cgrp->subsys[ss->id],
| ^~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/cgroup.h:28,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
426 | struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
| ^~~~~~
In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:264,
from include/uapi/linux/swab.h:6,
from include/linux/swab.h:5,
from arch/arm/include/asm/opcodes.h:86,
from arch/arm/include/asm/bug.h:7,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/current.h:5,
from ./arch/arm/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from include/linux/cgroup.h:12,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
kernel/cgroup/cgroup.c: In function 'cgroup_get_e_css':
kernel/cgroup/cgroup.c:476:58: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
476 | return rcu_dereference_check(cgrp->subsys[ss->id],
include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
| ^
include/linux/rcupdate.h:389:55: note: in expansion of macro 'READ_ONCE'
389 | typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
| ^~~~~~~~~
include/linux/rcupdate.h:528:9: note: in expansion of macro '__rcu_dereference_check'
528 | __rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
| ^~~~~~~~~~~~~~~~~~~~~~~
kernel/cgroup/cgroup.c:476:24: note: in expansion of macro 'rcu_dereference_check'
476 | return rcu_dereference_check(cgrp->subsys[ss->id],
| ^~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/cgroup.h:28,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
426 | struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
| ^~~~~~
kernel/cgroup/cgroup.c:590:34: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
590 | css = init_css_set.subsys[ss->id];
| ~~~~~~~~~~~~~~~~~~~^~~~~~~~
In file included from include/linux/cgroup.h:28,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
include/linux/cgroup-defs.h:205:37: note: while referencing 'subsys'
205 | struct cgroup_subsys_state *subsys[CGROUP_SUBSYS_COUNT];
| ^~~~~~
kernel/cgroup/cgroup.c:744:16: note: defined here 'init_css_set'
744 | struct css_set init_css_set = {
| ^~~~~~~~~~~~
In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:264,
from include/uapi/linux/swab.h:6,
from include/linux/swab.h:5,
from arch/arm/include/asm/opcodes.h:86,
from arch/arm/include/asm/bug.h:7,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/current.h:5,
from ./arch/arm/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from include/linux/cgroup.h:12,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
kernel/cgroup/cgroup.c: In function 'cgroup_subtree_control_show':
>> kernel/cgroup/cgroup.c:651:56: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
651 | return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
| ^
include/linux/rcupdate.h:403:32: note: in expansion of macro 'READ_ONCE'
403 | typeof(p) ________p1 = READ_ONCE(p); \
| ^~~~~~~~~
kernel/cgroup/cgroup.c:651:24: note: in expansion of macro 'rcu_dereference_raw'
651 | return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
| ^~~~~~~~~~~~~~~~~~~
In file included from include/linux/cgroup.h:28,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
426 | struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
| ^~~~~~
In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:264,
from include/uapi/linux/swab.h:6,
from include/linux/swab.h:5,
from arch/arm/include/asm/opcodes.h:86,
from arch/arm/include/asm/bug.h:7,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/current.h:5,
from ./arch/arm/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from include/linux/cgroup.h:12,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
kernel/cgroup/cgroup.c: In function 'cgroup_controllers_show':
>> kernel/cgroup/cgroup.c:651:56: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
651 | return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
| ^
include/linux/rcupdate.h:403:32: note: in expansion of macro 'READ_ONCE'
403 | typeof(p) ________p1 = READ_ONCE(p); \
| ^~~~~~~~~
kernel/cgroup/cgroup.c:651:24: note: in expansion of macro 'rcu_dereference_raw'
651 | return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
| ^~~~~~~~~~~~~~~~~~~
In file included from include/linux/cgroup.h:28,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
426 | struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
| ^~~~~~
In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:264,
from include/uapi/linux/swab.h:6,
from include/linux/swab.h:5,
from arch/arm/include/asm/opcodes.h:86,
from arch/arm/include/asm/bug.h:7,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/current.h:5,
from ./arch/arm/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from include/linux/cgroup.h:12,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
kernel/cgroup/cgroup.c: In function 'cpu_stat_show':
>> kernel/cgroup/cgroup.c:651:56: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
651 | return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
| ^
include/linux/rcupdate.h:403:32: note: in expansion of macro 'READ_ONCE'
403 | typeof(p) ________p1 = READ_ONCE(p); \
| ^~~~~~~~~
kernel/cgroup/cgroup.c:651:24: note: in expansion of macro 'rcu_dereference_raw'
651 | return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
| ^~~~~~~~~~~~~~~~~~~
In file included from include/linux/cgroup.h:28,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
426 | struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
| ^~~~~~
In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:264,
from include/uapi/linux/swab.h:6,
from include/linux/swab.h:5,
from arch/arm/include/asm/opcodes.h:86,
from arch/arm/include/asm/bug.h:7,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/current.h:5,
from ./arch/arm/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from include/linux/cgroup.h:12,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
kernel/cgroup/cgroup.c: In function 'cgroup_freeze_show':
>> kernel/cgroup/cgroup.c:651:56: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
651 | return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
| ^
include/linux/rcupdate.h:403:32: note: in expansion of macro 'READ_ONCE'
403 | typeof(p) ________p1 = READ_ONCE(p); \
| ^~~~~~~~~
kernel/cgroup/cgroup.c:651:24: note: in expansion of macro 'rcu_dereference_raw'
651 | return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
| ^~~~~~~~~~~~~~~~~~~
In file included from include/linux/cgroup.h:28,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
426 | struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
| ^~~~~~
In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:264,
from include/uapi/linux/swab.h:6,
from include/linux/swab.h:5,
from arch/arm/include/asm/opcodes.h:86,
from arch/arm/include/asm/bug.h:7,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/current.h:5,
from ./arch/arm/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from include/linux/cgroup.h:12,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
kernel/cgroup/cgroup.c: In function 'cgroup_max_descendants_show':
>> kernel/cgroup/cgroup.c:651:56: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
651 | return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
| ^
include/linux/rcupdate.h:403:32: note: in expansion of macro 'READ_ONCE'
403 | typeof(p) ________p1 = READ_ONCE(p); \
| ^~~~~~~~~
kernel/cgroup/cgroup.c:651:24: note: in expansion of macro 'rcu_dereference_raw'
651 | return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
| ^~~~~~~~~~~~~~~~~~~
In file included from include/linux/cgroup.h:28,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
426 | struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
| ^~~~~~
In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:264,
from include/uapi/linux/swab.h:6,
from include/linux/swab.h:5,
from arch/arm/include/asm/opcodes.h:86,
from arch/arm/include/asm/bug.h:7,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/current.h:5,
from ./arch/arm/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from include/linux/cgroup.h:12,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
kernel/cgroup/cgroup.c: In function 'cgroup_max_depth_show':
>> kernel/cgroup/cgroup.c:651:56: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
651 | return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
| ^
include/linux/rcupdate.h:403:32: note: in expansion of macro 'READ_ONCE'
403 | typeof(p) ________p1 = READ_ONCE(p); \
| ^~~~~~~~~
kernel/cgroup/cgroup.c:651:24: note: in expansion of macro 'rcu_dereference_raw'
651 | return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
| ^~~~~~~~~~~~~~~~~~~
In file included from include/linux/cgroup.h:28,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
426 | struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
| ^~~~~~
In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:264,
from include/uapi/linux/swab.h:6,
from include/linux/swab.h:5,
from arch/arm/include/asm/opcodes.h:86,
from arch/arm/include/asm/bug.h:7,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/current.h:5,
from ./arch/arm/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from include/linux/cgroup.h:12,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
kernel/cgroup/cgroup.c: In function 'cgroup_stat_show':
>> kernel/cgroup/cgroup.c:651:56: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
651 | return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
| ^
include/linux/rcupdate.h:403:32: note: in expansion of macro 'READ_ONCE'
403 | typeof(p) ________p1 = READ_ONCE(p); \
| ^~~~~~~~~
kernel/cgroup/cgroup.c:651:24: note: in expansion of macro 'rcu_dereference_raw'
651 | return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
| ^~~~~~~~~~~~~~~~~~~
In file included from include/linux/cgroup.h:28,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
426 | struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
| ^~~~~~
In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:264,
from include/uapi/linux/swab.h:6,
from include/linux/swab.h:5,
from arch/arm/include/asm/opcodes.h:86,
from arch/arm/include/asm/bug.h:7,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/current.h:5,
from ./arch/arm/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from include/linux/cgroup.h:12,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
kernel/cgroup/cgroup.c: In function 'cgroup_events_show':
>> kernel/cgroup/cgroup.c:651:56: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
651 | return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
| ^
include/linux/rcupdate.h:403:32: note: in expansion of macro 'READ_ONCE'
403 | typeof(p) ________p1 = READ_ONCE(p); \
| ^~~~~~~~~
kernel/cgroup/cgroup.c:651:24: note: in expansion of macro 'rcu_dereference_raw'
651 | return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
| ^~~~~~~~~~~~~~~~~~~
In file included from include/linux/cgroup.h:28,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
426 | struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
| ^~~~~~
In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:264,
from include/uapi/linux/swab.h:6,
from include/linux/swab.h:5,
from arch/arm/include/asm/opcodes.h:86,
from arch/arm/include/asm/bug.h:7,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/current.h:5,
from ./arch/arm/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from include/linux/cgroup.h:12,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
kernel/cgroup/cgroup.c: In function 'cgroup_type_show':
>> kernel/cgroup/cgroup.c:651:56: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
651 | return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
| ^
include/linux/rcupdate.h:403:32: note: in expansion of macro 'READ_ONCE'
403 | typeof(p) ________p1 = READ_ONCE(p); \
| ^~~~~~~~~
kernel/cgroup/cgroup.c:651:24: note: in expansion of macro 'rcu_dereference_raw'
651 | return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
| ^~~~~~~~~~~~~~~~~~~
In file included from include/linux/cgroup.h:28,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
426 | struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
| ^~~~~~
In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:264,
from include/uapi/linux/swab.h:6,
from include/linux/swab.h:5,
from arch/arm/include/asm/opcodes.h:86,
from arch/arm/include/asm/bug.h:7,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/current.h:5,
from ./arch/arm/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from include/linux/cgroup.h:12,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
kernel/cgroup/cgroup.c: In function 'cgroup_seqfile_show':
>> kernel/cgroup/cgroup.c:651:56: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
651 | return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
| ^
include/linux/rcupdate.h:403:32: note: in expansion of macro 'READ_ONCE'
403 | typeof(p) ________p1 = READ_ONCE(p); \
| ^~~~~~~~~
kernel/cgroup/cgroup.c:651:24: note: in expansion of macro 'rcu_dereference_raw'
651 | return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
| ^~~~~~~~~~~~~~~~~~~
In file included from include/linux/cgroup.h:28,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
426 | struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
| ^~~~~~
In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:264,
from include/uapi/linux/swab.h:6,
from include/linux/swab.h:5,
from arch/arm/include/asm/opcodes.h:86,
from arch/arm/include/asm/bug.h:7,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/current.h:5,
from ./arch/arm/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from include/linux/cgroup.h:12,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
kernel/cgroup/cgroup.c: In function 'cgroup_addrm_files':
kernel/cgroup/cgroup.c:476:58: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
476 | return rcu_dereference_check(cgrp->subsys[ss->id],
include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
| ^
include/linux/rcupdate.h:389:55: note: in expansion of macro 'READ_ONCE'
389 | typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
| ^~~~~~~~~
include/linux/rcupdate.h:528:9: note: in expansion of macro '__rcu_dereference_check'
528 | __rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
| ^~~~~~~~~~~~~~~~~~~~~~~
kernel/cgroup/cgroup.c:476:24: note: in expansion of macro 'rcu_dereference_check'
476 | return rcu_dereference_check(cgrp->subsys[ss->id],
| ^~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/cgroup.h:28,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
426 | struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
| ^~~~~~
In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:264,
from include/uapi/linux/swab.h:6,
from include/linux/swab.h:5,
from arch/arm/include/asm/opcodes.h:86,
from arch/arm/include/asm/bug.h:7,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/current.h:5,
from ./arch/arm/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from include/linux/cgroup.h:12,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
kernel/cgroup/cgroup.c: In function 'cgroup_e_css':
kernel/cgroup/cgroup.c:476:58: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
476 | return rcu_dereference_check(cgrp->subsys[ss->id],
include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
| ^
include/linux/rcupdate.h:389:55: note: in expansion of macro 'READ_ONCE'
389 | typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
| ^~~~~~~~~
include/linux/rcupdate.h:528:9: note: in expansion of macro '__rcu_dereference_check'
528 | __rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
| ^~~~~~~~~~~~~~~~~~~~~~~
kernel/cgroup/cgroup.c:476:24: note: in expansion of macro 'rcu_dereference_check'
476 | return rcu_dereference_check(cgrp->subsys[ss->id],
| ^~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/cgroup.h:28,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
426 | struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
| ^~~~~~
kernel/cgroup/cgroup.c:561:35: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
561 | return init_css_set.subsys[ss->id];
| ~~~~~~~~~~~~~~~~~~~^~~~~~~~
In file included from include/linux/cgroup.h:28,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
include/linux/cgroup-defs.h:205:37: note: while referencing 'subsys'
205 | struct cgroup_subsys_state *subsys[CGROUP_SUBSYS_COUNT];
| ^~~~~~
kernel/cgroup/cgroup.c:744:16: note: defined here 'init_css_set'
744 | struct css_set init_css_set = {
| ^~~~~~~~~~~~
kernel/cgroup/cgroup.c: In function 'cgroup_taskset_next':
kernel/cgroup/cgroup.c:2395:57: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
2395 | *dst_cssp = cset->subsys[tset->ssid];
| ~~~~~~~~~~~~^~~~~~~~~~~~
In file included from include/linux/cgroup.h:28,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
include/linux/cgroup-defs.h:205:37: note: while referencing 'subsys'
205 | struct cgroup_subsys_state *subsys[CGROUP_SUBSYS_COUNT];
| ^~~~~~
kernel/cgroup/cgroup.c:2393:70: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
2393 | *dst_cssp = cset->mg_dst_cset->subsys[tset->ssid];
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from include/linux/cgroup.h:28,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
include/linux/cgroup-defs.h:205:37: note: while referencing 'subsys'
205 | struct cgroup_subsys_state *subsys[CGROUP_SUBSYS_COUNT];
| ^~~~~~
In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:264,
from include/uapi/linux/swab.h:6,
from include/linux/swab.h:5,
from arch/arm/include/asm/opcodes.h:86,
from arch/arm/include/asm/bug.h:7,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/current.h:5,
from ./arch/arm/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from include/linux/cgroup.h:12,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
kernel/cgroup/cgroup.c: In function 'cgroup_rm_cftypes':
kernel/cgroup/cgroup.c:476:58: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
476 | return rcu_dereference_check(cgrp->subsys[ss->id],
include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
| ^
include/linux/rcupdate.h:389:55: note: in expansion of macro 'READ_ONCE'
389 | typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
| ^~~~~~~~~
include/linux/rcupdate.h:528:9: note: in expansion of macro '__rcu_dereference_check'
528 | __rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
| ^~~~~~~~~~~~~~~~~~~~~~~
kernel/cgroup/cgroup.c:476:24: note: in expansion of macro 'rcu_dereference_check'
476 | return rcu_dereference_check(cgrp->subsys[ss->id],
| ^~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/cgroup.h:28,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
426 | struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
| ^~~~~~
In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:264,
from include/uapi/linux/swab.h:6,
from include/linux/swab.h:5,
from arch/arm/include/asm/opcodes.h:86,
from arch/arm/include/asm/bug.h:7,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/current.h:5,
from ./arch/arm/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from include/linux/cgroup.h:12,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
kernel/cgroup/cgroup.c:476:58: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
476 | return rcu_dereference_check(cgrp->subsys[ss->id],
include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
| ^
include/linux/rcupdate.h:389:55: note: in expansion of macro 'READ_ONCE'
389 | typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
| ^~~~~~~~~
include/linux/rcupdate.h:528:9: note: in expansion of macro '__rcu_dereference_check'
528 | __rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
| ^~~~~~~~~~~~~~~~~~~~~~~
kernel/cgroup/cgroup.c:476:24: note: in expansion of macro 'rcu_dereference_check'
476 | return rcu_dereference_check(cgrp->subsys[ss->id],
| ^~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/cgroup.h:28,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
426 | struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
| ^~~~~~
kernel/cgroup/cgroup.c: In function 'css_task_iter_start':
>> kernel/cgroup/cgroup.c:4647:32: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct list_head[0]' [-Wzero-length-bounds]
4647 | it->cset_pos = &css->cgroup->e_csets[css->ss->id];
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/cgroup.h:28,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
include/linux/cgroup-defs.h:443:26: note: while referencing 'e_csets'
443 | struct list_head e_csets[CGROUP_SUBSYS_COUNT];
| ^~~~~~~
In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:264,
from include/uapi/linux/swab.h:6,
from include/linux/swab.h:5,
from arch/arm/include/asm/opcodes.h:86,
from arch/arm/include/asm/bug.h:7,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/current.h:5,
from ./arch/arm/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from include/linux/cgroup.h:12,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
kernel/cgroup/cgroup.c: In function '__cgroup_procs_start':
>> kernel/cgroup/cgroup.c:651:56: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
651 | return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
| ^
include/linux/rcupdate.h:403:32: note: in expansion of macro 'READ_ONCE'
403 | typeof(p) ________p1 = READ_ONCE(p); \
| ^~~~~~~~~
kernel/cgroup/cgroup.c:651:24: note: in expansion of macro 'rcu_dereference_raw'
651 | return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
| ^~~~~~~~~~~~~~~~~~~
In file included from include/linux/cgroup.h:28,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
426 | struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
| ^~~~~~
In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:264,
from include/uapi/linux/swab.h:6,
from include/linux/swab.h:5,
from arch/arm/include/asm/opcodes.h:86,
from arch/arm/include/asm/bug.h:7,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/current.h:5,
from ./arch/arm/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from include/linux/cgroup.h:12,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
kernel/cgroup/cgroup.c: In function 'cgroup_procs_start':
>> kernel/cgroup/cgroup.c:651:56: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
651 | return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
| ^
include/linux/rcupdate.h:403:32: note: in expansion of macro 'READ_ONCE'
403 | typeof(p) ________p1 = READ_ONCE(p); \
| ^~~~~~~~~
kernel/cgroup/cgroup.c:651:24: note: in expansion of macro 'rcu_dereference_raw'
651 | return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
| ^~~~~~~~~~~~~~~~~~~
In file included from include/linux/cgroup.h:28,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
426 | struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
| ^~~~~~
In file included from ./arch/arm/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:264,
from include/uapi/linux/swab.h:6,
from include/linux/swab.h:5,
from arch/arm/include/asm/opcodes.h:86,
from arch/arm/include/asm/bug.h:7,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/current.h:5,
from ./arch/arm/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from include/linux/cgroup.h:12,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
kernel/cgroup/cgroup.c: In function 'css_tryget_online_from_dir':
kernel/cgroup/cgroup.c:476:58: warning: array subscript '<unknown>' is outside the bounds of an interior zero-length array 'struct cgroup_subsys_state *[0]' [-Wzero-length-bounds]
476 | return rcu_dereference_check(cgrp->subsys[ss->id],
include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
| ^
include/linux/rcupdate.h:389:55: note: in expansion of macro 'READ_ONCE'
389 | typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
| ^~~~~~~~~
include/linux/rcupdate.h:528:9: note: in expansion of macro '__rcu_dereference_check'
528 | __rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
| ^~~~~~~~~~~~~~~~~~~~~~~
kernel/cgroup/cgroup.c:476:24: note: in expansion of macro 'rcu_dereference_check'
476 | return rcu_dereference_check(cgrp->subsys[ss->id],
| ^~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/cgroup.h:28,
from kernel/cgroup/cgroup-internal.h:5,
from kernel/cgroup/cgroup.c:31:
include/linux/cgroup-defs.h:426:43: note: while referencing 'subsys'
426 | struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
| ^~~~~~
vim +651 kernel/cgroup/cgroup.c
aade7f9efba098 kernel/cgroup/cgroup.c Roman Gushchin 2019-04-19 636
b41686401e5014 kernel/cgroup.c Tejun Heo 2014-05-13 637 struct cgroup_subsys_state *of_css(struct kernfs_open_file *of)
59f5296b51b867 kernel/cgroup.c Tejun Heo 2014-02-11 638 {
2bd59d48ebfb3d kernel/cgroup.c Tejun Heo 2014-02-11 639 struct cgroup *cgrp = of->kn->parent->priv;
b41686401e5014 kernel/cgroup.c Tejun Heo 2014-05-13 640 struct cftype *cft = of_cft(of);
2bd59d48ebfb3d kernel/cgroup.c Tejun Heo 2014-02-11 641
2bd59d48ebfb3d kernel/cgroup.c Tejun Heo 2014-02-11 642 /*
2bd59d48ebfb3d kernel/cgroup.c Tejun Heo 2014-02-11 643 * This is open and unprotected implementation of cgroup_css().
2bd59d48ebfb3d kernel/cgroup.c Tejun Heo 2014-02-11 644 * seq_css() is only called from a kernfs file operation which has
2bd59d48ebfb3d kernel/cgroup.c Tejun Heo 2014-02-11 645 * an active reference on the file. Because all the subsystem
2bd59d48ebfb3d kernel/cgroup.c Tejun Heo 2014-02-11 646 * files are drained before a css is disassociated with a cgroup,
2bd59d48ebfb3d kernel/cgroup.c Tejun Heo 2014-02-11 647 * the matching css from the cgroup's subsys table is guaranteed to
2bd59d48ebfb3d kernel/cgroup.c Tejun Heo 2014-02-11 648 * be and stay valid until the enclosing operation is complete.
2bd59d48ebfb3d kernel/cgroup.c Tejun Heo 2014-02-11 649 */
2bd59d48ebfb3d kernel/cgroup.c Tejun Heo 2014-02-11 650 if (cft->ss)
2bd59d48ebfb3d kernel/cgroup.c Tejun Heo 2014-02-11 @651 return rcu_dereference_raw(cgrp->subsys[cft->ss->id]);
2bd59d48ebfb3d kernel/cgroup.c Tejun Heo 2014-02-11 652 else
9d800df12d3173 kernel/cgroup.c Tejun Heo 2014-05-14 653 return &cgrp->self;
59f5296b51b867 kernel/cgroup.c Tejun Heo 2014-02-11 654 }
b41686401e5014 kernel/cgroup.c Tejun Heo 2014-05-13 655 EXPORT_SYMBOL_GPL(of_css);
59f5296b51b867 kernel/cgroup.c Tejun Heo 2014-02-11 656
:::::: The code at line 651 was first introduced by commit
:::::: 2bd59d48ebfb3df41ee56938946ca0dd30887312 cgroup: convert to kernfs
:::::: TO: Tejun Heo <tj(a)kernel.org>
:::::: CC: Tejun Heo <tj(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
arch/powerpc/kernel/tau_6xx.c:199:1: sparse: sparse: symbol 'tau_work' was not declared. Should it be static?
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 614cb2751d3150850d459bee596c397f344a7936
commit: b1c6a0a10bfaf36ec82fde6f621da72407fa60a1 powerpc/tau: Convert from timer to workqueue
date: 11 months ago
config: powerpc-randconfig-s032-20210818 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 11.2.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-348-gf0e6938b-dirty
# 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 fetch --no-tags linus master
git checkout b1c6a0a10bfaf36ec82fde6f621da72407fa60a1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=powerpc SHELL=/bin/bash arch/powerpc/kernel/
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 >>)
>> arch/powerpc/kernel/tau_6xx.c:199:1: sparse: sparse: symbol 'tau_work' was not declared. Should it be static?
vim +/tau_work +199 arch/powerpc/kernel/tau_6xx.c
189
190 static int __init TAU_init(void)
191 {
192 /* We assume in SMP that if one CPU has TAU support, they
193 * all have it --BenH
194 */
195 if (!cpu_has_feature(CPU_FTR_TAU)) {
196 printk("Thermal assist unit not available\n");
197 tau_initialized = 0;
198 return 1;
> 199 }
200
201 tau_int_enable = IS_ENABLED(CONFIG_TAU_INT) &&
202 !strcmp(cur_cpu_spec->platform, "ppc750");
203
204 tau_workq = alloc_workqueue("tau", WQ_UNBOUND, 1);
205 if (!tau_workq)
206 return -ENOMEM;
207
208 on_each_cpu(TAU_init_smp, NULL, 0);
209
210 queue_work(tau_workq, &tau_work);
211
212 pr_info("Thermal assist unit using %s, shrink_timer: %d ms\n",
213 tau_int_enable ? "interrupts" : "workqueue", shrink_timer);
214 tau_initialized = 1;
215
216 return 0;
217 }
218
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
Re: [PATCH 27/30] media: platform: vxd: Kconfig: Add Video decoder Kconfig and Makefile
by kernel test robot
Hi,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linuxtv-media/master]
[also build test WARNING on staging/staging-testing driver-core/driver-core-testing linus/master v5.14-rc6 next-20210818]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/sidraya-bj-pathpartnertech-com/T...
base: git://linuxtv.org/media_tree.git master
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 11.2.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://github.com/0day-ci/linux/commit/f42ae4f45639a6214f9e775d4280061bf...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review sidraya-bj-pathpartnertech-com/TI-Video-Decoder-driver-upstreaming-to-v5-14-rc6-kernel/20210818-221811
git checkout f42ae4f45639a6214f9e775d4280061bf52fc229
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=m68k
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 include/linux/printk.h:456,
from include/linux/kernel.h:19,
from include/linux/radix-tree.h:12,
from include/linux/idr.h:15,
from drivers/staging/media/vxd/decoder/../common/img_mem_man.c:15:
drivers/staging/media/vxd/decoder/../common/img_mem_man.c: In function '_img_mem_alloc':
>> drivers/staging/media/vxd/decoder/../common/img_mem_man.c:290:25: warning: format '%zu' expects argument of type 'size_t', but argument 9 has type 'long unsigned int' [-Wformat=]
290 | dev_dbg(device, "%s heap %p ctx %p created buffer %d (%p) actual_size %zu\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:134:29: note: in definition of macro '__dynamic_func_call'
134 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:166:9: note: in expansion of macro '_dynamic_func_call'
166 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:9: note: in expansion of macro 'dynamic_dev_dbg'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:30: note: in expansion of macro 'dev_fmt'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/staging/media/vxd/decoder/../common/img_mem_man.c:290:9: note: in expansion of macro 'dev_dbg'
290 | dev_dbg(device, "%s heap %p ctx %p created buffer %d (%p) actual_size %zu\n",
| ^~~~~~~
drivers/staging/media/vxd/decoder/../common/img_mem_man.c:290:81: note: format string is defined here
290 | dev_dbg(device, "%s heap %p ctx %p created buffer %d (%p) actual_size %zu\n",
| ~~^
| |
| unsigned int
| %lu
In file included from include/linux/printk.h:456,
from include/linux/kernel.h:19,
from include/linux/radix-tree.h:12,
from include/linux/idr.h:15,
from drivers/staging/media/vxd/decoder/../common/img_mem_man.c:15:
drivers/staging/media/vxd/decoder/../common/img_mem_man.c: In function 'img_mem_alloc':
drivers/staging/media/vxd/decoder/../common/img_mem_man.c:309:25: warning: format '%zu' expects argument of type 'size_t', but argument 7 has type 'long unsigned int' [-Wformat=]
309 | dev_dbg(device, "%s heap %d ctx %p size %zu\n", __func__, heap_id,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:134:29: note: in definition of macro '__dynamic_func_call'
134 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:166:9: note: in expansion of macro '_dynamic_func_call'
166 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:9: note: in expansion of macro 'dynamic_dev_dbg'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:30: note: in expansion of macro 'dev_fmt'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/staging/media/vxd/decoder/../common/img_mem_man.c:309:9: note: in expansion of macro 'dev_dbg'
309 | dev_dbg(device, "%s heap %d ctx %p size %zu\n", __func__, heap_id,
| ^~~~~~~
drivers/staging/media/vxd/decoder/../common/img_mem_man.c:309:51: note: format string is defined here
309 | dev_dbg(device, "%s heap %d ctx %p size %zu\n", __func__, heap_id,
| ~~^
| |
| unsigned int
| %lu
In file included from include/linux/printk.h:456,
from include/linux/kernel.h:19,
from include/linux/radix-tree.h:12,
from include/linux/idr.h:15,
from drivers/staging/media/vxd/decoder/../common/img_mem_man.c:15:
drivers/staging/media/vxd/decoder/../common/img_mem_man.c:333:25: warning: format '%zu' expects argument of type 'size_t', but argument 9 has type 'long unsigned int' [-Wformat=]
333 | dev_dbg(device, "%s heap %d ctx %p created buffer %d (%p) size %zu\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:134:29: note: in definition of macro '__dynamic_func_call'
134 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:166:9: note: in expansion of macro '_dynamic_func_call'
166 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:9: note: in expansion of macro 'dynamic_dev_dbg'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:30: note: in expansion of macro 'dev_fmt'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/staging/media/vxd/decoder/../common/img_mem_man.c:333:9: note: in expansion of macro 'dev_dbg'
333 | dev_dbg(device, "%s heap %d ctx %p created buffer %d (%p) size %zu\n",
| ^~~~~~~
drivers/staging/media/vxd/decoder/../common/img_mem_man.c:333:74: note: format string is defined here
333 | dev_dbg(device, "%s heap %d ctx %p created buffer %d (%p) size %zu\n",
| ~~^
| |
| unsigned int
| %lu
In file included from include/linux/printk.h:456,
from include/linux/kernel.h:19,
from include/linux/radix-tree.h:12,
from include/linux/idr.h:15,
from drivers/staging/media/vxd/decoder/../common/img_mem_man.c:15:
drivers/staging/media/vxd/decoder/../common/img_mem_man.c: In function '_img_mem_import':
drivers/staging/media/vxd/decoder/../common/img_mem_man.c:372:25: warning: format '%zu' expects argument of type 'size_t', but argument 8 has type 'long unsigned int' [-Wformat=]
372 | dev_dbg(device, "%s ctx %p created buffer %d (%p) actual_size %zu\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:134:29: note: in definition of macro '__dynamic_func_call'
134 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:166:9: note: in expansion of macro '_dynamic_func_call'
166 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:9: note: in expansion of macro 'dynamic_dev_dbg'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
--
drivers/staging/media/vxd/decoder/../common/work_queue.c: In function 'get_delayed_work_buff':
>> drivers/staging/media/vxd/decoder/../common/work_queue.c:148:22: warning: variable 'previous' set but not used [-Wunused-but-set-variable]
148 | struct node *previous = NULL;
| ^~~~~~~~
--
>> drivers/staging/media/vxd/decoder/jpeg_secure_parser.c:596:5: warning: no previous prototype for 'bspp_jpeg_unit_parser' [-Wmissing-prototypes]
596 | int bspp_jpeg_unit_parser(void *swsr_ctx, struct bspp_unit_data *unit_data)
| ^~~~~~~~~~~~~~~~~~~~~
vim +290 drivers/staging/media/vxd/decoder/../common/img_mem_man.c
76b88427fbba69 Sidraya 2021-08-18 240
76b88427fbba69 Sidraya 2021-08-18 241 static int _img_mem_alloc(void *device, struct mem_ctx *ctx,
76b88427fbba69 Sidraya 2021-08-18 242 struct heap *heap, unsigned long size,
76b88427fbba69 Sidraya 2021-08-18 243 enum mem_attr attr, struct buffer **buffer_new)
76b88427fbba69 Sidraya 2021-08-18 244 {
76b88427fbba69 Sidraya 2021-08-18 245 struct buffer *buffer;
76b88427fbba69 Sidraya 2021-08-18 246 int ret;
76b88427fbba69 Sidraya 2021-08-18 247
76b88427fbba69 Sidraya 2021-08-18 248 if (size == 0) {
76b88427fbba69 Sidraya 2021-08-18 249 dev_err(device, "%s: buffer size is zero\n", __func__);
76b88427fbba69 Sidraya 2021-08-18 250 return -EINVAL;
76b88427fbba69 Sidraya 2021-08-18 251 }
76b88427fbba69 Sidraya 2021-08-18 252
76b88427fbba69 Sidraya 2021-08-18 253 if (!heap->ops || !heap->ops->alloc) {
76b88427fbba69 Sidraya 2021-08-18 254 dev_err(device, "%s: no alloc function in heap %d!\n",
76b88427fbba69 Sidraya 2021-08-18 255 __func__, heap->id);
76b88427fbba69 Sidraya 2021-08-18 256 return -EINVAL;
76b88427fbba69 Sidraya 2021-08-18 257 }
76b88427fbba69 Sidraya 2021-08-18 258
76b88427fbba69 Sidraya 2021-08-18 259 buffer = kzalloc(sizeof(*buffer), GFP_KERNEL);
76b88427fbba69 Sidraya 2021-08-18 260 if (!buffer)
76b88427fbba69 Sidraya 2021-08-18 261 return -ENOMEM;
76b88427fbba69 Sidraya 2021-08-18 262
76b88427fbba69 Sidraya 2021-08-18 263 ret = idr_alloc(ctx->buffers, buffer,
76b88427fbba69 Sidraya 2021-08-18 264 MEM_MAN_MIN_BUFFER, MEM_MAN_MAX_BUFFER, GFP_KERNEL);
76b88427fbba69 Sidraya 2021-08-18 265 if (ret < 0) {
76b88427fbba69 Sidraya 2021-08-18 266 dev_err(device, "%s: idr_alloc failed\n", __func__);
76b88427fbba69 Sidraya 2021-08-18 267 goto idr_alloc_failed;
76b88427fbba69 Sidraya 2021-08-18 268 }
76b88427fbba69 Sidraya 2021-08-18 269
76b88427fbba69 Sidraya 2021-08-18 270 buffer->id = ret;
76b88427fbba69 Sidraya 2021-08-18 271 buffer->request_size = size;
76b88427fbba69 Sidraya 2021-08-18 272 buffer->actual_size = ((size + PAGE_SIZE - 1) / PAGE_SIZE) * PAGE_SIZE;
76b88427fbba69 Sidraya 2021-08-18 273 buffer->device = device;
76b88427fbba69 Sidraya 2021-08-18 274 buffer->mem_ctx = ctx;
76b88427fbba69 Sidraya 2021-08-18 275 buffer->heap = heap;
76b88427fbba69 Sidraya 2021-08-18 276 INIT_LIST_HEAD(&buffer->mappings);
76b88427fbba69 Sidraya 2021-08-18 277 buffer->kptr = NULL;
76b88427fbba69 Sidraya 2021-08-18 278 buffer->priv = NULL;
76b88427fbba69 Sidraya 2021-08-18 279
76b88427fbba69 Sidraya 2021-08-18 280 ret = heap->ops->alloc(device, heap, buffer->actual_size, attr,
76b88427fbba69 Sidraya 2021-08-18 281 buffer);
76b88427fbba69 Sidraya 2021-08-18 282 if (ret) {
76b88427fbba69 Sidraya 2021-08-18 283 dev_err(device, "%s: heap %d alloc failed\n", __func__,
76b88427fbba69 Sidraya 2021-08-18 284 heap->id);
76b88427fbba69 Sidraya 2021-08-18 285 goto heap_alloc_failed;
76b88427fbba69 Sidraya 2021-08-18 286 }
76b88427fbba69 Sidraya 2021-08-18 287
76b88427fbba69 Sidraya 2021-08-18 288 *buffer_new = buffer;
76b88427fbba69 Sidraya 2021-08-18 289
76b88427fbba69 Sidraya 2021-08-18 @290 dev_dbg(device, "%s heap %p ctx %p created buffer %d (%p) actual_size %zu\n",
76b88427fbba69 Sidraya 2021-08-18 291 __func__, heap, ctx, buffer->id, buffer, buffer->actual_size);
76b88427fbba69 Sidraya 2021-08-18 292 return 0;
76b88427fbba69 Sidraya 2021-08-18 293
76b88427fbba69 Sidraya 2021-08-18 294 heap_alloc_failed:
76b88427fbba69 Sidraya 2021-08-18 295 idr_remove(ctx->buffers, buffer->id);
76b88427fbba69 Sidraya 2021-08-18 296 idr_alloc_failed:
76b88427fbba69 Sidraya 2021-08-18 297 kfree(buffer);
76b88427fbba69 Sidraya 2021-08-18 298 return ret;
76b88427fbba69 Sidraya 2021-08-18 299 }
76b88427fbba69 Sidraya 2021-08-18 300
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
arch/mips/sibyte/sb1250/setup.c:79:5: warning: no previous prototype for 'sb1250_m3_workaround_needed'
by kernel test robot
Hi Thomas,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 614cb2751d3150850d459bee596c397f344a7936
commit: ab5743079b8e3d3d4309664903f6b1f579168a56 MIPS: Get rid of BCM1250_M3_WAR
date: 12 months ago
config: mips-randconfig-r025-20210818 (attached as .config)
compiler: mipsel-linux-gcc (GCC) 11.2.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/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout ab5743079b8e3d3d4309664903f6b1f579168a56
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.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 warnings (new ones prefixed by >>):
>> arch/mips/sibyte/sb1250/setup.c:79:5: warning: no previous prototype for 'sb1250_m3_workaround_needed' [-Wmissing-prototypes]
79 | int sb1250_m3_workaround_needed(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/mips/sibyte/sb1250/setup.c:168:13: warning: no previous prototype for 'sb1250_setup' [-Wmissing-prototypes]
168 | void __init sb1250_setup(void)
| ^~~~~~~~~~~~
vim +/sb1250_m3_workaround_needed +79 arch/mips/sibyte/sb1250/setup.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 78
8d9df29db273ab Ralf Baechle 2010-03-23 @79 int sb1250_m3_workaround_needed(void)
8d9df29db273ab Ralf Baechle 2010-03-23 80 {
8d9df29db273ab Ralf Baechle 2010-03-23 81 switch (soc_type) {
8d9df29db273ab Ralf Baechle 2010-03-23 82 case K_SYS_SOC_TYPE_BCM1250:
8d9df29db273ab Ralf Baechle 2010-03-23 83 case K_SYS_SOC_TYPE_BCM1250_ALT:
8d9df29db273ab Ralf Baechle 2010-03-23 84 case K_SYS_SOC_TYPE_BCM1250_ALT2:
8d9df29db273ab Ralf Baechle 2010-03-23 85 case K_SYS_SOC_TYPE_BCM1125:
8d9df29db273ab Ralf Baechle 2010-03-23 86 case K_SYS_SOC_TYPE_BCM1125H:
8d9df29db273ab Ralf Baechle 2010-03-23 87 return soc_pass < K_SYS_REVISION_BCM1250_C0;
8d9df29db273ab Ralf Baechle 2010-03-23 88
8d9df29db273ab Ralf Baechle 2010-03-23 89 default:
8d9df29db273ab Ralf Baechle 2010-03-23 90 return 0;
8d9df29db273ab Ralf Baechle 2010-03-23 91 }
8d9df29db273ab Ralf Baechle 2010-03-23 92 }
8d9df29db273ab Ralf Baechle 2010-03-23 93
:::::: The code at line 79 was first introduced by commit
:::::: 8d9df29db273ab9a330828f4f4f6669d293a730a MIPS: Sibyte: Apply M3 workaround only on affected chip types and versions.
:::::: TO: Ralf Baechle <ralf(a)linux-mips.org>
:::::: CC: Ralf Baechle <ralf(a)linux-mips.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month