[dsahern-linux:nexthops/del-group-03 4/7] net/ipv4/fib_trie.c:1559:8: warning: variable 'nhsel' is used uninitialized whenever 'if' condition is true
by kbuild test robot
tree: https://github.com/dsahern/linux nexthops/del-group-03
head: b8c06bc47e0a04603de20861b8d5f7291ff0bc12
commit: 063512a047f24cd25298dbb37ae1247a407dbdde [4/7] ipv4: Refactor nhc evaluation in fib_table_lookup
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 3393cc4cebf9969db94dc424b7a2b6195589c33b)
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 063512a047f24cd25298dbb37ae1247a407dbdde
# 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: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
>> net/ipv4/fib_trie.c:1559:8: warning: variable 'nhsel' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (nhc)
^~~
net/ipv4/fib_trie.c:1575:18: note: uninitialized use occurs here
res->nh_sel = nhsel;
^~~~~
net/ipv4/fib_trie.c:1559:4: note: remove the 'if' if its condition is always false
if (nhc)
^~~~~~~~
net/ipv4/fib_trie.c:1527:12: note: initialize the variable 'nhsel' to silence this warning
int nhsel, err;
^
= 0
1 warning generated.
vim +1559 net/ipv4/fib_trie.c
1420
1421 /* Step 1: Travel to the longest prefix match in the trie */
1422 for (;;) {
1423 index = get_cindex(key, n);
1424
1425 /* This bit of code is a bit tricky but it combines multiple
1426 * checks into a single check. The prefix consists of the
1427 * prefix plus zeros for the "bits" in the prefix. The index
1428 * is the difference between the key and this value. From
1429 * this we can actually derive several pieces of data.
1430 * if (index >= (1ul << bits))
1431 * we have a mismatch in skip bits and failed
1432 * else
1433 * we know the value is cindex
1434 *
1435 * This check is safe even if bits == KEYLENGTH due to the
1436 * fact that we can only allocate a node with 32 bits if a
1437 * long is greater than 32 bits.
1438 */
1439 if (index >= (1ul << n->bits))
1440 break;
1441
1442 /* we have found a leaf. Prefixes have already been compared */
1443 if (IS_LEAF(n))
1444 goto found;
1445
1446 /* only record pn and cindex if we are going to be chopping
1447 * bits later. Otherwise we are just wasting cycles.
1448 */
1449 if (n->slen > n->pos) {
1450 pn = n;
1451 cindex = index;
1452 }
1453
1454 n = get_child_rcu(n, index);
1455 if (unlikely(!n))
1456 goto backtrace;
1457 }
1458
1459 /* Step 2: Sort out leaves and begin backtracing for longest prefix */
1460 for (;;) {
1461 /* record the pointer where our next node pointer is stored */
1462 struct key_vector __rcu **cptr = n->tnode;
1463
1464 /* This test verifies that none of the bits that differ
1465 * between the key and the prefix exist in the region of
1466 * the lsb and higher in the prefix.
1467 */
1468 if (unlikely(prefix_mismatch(key, n)) || (n->slen == n->pos))
1469 goto backtrace;
1470
1471 /* exit out and process leaf */
1472 if (unlikely(IS_LEAF(n)))
1473 break;
1474
1475 /* Don't bother recording parent info. Since we are in
1476 * prefix match mode we will have to come back to wherever
1477 * we started this traversal anyway
1478 */
1479
1480 while ((n = rcu_dereference(*cptr)) == NULL) {
1481 backtrace:
1482 #ifdef CONFIG_IP_FIB_TRIE_STATS
1483 if (!n)
1484 this_cpu_inc(stats->null_node_hit);
1485 #endif
1486 /* If we are at cindex 0 there are no more bits for
1487 * us to strip at this level so we must ascend back
1488 * up one level to see if there are any more bits to
1489 * be stripped there.
1490 */
1491 while (!cindex) {
1492 t_key pkey = pn->key;
1493
1494 /* If we don't have a parent then there is
1495 * nothing for us to do as we do not have any
1496 * further nodes to parse.
1497 */
1498 if (IS_TRIE(pn)) {
1499 trace_fib_table_lookup(tb->tb_id, flp,
1500 NULL, -EAGAIN);
1501 return -EAGAIN;
1502 }
1503 #ifdef CONFIG_IP_FIB_TRIE_STATS
1504 this_cpu_inc(stats->backtrack);
1505 #endif
1506 /* Get Child's index */
1507 pn = node_parent_rcu(pn);
1508 cindex = get_index(pkey, pn);
1509 }
1510
1511 /* strip the least significant bit from the cindex */
1512 cindex &= cindex - 1;
1513
1514 /* grab pointer for next child node */
1515 cptr = &pn->tnode[cindex];
1516 }
1517 }
1518
1519 found:
1520 /* this line carries forward the xor from earlier in the function */
1521 index = key ^ n->key;
1522
1523 /* Step 3: Process the leaf, if that fails fall back to backtracing */
1524 hlist_for_each_entry_rcu(fa, &n->leaf, fa_list) {
1525 struct fib_info *fi = fa->fa_info;
1526 struct fib_nh_common *nhc;
1527 int nhsel, err;
1528
1529 if ((BITS_PER_LONG > KEYLENGTH) || (fa->fa_slen < KEYLENGTH)) {
1530 if (index >= (1ul << fa->fa_slen))
1531 continue;
1532 }
1533 if (fa->fa_tos && fa->fa_tos != flp->flowi4_tos)
1534 continue;
1535 if (fi->fib_dead)
1536 continue;
1537 if (fa->fa_info->fib_scope < flp->flowi4_scope)
1538 continue;
1539 fib_alias_accessed(fa);
1540 err = fib_props[fa->fa_type].error;
1541 if (unlikely(err < 0)) {
1542 out_reject:
1543 #ifdef CONFIG_IP_FIB_TRIE_STATS
1544 this_cpu_inc(stats->semantic_match_passed);
1545 #endif
1546 trace_fib_table_lookup(tb->tb_id, flp, NULL, err);
1547 return err;
1548 }
1549 if (fi->fib_flags & RTNH_F_DEAD)
1550 continue;
1551
1552 if (unlikely(fi->nh)) {
1553 if (nexthop_is_blackhole(fi->nh)) {
1554 err = fib_props[RTN_BLACKHOLE].error;
1555 goto out_reject;
1556 }
1557
1558 nhc = nexthop_get_nhc_lookup(fi->nh, fib_flags, flp);
> 1559 if (nhc)
1560 goto set_result;
1561 goto miss;
1562 }
1563
1564 for (nhsel = 0; nhsel < fib_info_num_path(fi); nhsel++) {
1565 nhc = fib_info_nhc(fi, nhsel);
1566
1567 if (!fib_lookup_good_nhc(nhc, fib_flags, flp))
1568 continue;
1569 set_result:
1570 if (!(fib_flags & FIB_LOOKUP_NOREF))
1571 refcount_inc(&fi->fib_clntref);
1572
1573 res->prefix = htonl(n->key);
1574 res->prefixlen = KEYLENGTH - fa->fa_slen;
1575 res->nh_sel = nhsel;
1576 res->nhc = nhc;
1577 res->type = fa->fa_type;
1578 res->scope = fi->fib_scope;
1579 res->fi = fi;
1580 res->table = tb;
1581 res->fa_head = &n->leaf;
1582 #ifdef CONFIG_IP_FIB_TRIE_STATS
1583 this_cpu_inc(stats->semantic_match_passed);
1584 #endif
1585 trace_fib_table_lookup(tb->tb_id, flp, nhc, err);
1586
1587 return err;
1588 }
1589 }
1590 miss:
1591 #ifdef CONFIG_IP_FIB_TRIE_STATS
1592 this_cpu_inc(stats->semantic_match_miss);
1593 #endif
1594 goto backtrace;
1595 }
1596 EXPORT_SYMBOL_GPL(fib_table_lookup);
1597
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
Re: [PATCH V6 2/7] soc: qcom-geni-se: Add interconnect support to fix earlycon crash
by kbuild test robot
Hi Akash,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on tty/tty-testing]
[also build test ERROR on spi/for-next wsa/i2c/for-next usb/usb-testing driver-core/driver-core-testing linus/master v5.7-rc6]
[cannot apply to next-20200522]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Akash-Asthana/Add-interconnect-s...
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
config: x86_64-randconfig-r023-20200521 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 3393cc4cebf9969db94dc424b7a2b6195589c33b)
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
# 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: kbuild test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>, old ones prefixed by <<):
drivers/soc/qcom/qcom-geni-se.c:739:27: error: implicit declaration of function 'devm_of_icc_get' [-Werror,-Wimplicit-function-declaration]
se->icc_paths[i].path = devm_of_icc_get(se->dev, icc_names[i]);
^
drivers/soc/qcom/qcom-geni-se.c:739:27: note: did you mean 'of_icc_get'?
include/linux/interconnect.h:30:18: note: 'of_icc_get' declared here
struct icc_path *of_icc_get(struct device *dev, const char *name);
^
drivers/soc/qcom/qcom-geni-se.c:739:25: warning: incompatible integer to pointer conversion assigning to 'struct icc_path *' from 'int' [-Wint-conversion]
se->icc_paths[i].path = devm_of_icc_get(se->dev, icc_names[i]);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/soc/qcom/qcom-geni-se.c:790:9: error: implicit declaration of function 'icc_enable' [-Werror,-Wimplicit-function-declaration]
ret = icc_enable(se->icc_paths[i].path);
^
drivers/soc/qcom/qcom-geni-se.c:807:9: error: implicit declaration of function 'icc_disable' [-Werror,-Wimplicit-function-declaration]
ret = icc_disable(se->icc_paths[i].path);
^
>> drivers/soc/qcom/qcom-geni-se.c:829:11: error: implicit declaration of function 'of_get_next_parent' [-Werror,-Wimplicit-function-declaration]
parent = of_get_next_parent(wrapper->dev->of_node);
^
>> drivers/soc/qcom/qcom-geni-se.c:829:9: warning: incompatible integer to pointer conversion assigning to 'struct device_node *' from 'int' [-Wint-conversion]
parent = of_get_next_parent(wrapper->dev->of_node);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/soc/qcom/qcom-geni-se.c:883:26: error: implicit declaration of function 'devm_of_icc_get' [-Werror,-Wimplicit-function-declaration]
wrapper->to_core.path = devm_of_icc_get(dev, "qup-core");
^
drivers/soc/qcom/qcom-geni-se.c:883:24: warning: incompatible integer to pointer conversion assigning to 'struct icc_path *' from 'int' [-Wint-conversion]
wrapper->to_core.path = devm_of_icc_get(dev, "qup-core");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 warnings and 5 errors generated.
vim +/of_get_next_parent +829 drivers/soc/qcom/qcom-geni-se.c
818
819 void geni_remove_earlycon_icc_vote(void)
820 {
821 struct geni_wrapper *wrapper;
822 struct device_node *parent;
823 struct device_node *child;
824
825 if (!earlycon_wrapper)
826 return;
827
828 wrapper = earlycon_wrapper;
> 829 parent = of_get_next_parent(wrapper->dev->of_node);
830 for_each_child_of_node(parent, child) {
831 if (!of_device_is_compatible(child, "qcom,geni-se-qup"))
832 continue;
833 wrapper = platform_get_drvdata(of_find_device_by_node(child));
834 icc_put(wrapper->to_core.path);
835 wrapper->to_core.path = NULL;
836
837 }
838 of_node_put(parent);
839
840 earlycon_wrapper = NULL;
841 }
842 EXPORT_SYMBOL(geni_remove_earlycon_icc_vote);
843
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
sound/soc/codecs/jz4770.c:930:34: warning: unused variable 'jz4770_codec_of_matches'
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 4286d192c803571e8ca43b0f1f8ea04d663a278a
commit: 2159a6810e96c38a469c39df8e109edb7232d3c9 ASoC: codecs: Add jz4770-codec driver
date: 4 months ago
config: mips-randconfig-r014-20200522 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 3393cc4cebf9969db94dc424b7a2b6195589c33b)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
git checkout 2159a6810e96c38a469c39df8e109edb7232d3c9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
sound/soc/codecs/jz4770.c:306:35: warning: unused variable 'mic_boost_tlv' [-Wunused-const-variable]
static const DECLARE_TLV_DB_SCALE(mic_boost_tlv, 0, 400, 0);
^
include/sound/tlv.h:22:31: note: expanded from macro 'DECLARE_TLV_DB_SCALE'
#define DECLARE_TLV_DB_SCALE SNDRV_CTL_TLVD_DECLARE_DB_SCALE
^
>> sound/soc/codecs/jz4770.c:930:34: warning: unused variable 'jz4770_codec_of_matches' [-Wunused-const-variable]
static const struct of_device_id jz4770_codec_of_matches[] = {
^
2 warnings generated.
vim +/jz4770_codec_of_matches +930 sound/soc/codecs/jz4770.c
929
> 930 static const struct of_device_id jz4770_codec_of_matches[] = {
931 { .compatible = "ingenic,jz4770-codec", },
932 { /* sentinel */ }
933 };
934 MODULE_DEVICE_TABLE(of, jz4770_codec_of_matches);
935
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[dgc-xfs:xfs-async-inode-reclaim 2/30] fs/xfs/xfs_trans.c:620:30: warning: comparison is always true due to limited range of data type
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs.git xfs-async-inode-reclaim
head: a6b06a056446a604d909fd24f24c78f08f5be671
commit: 624f30f880223745ed1ce2de69f15b53e9ac1ea5 [2/30] xfs: gut error handling in xfs_trans_unreserve_and_mod_sb()
config: x86_64-randconfig-a012-20200522 (attached as .config)
compiler: gcc-5 (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010
reproduce (this is a W=1 build):
git checkout 624f30f880223745ed1ce2de69f15b53e9ac1ea5
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
In file included from include/linux/string.h:6:0,
from include/linux/uuid.h:12,
from fs/xfs/xfs_linux.h:10,
from fs/xfs/xfs.h:22,
from fs/xfs/xfs_trans.c:7:
fs/xfs/xfs_trans.c: In function 'xfs_trans_unreserve_and_mod_sb':
fs/xfs/xfs_trans.c:617:31: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
ASSERT(mp->m_sb.sb_frextents >= 0);
^
include/linux/compiler.h:77:40: note: in definition of macro 'likely'
# define likely(x) __builtin_expect(!!(x), 1)
^
fs/xfs/xfs_trans.c:617:2: note: in expansion of macro 'ASSERT'
ASSERT(mp->m_sb.sb_frextents >= 0);
^
fs/xfs/xfs_trans.c:618:29: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
ASSERT(mp->m_sb.sb_dblocks >= 0);
^
include/linux/compiler.h:77:40: note: in definition of macro 'likely'
# define likely(x) __builtin_expect(!!(x), 1)
^
fs/xfs/xfs_trans.c:618:2: note: in expansion of macro 'ASSERT'
ASSERT(mp->m_sb.sb_dblocks >= 0);
^
fs/xfs/xfs_trans.c:619:29: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
ASSERT(mp->m_sb.sb_agcount >= 0);
^
include/linux/compiler.h:77:40: note: in definition of macro 'likely'
# define likely(x) __builtin_expect(!!(x), 1)
^
fs/xfs/xfs_trans.c:619:2: note: in expansion of macro 'ASSERT'
ASSERT(mp->m_sb.sb_agcount >= 0);
^
>> fs/xfs/xfs_trans.c:620:30: warning: comparison is always true due to limited range of data type [-Wtype-limits]
ASSERT(mp->m_sb.sb_imax_pct >= 0);
^
include/linux/compiler.h:77:40: note: in definition of macro 'likely'
# define likely(x) __builtin_expect(!!(x), 1)
^
fs/xfs/xfs_trans.c:620:2: note: in expansion of macro 'ASSERT'
ASSERT(mp->m_sb.sb_imax_pct >= 0);
^
fs/xfs/xfs_trans.c:621:30: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
ASSERT(mp->m_sb.sb_rextsize >= 0);
^
include/linux/compiler.h:77:40: note: in definition of macro 'likely'
# define likely(x) __builtin_expect(!!(x), 1)
^
fs/xfs/xfs_trans.c:621:2: note: in expansion of macro 'ASSERT'
ASSERT(mp->m_sb.sb_rextsize >= 0);
^
fs/xfs/xfs_trans.c:622:31: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
ASSERT(mp->m_sb.sb_rbmblocks >= 0);
^
include/linux/compiler.h:77:40: note: in definition of macro 'likely'
# define likely(x) __builtin_expect(!!(x), 1)
^
fs/xfs/xfs_trans.c:622:2: note: in expansion of macro 'ASSERT'
ASSERT(mp->m_sb.sb_rbmblocks >= 0);
^
fs/xfs/xfs_trans.c:623:29: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
ASSERT(mp->m_sb.sb_rblocks >= 0);
^
include/linux/compiler.h:77:40: note: in definition of macro 'likely'
# define likely(x) __builtin_expect(!!(x), 1)
^
fs/xfs/xfs_trans.c:623:2: note: in expansion of macro 'ASSERT'
ASSERT(mp->m_sb.sb_rblocks >= 0);
^
fs/xfs/xfs_trans.c:624:30: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
ASSERT(mp->m_sb.sb_rextents >= 0);
^
include/linux/compiler.h:77:40: note: in definition of macro 'likely'
# define likely(x) __builtin_expect(!!(x), 1)
^
fs/xfs/xfs_trans.c:624:2: note: in expansion of macro 'ASSERT'
ASSERT(mp->m_sb.sb_rextents >= 0);
^
fs/xfs/xfs_trans.c:625:30: warning: comparison is always true due to limited range of data type [-Wtype-limits]
ASSERT(mp->m_sb.sb_rextslog >= 0);
^
include/linux/compiler.h:77:40: note: in definition of macro 'likely'
# define likely(x) __builtin_expect(!!(x), 1)
^
fs/xfs/xfs_trans.c:625:2: note: in expansion of macro 'ASSERT'
ASSERT(mp->m_sb.sb_rextslog >= 0);
^
vim +620 fs/xfs/xfs_trans.c
536
537 /*
538 * xfs_trans_unreserve_and_mod_sb() is called to release unused reservations and
539 * apply superblock counter changes to the in-core superblock. The
540 * t_res_fdblocks_delta and t_res_frextents_delta fields are explicitly NOT
541 * applied to the in-core superblock. The idea is that that has already been
542 * done.
543 *
544 * If we are not logging superblock counters, then the inode allocated/free and
545 * used block counts are not updated in the on disk superblock. In this case,
546 * XFS_TRANS_SB_DIRTY will not be set when the transaction is updated but we
547 * still need to update the incore superblock with the changes.
548 */
549 void
550 xfs_trans_unreserve_and_mod_sb(
551 struct xfs_trans *tp)
552 {
553 struct xfs_mount *mp = tp->t_mountp;
554 bool rsvd = (tp->t_flags & XFS_TRANS_RESERVE) != 0;
555 int64_t blkdelta = 0;
556 int64_t rtxdelta = 0;
557 int64_t idelta = 0;
558 int64_t ifreedelta = 0;
559 int error;
560
561 /* calculate deltas */
562 if (tp->t_blk_res > 0)
563 blkdelta = tp->t_blk_res;
564 if ((tp->t_fdblocks_delta != 0) &&
565 (xfs_sb_version_haslazysbcount(&mp->m_sb) ||
566 (tp->t_flags & XFS_TRANS_SB_DIRTY)))
567 blkdelta += tp->t_fdblocks_delta;
568
569 if (tp->t_rtx_res > 0)
570 rtxdelta = tp->t_rtx_res;
571 if ((tp->t_frextents_delta != 0) &&
572 (tp->t_flags & XFS_TRANS_SB_DIRTY))
573 rtxdelta += tp->t_frextents_delta;
574
575 if (xfs_sb_version_haslazysbcount(&mp->m_sb) ||
576 (tp->t_flags & XFS_TRANS_SB_DIRTY)) {
577 idelta = tp->t_icount_delta;
578 ifreedelta = tp->t_ifree_delta;
579 }
580
581 /* apply the per-cpu counters */
582 if (blkdelta) {
583 error = xfs_mod_fdblocks(mp, blkdelta, rsvd);
584 ASSERT(!error);
585 }
586
587 if (idelta) {
588 error = xfs_mod_icount(mp, idelta);
589 ASSERT(!error);
590 }
591
592 if (ifreedelta) {
593 error = xfs_mod_ifree(mp, ifreedelta);
594 ASSERT(!error);
595 }
596
597 if (rtxdelta == 0 && !(tp->t_flags & XFS_TRANS_SB_DIRTY))
598 return;
599
600 /* apply remaining deltas */
601 spin_lock(&mp->m_sb_lock);
602 mp->m_sb.sb_frextents += rtxdelta;
603 mp->m_sb.sb_dblocks += tp->t_dblocks_delta;
604 mp->m_sb.sb_agcount += tp->t_agcount_delta;
605 mp->m_sb.sb_imax_pct += tp->t_imaxpct_delta;
606 mp->m_sb.sb_rextsize += tp->t_rextsize_delta;
607 mp->m_sb.sb_rbmblocks += tp->t_rbmblocks_delta;
608 mp->m_sb.sb_rblocks += tp->t_rblocks_delta;
609 mp->m_sb.sb_rextents += tp->t_rextents_delta;
610 mp->m_sb.sb_rextslog += tp->t_rextslog_delta;
611 spin_unlock(&mp->m_sb_lock);
612
613 /*
614 * Debug checks outside of the spinlock so they don't lock up the
615 * machine if they fail.
616 */
617 ASSERT(mp->m_sb.sb_frextents >= 0);
618 ASSERT(mp->m_sb.sb_dblocks >= 0);
619 ASSERT(mp->m_sb.sb_agcount >= 0);
> 620 ASSERT(mp->m_sb.sb_imax_pct >= 0);
621 ASSERT(mp->m_sb.sb_rextsize >= 0);
622 ASSERT(mp->m_sb.sb_rbmblocks >= 0);
623 ASSERT(mp->m_sb.sb_rblocks >= 0);
624 ASSERT(mp->m_sb.sb_rextents >= 0);
625 ASSERT(mp->m_sb.sb_rextslog >= 0);
626 return;
627 }
628
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
drivers/ide/ide-ioctls.c:15:24: sparse: sparse: incorrect type in initializer (different address spaces)
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 051143e1602d90ea71887d92363edd539d411de5
commit: 1df23c6fe5b0654ece219985a0c32e40b100bd9a compat_ioctl: move HDIO ioctl handling into drivers/ide
date: 5 months ago
config: xtensa-randconfig-s002-20200522 (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-193-gb8fad4bc-dirty
git checkout 1df23c6fe5b0654ece219985a0c32e40b100bd9a
# save the attached .config to linux build tree
make W=1 C=1 ARCH=xtensa CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
./arch/xtensa/include/generated/uapi/asm/unistd_32.h:391:41: sparse: sparse: no newline at end of file
>> drivers/ide/ide-ioctls.c:15:24: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected signed int *__pu_addr @@ got signed int [noderef] [usertypsigned int *__pu_addr @@
>> drivers/ide/ide-ioctls.c:15:24: sparse: expected signed int *__pu_addr
>> drivers/ide/ide-ioctls.c:15:24: sparse: got signed int [noderef] [usertype] <asn:1> *
>> drivers/ide/ide-ioctls.c:15:24: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] <asn:1> *to @@ got f] <asn:1> *to @@
drivers/ide/ide-ioctls.c:15:24: sparse: expected void [noderef] <asn:1> *to
>> drivers/ide/ide-ioctls.c:15:24: sparse: got signed int *__pu_addr
drivers/ide/ide-ioctls.c:17:16: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected long *__pu_addr @@ got long [noderef] <aslong *__pu_addr @@
drivers/ide/ide-ioctls.c:17:16: sparse: expected long *__pu_addr
drivers/ide/ide-ioctls.c:17:16: sparse: got long [noderef] <asn:1> *
drivers/ide/ide-ioctls.c:17:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] <asn:1> *to @@ got n:1> *to @@
drivers/ide/ide-ioctls.c:17:16: sparse: expected void [noderef] <asn:1> *to
drivers/ide/ide-ioctls.c:17:16: sparse: got long *__pu_addr
include/linux/ata.h:1101:34: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] @@ got resunsigned short [usertype] @@
include/linux/ata.h:1101:34: sparse: expected unsigned short [usertype]
include/linux/ata.h:1101:34: sparse: got restricted __le16 [usertype]
include/linux/ata.h:1102:34: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] @@ got resunsigned short [usertype] @@
include/linux/ata.h:1102:34: sparse: expected unsigned short [usertype]
include/linux/ata.h:1102:34: sparse: got restricted __le16 [usertype]
include/linux/ata.h:1103:34: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] @@ got resunsigned short [usertype] @@
include/linux/ata.h:1103:34: sparse: expected unsigned short [usertype]
include/linux/ata.h:1103:34: sparse: got restricted __le16 [usertype]
include/linux/ata.h:1104:34: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] @@ got resunsigned short [usertype] @@
include/linux/ata.h:1104:34: sparse: expected unsigned short [usertype]
include/linux/ata.h:1104:34: sparse: got restricted __le16 [usertype]
include/linux/ata.h:1105:34: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] @@ got resunsigned short [usertype] @@
include/linux/ata.h:1105:34: sparse: expected unsigned short [usertype]
include/linux/ata.h:1105:34: sparse: got restricted __le16 [usertype]
vim +15 drivers/ide/ide-ioctls.c
11
12 static int put_user_long(long val, unsigned long arg)
13 {
14 if (in_compat_syscall())
> 15 return put_user(val, (compat_long_t __user *)compat_ptr(arg));
16
17 return put_user(val, (long __user *)arg);
18 }
19
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[vfs:uaccess.net 16/19] net/atm/ioctl.c:180:29: sparse: sparse: Using plain integer as NULL pointer
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git uaccess.net
head: 0edecc020b33f8e31d8baa80735b45e8e8434700
commit: a3929484af75ee524419edbbc4e9ce012c3d67c9 [16/19] atm: move copyin from atm_getnames() into the caller
config: arm64-randconfig-s002-20200521 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-193-gb8fad4bc-dirty
git checkout a3929484af75ee524419edbbc4e9ce012c3d67c9
# save the attached .config to linux build tree
make W=1 C=1 ARCH=arm64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> net/atm/ioctl.c:180:29: sparse: sparse: Using plain integer as NULL pointer
vim +180 net/atm/ioctl.c
50
51 static int do_vcc_ioctl(struct socket *sock, unsigned int cmd,
52 unsigned long arg, int compat)
53 {
54 struct sock *sk = sock->sk;
55 struct atm_vcc *vcc;
56 int error;
57 struct list_head *pos;
58 void __user *argp = (void __user *)arg;
59 void __user *buf;
60 int __user *len;
61
62 vcc = ATM_SD(sock);
63 switch (cmd) {
64 case SIOCOUTQ:
65 if (sock->state != SS_CONNECTED ||
66 !test_bit(ATM_VF_READY, &vcc->flags)) {
67 error = -EINVAL;
68 goto done;
69 }
70 error = put_user(sk->sk_sndbuf - sk_wmem_alloc_get(sk),
71 (int __user *)argp) ? -EFAULT : 0;
72 goto done;
73 case SIOCINQ:
74 {
75 struct sk_buff *skb;
76
77 if (sock->state != SS_CONNECTED) {
78 error = -EINVAL;
79 goto done;
80 }
81 skb = skb_peek(&sk->sk_receive_queue);
82 error = put_user(skb ? skb->len : 0,
83 (int __user *)argp) ? -EFAULT : 0;
84 goto done;
85 }
86 case ATM_SETSC:
87 net_warn_ratelimited("ATM_SETSC is obsolete; used by %s:%d\n",
88 current->comm, task_pid_nr(current));
89 error = 0;
90 goto done;
91 case ATMSIGD_CTRL:
92 if (!capable(CAP_NET_ADMIN)) {
93 error = -EPERM;
94 goto done;
95 }
96 /*
97 * The user/kernel protocol for exchanging signalling
98 * info uses kernel pointers as opaque references,
99 * so the holder of the file descriptor can scribble
100 * on the kernel... so we should make sure that we
101 * have the same privileges that /proc/kcore needs
102 */
103 if (!capable(CAP_SYS_RAWIO)) {
104 error = -EPERM;
105 goto done;
106 }
107 #ifdef CONFIG_COMPAT
108 /* WTF? I don't even want to _think_ about making this
109 work for 32-bit userspace. TBH I don't really want
110 to think about it at all. dwmw2. */
111 if (compat) {
112 net_warn_ratelimited("32-bit task cannot be atmsigd\n");
113 error = -EINVAL;
114 goto done;
115 }
116 #endif
117 error = sigd_attach(vcc);
118 if (!error)
119 sock->state = SS_CONNECTED;
120 goto done;
121 case ATM_SETBACKEND:
122 case ATM_NEWBACKENDIF:
123 {
124 atm_backend_t backend;
125 error = get_user(backend, (atm_backend_t __user *)argp);
126 if (error)
127 goto done;
128 switch (backend) {
129 case ATM_BACKEND_PPP:
130 request_module("pppoatm");
131 break;
132 case ATM_BACKEND_BR2684:
133 request_module("br2684");
134 break;
135 }
136 break;
137 }
138 case ATMMPC_CTRL:
139 case ATMMPC_DATA:
140 request_module("mpoa");
141 break;
142 case ATMARPD_CTRL:
143 request_module("clip");
144 break;
145 case ATMLEC_CTRL:
146 request_module("lec");
147 break;
148 }
149
150 error = -ENOIOCTLCMD;
151
152 mutex_lock(&ioctl_mutex);
153 list_for_each(pos, &ioctl_list) {
154 struct atm_ioctl *ic = list_entry(pos, struct atm_ioctl, list);
155 if (try_module_get(ic->owner)) {
156 error = ic->ioctl(sock, cmd, arg);
157 module_put(ic->owner);
158 if (error != -ENOIOCTLCMD)
159 break;
160 }
161 }
162 mutex_unlock(&ioctl_mutex);
163
164 if (error != -ENOIOCTLCMD)
165 goto done;
166
167 if (cmd == ATM_GETNAMES) {
168 if (IS_ENABLED(CONFIG_COMPAT) && compat) {
169 #ifdef CONFIG_COMPAT
170 struct compat_atm_iobuf __user *ciobuf = argp;
171 compat_uptr_t cbuf;
172 len = &ciobuf->length;
173 if (get_user(cbuf, &ciobuf->buffer))
174 return -EFAULT;
175 buf = compat_ptr(cbuf);
176 #endif
177 } else {
178 struct atm_iobuf __user *iobuf = argp;
179 len = &iobuf->length;
> 180 if (get_user(buf, &iobuf->buffer))
181 return -EFAULT;
182 }
183 error = atm_getnames(buf, len);
184 } else {
185 error = atm_dev_ioctl(cmd, argp, compat);
186 }
187
188 done:
189 return error;
190 }
191
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[linux-next:master 9112/11634] arch/arm64/kvm/pvtime.c:33:9: sparse: sparse: incorrect type in initializer (different base types)
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: e8f3274774b45b5f4e9e3d5cad7ff9f43ae3add5
commit: 9ed24f4b712b855dcf7be3025b75b051cb73a2b7 [9112/11634] KVM: arm64: Move virt/kvm/arm to arch/arm64
config: arm64-randconfig-s002-20200521 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-193-gb8fad4bc-dirty
git checkout 9ed24f4b712b855dcf7be3025b75b051cb73a2b7
# save the attached .config to linux build tree
make W=1 C=1 ARCH=arm64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> arch/arm64/kvm/pvtime.c:33:9: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned long long __pu_val @@ got restricted __le64 [asunsigned long long __pu_val @@
>> arch/arm64/kvm/pvtime.c:33:9: sparse: expected unsigned long long __pu_val
>> arch/arm64/kvm/pvtime.c:33:9: sparse: got restricted __le64 [assigned] [usertype] steal_le
--
>> arch/arm64/kvm/arch_timer.c:936:66: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void *vcpu_info @@ got struct kvm_vcpu *[noderef] <asvoid *vcpu_info @@
>> arch/arm64/kvm/arch_timer.c:936:66: sparse: expected void *vcpu_info
>> arch/arm64/kvm/arch_timer.c:936:66: sparse: got struct kvm_vcpu *[noderef] <asn:3> *
arch/arm64/kvm/arch_timer.c:969:74: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void *vcpu_info @@ got struct kvm_vcpu *[noderef] <asvoid *vcpu_info @@
arch/arm64/kvm/arch_timer.c:969:74: sparse: expected void *vcpu_info
arch/arm64/kvm/arch_timer.c:969:74: sparse: got struct kvm_vcpu *[noderef] <asn:3> *
--
>> arch/arm64/kvm/vgic/vgic.c:353:17: sparse: sparse: context imbalance in 'vgic_queue_irq_unlock' - unexpected unlock
>> arch/arm64/kvm/vgic/vgic.c:437:5: sparse: sparse: context imbalance in 'kvm_vgic_inject_irq' - different lock contexts for basic block
--
>> arch/arm64/kvm/vgic/vgic-v3.c:314:5: sparse: sparse: context imbalance in 'vgic_v3_lpi_sync_pending_status' - different lock contexts for basic block
--
>> arch/arm64/kvm/vgic/vgic-mmio.c:854:24: sparse: sparse: cast to restricted __le16
>> arch/arm64/kvm/vgic/vgic-mmio.c:856:24: sparse: sparse: cast to restricted __le32
>> arch/arm64/kvm/vgic/vgic-mmio.c:858:24: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-mmio.c:878:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long data @@ got restricted __leunsigned long data @@
>> arch/arm64/kvm/vgic/vgic-mmio.c:878:22: sparse: expected unsigned long data
>> arch/arm64/kvm/vgic/vgic-mmio.c:878:22: sparse: got restricted __le16 [usertype]
arch/arm64/kvm/vgic/vgic-mmio.c:881:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long data @@ got restricted __leunsigned long data @@
arch/arm64/kvm/vgic/vgic-mmio.c:881:22: sparse: expected unsigned long data
>> arch/arm64/kvm/vgic/vgic-mmio.c:881:22: sparse: got restricted __le32 [usertype]
arch/arm64/kvm/vgic/vgic-mmio.c:884:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long data @@ got restricted __leunsigned long data @@
arch/arm64/kvm/vgic/vgic-mmio.c:884:22: sparse: expected unsigned long data
>> arch/arm64/kvm/vgic/vgic-mmio.c:884:22: sparse: got restricted __le64 [usertype]
>> arch/arm64/kvm/vgic/vgic-mmio.c:88:17: sparse: sparse: context imbalance in 'vgic_mmio_write_group' - different lock contexts for basic block
>> arch/arm64/kvm/vgic/vgic-mmio.c:124:9: sparse: sparse: context imbalance in 'vgic_mmio_write_senable' - different lock contexts for basic block
>> arch/arm64/kvm/vgic/vgic-mmio.c:195:9: sparse: sparse: context imbalance in 'vgic_uaccess_write_senable' - different lock contexts for basic block
>> arch/arm64/kvm/vgic/vgic-mmio.c:278:9: sparse: sparse: context imbalance in 'vgic_mmio_write_spending' - different lock contexts for basic block
>> arch/arm64/kvm/vgic/vgic-mmio.c:320:9: sparse: sparse: context imbalance in 'vgic_uaccess_write_spending' - different lock contexts for basic block
>> arch/arm64/kvm/vgic/vgic-mmio.c:565:9: sparse: sparse: context imbalance in 'vgic_mmio_change_active' - wrong count at exit
>> arch/arm64/kvm/vgic/vgic-mmio.c:773:30: sparse: sparse: context imbalance in 'vgic_write_irq_line_level_info' - different lock contexts for basic block
--
>> arch/arm64/kvm/vgic/vgic-mmio-v2.c:134:9: sparse: sparse: context imbalance in 'vgic_mmio_write_sgir' - different lock contexts for basic block
>> arch/arm64/kvm/vgic/vgic-mmio-v2.c:244:9: sparse: sparse: context imbalance in 'vgic_mmio_write_sgipends' - different lock contexts for basic block
--
>> arch/arm64/kvm/vgic/vgic-mmio-v3.c:338:9: sparse: sparse: context imbalance in 'vgic_v3_uaccess_write_pending' - different lock contexts for basic block
>> arch/arm64/kvm/vgic/vgic-mmio-v3.c:1025:17: sparse: sparse: context imbalance in 'vgic_v3_dispatch_sgi' - different lock contexts for basic block
--
>> arch/arm64/kvm/vgic/vgic-its.c:825:17: sparse: sparse: cast to restricted __le64
arch/arm64/kvm/vgic/vgic-its.c:956:24: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-its.c:2134:13: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [assigned] [usertype] val @@ got g long [assigned] [usertype] val @@
>> arch/arm64/kvm/vgic/vgic-its.c:2134:13: sparse: expected unsigned long long [assigned] [usertype] val
>> arch/arm64/kvm/vgic/vgic-its.c:2134:13: sparse: got restricted __le64 [usertype]
arch/arm64/kvm/vgic/vgic-its.c:2160:15: sparse: sparse: cast to restricted __le64
arch/arm64/kvm/vgic/vgic-its.c:2281:13: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [assigned] [usertype] val @@ got g long [assigned] [usertype] val @@
arch/arm64/kvm/vgic/vgic-its.c:2281:13: sparse: expected unsigned long long [assigned] [usertype] val
arch/arm64/kvm/vgic/vgic-its.c:2281:13: sparse: got restricted __le64 [usertype]
arch/arm64/kvm/vgic/vgic-its.c:2307:17: sparse: sparse: cast to restricted __le64
arch/arm64/kvm/vgic/vgic-its.c:2405:17: sparse: sparse: cast to restricted __le64
arch/arm64/kvm/vgic/vgic-its.c:2461:13: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [assigned] [usertype] val @@ got g long [assigned] [usertype] val @@
arch/arm64/kvm/vgic/vgic-its.c:2461:13: sparse: expected unsigned long long [assigned] [usertype] val
arch/arm64/kvm/vgic/vgic-its.c:2461:13: sparse: got restricted __le64 [usertype]
arch/arm64/kvm/vgic/vgic-its.c:2477:15: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-its.c:280:12: sparse: sparse: context imbalance in 'update_lpi_config' - different lock contexts for basic block
>> arch/arm64/kvm/vgic/vgic-its.c:443:9: sparse: sparse: context imbalance in 'its_sync_lpi_pending_table' - different lock contexts for basic block
>> arch/arm64/kvm/vgic/vgic-its.c:730:12: sparse: sparse: context imbalance in 'vgic_its_trigger_msi' - different lock contexts for basic block
>> arch/arm64/kvm/vgic/vgic-its.c:752:5: sparse: sparse: context imbalance in 'vgic_its_inject_cached_translation' - wrong count at exit
vim +33 arch/arm64/kvm/pvtime.c
b48c1a45a19089 virt/kvm/arm/pvtime.c Steven Price 2019-10-21 11
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21 12 void kvm_update_stolen_time(struct kvm_vcpu *vcpu)
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21 13 {
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21 14 struct kvm *kvm = vcpu->kvm;
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21 15 u64 steal;
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21 16 __le64 steal_le;
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21 17 u64 offset;
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21 18 int idx;
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21 19 u64 base = vcpu->arch.steal.base;
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21 20
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21 21 if (base == GPA_INVALID)
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21 22 return;
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21 23
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21 24 /* Let's do the local bookkeeping */
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21 25 steal = vcpu->arch.steal.steal;
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21 26 steal += current->sched_info.run_delay - vcpu->arch.steal.last_steal;
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21 27 vcpu->arch.steal.last_steal = current->sched_info.run_delay;
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21 28 vcpu->arch.steal.steal = steal;
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21 29
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21 30 steal_le = cpu_to_le64(steal);
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21 31 idx = srcu_read_lock(&kvm->srcu);
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21 32 offset = offsetof(struct pvclock_vcpu_stolen_time, stolen_time);
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21 @33 kvm_put_guest(kvm, base + offset, steal_le, u64);
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21 34 srcu_read_unlock(&kvm->srcu, idx);
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21 35 }
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21 36
:::::: The code at line 33 was first introduced by commit
:::::: 8564d6372a7d8a6d440441b8ed8020f97f744450 KVM: arm64: Support stolen time reporting via shared structure
:::::: TO: Steven Price <steven.price(a)arm.com>
:::::: CC: Marc Zyngier <maz(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
Re: [PATCH] PM / devfreq: fix odd_ptr_err.cocci warnings
by Julia Lawall
Hello,
This provides a patch, but it doesn't look like the right one. It looks
like the if test should be testing opp_table,
julia
On Fri, 22 May 2020, kbuild test robot wrote:
> From: kbuild test robot <lkp(a)intel.com>
>
> drivers/devfreq/governor_passive.c:336:7-13: inconsistent IS_ERR and PTR_ERR on line 337.
>
> PTR_ERR should access the value just tested by IS_ERR
>
> Semantic patch information:
> There can be false positives in the patch case, where it is the call to
> IS_ERR that is wrong.
>
> Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci
>
> CC: Saravana Kannan <skannan(a)codeaurora.org>
> Signed-off-by: kbuild test robot <lkp(a)intel.com>
> ---
>
> url: https://github.com/0day-ci/linux/commits/Andrew-sh-Cheng/Add-cpufreq-and-...
> base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
> :::::: branch date: 26 hours ago
> :::::: commit date: 26 hours ago
>
> Please take the patch only if it's a positive warning. Thanks!
>
> governor_passive.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/drivers/devfreq/governor_passive.c
> +++ b/drivers/devfreq/governor_passive.c
> @@ -334,7 +334,7 @@ static int cpufreq_passive_register(stru
>
> opp_table = dev_pm_opp_get_opp_table(cpu_dev);
> if (IS_ERR(devfreq->opp_table)) {
> - ret = PTR_ERR(opp_table);
> + ret = PTR_ERR(devfreq->opp_table);
> goto out;
> }
>
>
2 years, 4 months
[android-common:android-trusty-4.19 6/11] include/linux/module.h:133:6: warning: 'init_module' specifies less restrictive attribute than its target 'trusty_test_driver_init': 'cold'
by kbuild test robot
Hi Arve,
FYI, the error/warning still remains.
tree: https://android.googlesource.com/kernel/common android-trusty-4.19
head: 2735339966ed1b8c4fa175baefce6024283763a3
commit: 3b73c0e90d449bbb4c49297238c24badc3ed7aa5 [6/11] trusty: Add stdcalltest
config: arm64-allmodconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 3b73c0e90d449bbb4c49297238c24badc3ed7aa5
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
In file included from drivers/trusty/trusty-test.c:15:
>> include/linux/module.h:133:6: warning: 'init_module' specifies less restrictive attribute than its target 'trusty_test_driver_init': 'cold' [-Wmissing-attributes]
133 | int init_module(void) __attribute__((alias(#initfn)));
| ^~~~~~~~~~~
include/linux/device.h:1604:1: note: in expansion of macro 'module_init'
1604 | module_init(__driver##_init); | ^~~~~~~~~~~
include/linux/platform_device.h:228:2: note: in expansion of macro 'module_driver'
228 | module_driver(__platform_driver, platform_driver_register, | ^~~~~~~~~~~~~
>> drivers/trusty/trusty-test.c:449:1: note: in expansion of macro 'module_platform_driver'
449 | module_platform_driver(trusty_test_driver);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/platform_device.h:14,
from drivers/trusty/trusty-test.c:8:
drivers/trusty/trusty-test.c:449:24: note: 'init_module' target declared here
449 | module_platform_driver(trusty_test_driver);
| ^~~~~~~~~~~~~~~~~~
include/linux/device.h:1600:19: note: in definition of macro 'module_driver'
1600 | static int __init __driver##_init(void) | ^~~~~~~~
>> drivers/trusty/trusty-test.c:449:1: note: in expansion of macro 'module_platform_driver'
449 | module_platform_driver(trusty_test_driver);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/trusty/trusty-test.c:15:
>> include/linux/module.h:139:7: warning: 'cleanup_module' specifies less restrictive attribute than its target 'trusty_test_driver_exit': 'cold' [-Wmissing-attributes]
139 | void cleanup_module(void) __attribute__((alias(#exitfn)));
| ^~~~~~~~~~~~~~
include/linux/device.h:1609:1: note: in expansion of macro 'module_exit'
1609 | module_exit(__driver##_exit);
| ^~~~~~~~~~~
include/linux/platform_device.h:228:2: note: in expansion of macro 'module_driver'
228 | module_driver(__platform_driver, platform_driver_register, | ^~~~~~~~~~~~~
>> drivers/trusty/trusty-test.c:449:1: note: in expansion of macro 'module_platform_driver'
449 | module_platform_driver(trusty_test_driver);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/platform_device.h:14,
from drivers/trusty/trusty-test.c:8:
drivers/trusty/trusty-test.c:449:24: note: 'cleanup_module' target declared here
449 | module_platform_driver(trusty_test_driver);
| ^~~~~~~~~~~~~~~~~~
include/linux/device.h:1605:20: note: in definition of macro 'module_driver'
1605 | static void __exit __driver##_exit(void) | ^~~~~~~~
>> drivers/trusty/trusty-test.c:449:1: note: in expansion of macro 'module_platform_driver'
449 | module_platform_driver(trusty_test_driver);
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/trusty/trusty-test.c: In function 'trusty_test_run':
include/linux/device.h:1442:2: warning: 'obj' may be used uninitialized in this function [-Wmaybe-uninitialized]
1442 | _dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~
drivers/trusty/trusty-test.c:287:32: note: 'obj' was declared here
287 | struct trusty_test_shmem_obj *obj;
| ^~~
vim +133 include/linux/module.h
0fd972a7d91d6e Paul Gortmaker 2015-05-01 128
0fd972a7d91d6e Paul Gortmaker 2015-05-01 129 /* Each module must use one module_init(). */
0fd972a7d91d6e Paul Gortmaker 2015-05-01 130 #define module_init(initfn) \
1f318a8bafcfba Arnd Bergmann 2017-02-01 131 static inline initcall_t __maybe_unused __inittest(void) \
0fd972a7d91d6e Paul Gortmaker 2015-05-01 132 { return initfn; } \
0fd972a7d91d6e Paul Gortmaker 2015-05-01 @133 int init_module(void) __attribute__((alias(#initfn)));
0fd972a7d91d6e Paul Gortmaker 2015-05-01 134
0fd972a7d91d6e Paul Gortmaker 2015-05-01 135 /* This is only required if you want to be unloadable. */
0fd972a7d91d6e Paul Gortmaker 2015-05-01 136 #define module_exit(exitfn) \
1f318a8bafcfba Arnd Bergmann 2017-02-01 137 static inline exitcall_t __maybe_unused __exittest(void) \
0fd972a7d91d6e Paul Gortmaker 2015-05-01 138 { return exitfn; } \
0fd972a7d91d6e Paul Gortmaker 2015-05-01 @139 void cleanup_module(void) __attribute__((alias(#exitfn)));
0fd972a7d91d6e Paul Gortmaker 2015-05-01 140
:::::: The code at line 133 was first introduced by commit
:::::: 0fd972a7d91d6e15393c449492a04d94c0b89351 module: relocate module_init from init.h to module.h
:::::: TO: Paul Gortmaker <paul.gortmaker(a)windriver.com>
:::::: CC: Paul Gortmaker <paul.gortmaker(a)windriver.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
Re: [PATCH] bitops: Move test_bit() into bitops/atomic.h
by kbuild test robot
Hi Will,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on asm-generic/master linux/master v5.7-rc6 next-20200521]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Will-Deacon/bitops-Move-test_bit...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git b85051e755b0e9d6dd8f17ef1da083851b83287d
config: arm-randconfig-r021-20200522 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 3393cc4cebf9969db94dc424b7a2b6195589c33b)
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
In file included from kernel/bounds.c:10:
In file included from include/linux/page-flags.h:10:
In file included from include/linux/bug.h:5:
In file included from arch/arm/include/asm/bug.h:60:
In file included from include/asm-generic/bug.h:19:
In file included from include/linux/kernel.h:12:
In file included from include/linux/bitops.h:29:
In file included from arch/arm/include/asm/bitops.h:268:
>> include/asm-generic/bitops/le.h:55:9: error: implicit declaration of function 'test_bit' [-Werror,-Wimplicit-function-declaration]
return test_bit(nr ^ BITOP_LE_SWIZZLE, addr);
^
1 error generated.
make[2]: *** [scripts/Makefile.build:100: kernel/bounds.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1148: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:180: sub-make] Error 2
vim +/test_bit +55 include/asm-generic/bitops/le.h
63ab595fb6b342 Akinobu Mita 2011-03-23 52
a56560b3b23323 Akinobu Mita 2011-03-23 53 static inline int test_bit_le(int nr, const void *addr)
a56560b3b23323 Akinobu Mita 2011-03-23 54 {
a56560b3b23323 Akinobu Mita 2011-03-23 @55 return test_bit(nr ^ BITOP_LE_SWIZZLE, addr);
a56560b3b23323 Akinobu Mita 2011-03-23 56 }
a56560b3b23323 Akinobu Mita 2011-03-23 57
:::::: The code at line 55 was first introduced by commit
:::::: a56560b3b233238e85205d4e8d7bded904ac2306 asm-generic: change little-endian bitops to take any pointer types
:::::: TO: Akinobu Mita <akinobu.mita(a)gmail.com>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months