[RFC PATCH] net: socket: sock_set_description() can be static
by kernel test robot
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
sock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/sock.c b/net/core/sock.c
index 2cb44a0e38b77d..f145a710974b48 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -828,7 +828,7 @@ void sock_set_rcvbuf(struct sock *sk, int val)
}
EXPORT_SYMBOL(sock_set_rcvbuf);
-int sock_set_description(struct sock *sk, char __user *user_desc)
+static int sock_set_description(struct sock *sk, char __user *user_desc)
{
char *old, *desc;
2 years, 1 month
Re: [PATCH 2/2] net: socket: implement SO_DESCRIPTION
by kernel test robot
Hi Pascal,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on tip/perf/core]
[also build test WARNING on linux/master v5.8]
[cannot apply to security/next-testing linus/master next-20200814]
[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/Pascal-Bouchareine/proc-socket-a...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git d903b6d029d66e6478562d75ea18d89098f7b7e8
config: i386-randconfig-s002-20200816 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-168-g9554805c-dirty
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
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 >>)
>> net/core/sock.c:831:5: sparse: sparse: symbol 'sock_set_description' was not declared. Should it be static?
net/core/sock.c:2028:9: sparse: sparse: context imbalance in 'sk_clone_lock' - wrong count at exit
net/core/sock.c:2032:6: sparse: sparse: context imbalance in 'sk_free_unlock_clone' - unexpected unlock
net/core/sock.c:3117:6: sparse: sparse: context imbalance in 'lock_sock_fast' - different lock contexts for basic block
net/core/sock.c:3611:13: sparse: sparse: context imbalance in 'proto_seq_start' - wrong count at exit
net/core/sock.c:3623:13: sparse: sparse: context imbalance in 'proto_seq_stop' - wrong count at exit
Please review and possibly fold the followup patch.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[sashal-linux-stable:queue-5.7 206/316] drivers/infiniband/hw/qedr/verbs.c:1796:22: error: 'struct qed_rdma_create_qp_in_params' has no member named 'flags'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.7
head: 9f9f56bf7a9f454b4f113a44c5bbf0120a1ad65f
commit: 2a6f3591c6e21536ed4edc28b1b9575a3c4ca4a2 [206/316] RDMA/qedr: Add EDPM mode type for user-fw compatibility
config: s390-allyesconfig (attached as .config)
compiler: s390-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 2a6f3591c6e21536ed4edc28b1b9575a3c4ca4a2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
include/net/sch_generic.h:869:2: note: in expansion of macro 'this_cpu_inc'
869 | this_cpu_inc(sch->cpu_qstats->qlen);
| ^~~~~~~~~~~~
include/net/sch_generic.h: In function 'qdisc_qstats_cpu_qlen_dec':
arch/s390/include/asm/percpu.h:74:21: warning: comparison is always true due to limited range of data type [-Wtype-limits]
74 | ((szcast)val__ > -129) && ((szcast)val__ < 128)) { \
| ^
arch/s390/include/asm/percpu.h:91:34: note: in expansion of macro 'arch_this_cpu_add'
91 | #define this_cpu_add_8(pcp, val) arch_this_cpu_add(pcp, val, "laag", "agsi", long)
| ^~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:380:11: note: in expansion of macro 'this_cpu_add_8'
380 | case 8: stem##8(variable, __VA_ARGS__);break; \
| ^~~~
include/linux/percpu-defs.h:509:33: note: in expansion of macro '__pcpu_size_call'
509 | #define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
| ^~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:519:33: note: in expansion of macro 'this_cpu_add'
519 | #define this_cpu_sub(pcp, val) this_cpu_add(pcp, -(typeof(pcp))(val))
| ^~~~~~~~~~~~
include/linux/percpu-defs.h:521:28: note: in expansion of macro 'this_cpu_sub'
521 | #define this_cpu_dec(pcp) this_cpu_sub(pcp, 1)
| ^~~~~~~~~~~~
include/net/sch_generic.h:874:2: note: in expansion of macro 'this_cpu_dec'
874 | this_cpu_dec(sch->cpu_qstats->qlen);
| ^~~~~~~~~~~~
include/net/sch_generic.h: In function 'qdisc_qstats_cpu_requeues_inc':
arch/s390/include/asm/percpu.h:74:21: warning: comparison is always true due to limited range of data type [-Wtype-limits]
74 | ((szcast)val__ > -129) && ((szcast)val__ < 128)) { \
| ^
arch/s390/include/asm/percpu.h:91:34: note: in expansion of macro 'arch_this_cpu_add'
91 | #define this_cpu_add_8(pcp, val) arch_this_cpu_add(pcp, val, "laag", "agsi", long)
| ^~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:380:11: note: in expansion of macro 'this_cpu_add_8'
380 | case 8: stem##8(variable, __VA_ARGS__);break; \
| ^~~~
include/linux/percpu-defs.h:509:33: note: in expansion of macro '__pcpu_size_call'
509 | #define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
| ^~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:520:28: note: in expansion of macro 'this_cpu_add'
520 | #define this_cpu_inc(pcp) this_cpu_add(pcp, 1)
| ^~~~~~~~~~~~
include/net/sch_generic.h:879:2: note: in expansion of macro 'this_cpu_inc'
879 | this_cpu_inc(sch->cpu_qstats->requeues);
| ^~~~~~~~~~~~
include/net/sch_generic.h: In function 'qdisc_qstats_cpu_drop':
arch/s390/include/asm/percpu.h:74:21: warning: comparison is always true due to limited range of data type [-Wtype-limits]
74 | ((szcast)val__ > -129) && ((szcast)val__ < 128)) { \
| ^
arch/s390/include/asm/percpu.h:91:34: note: in expansion of macro 'arch_this_cpu_add'
91 | #define this_cpu_add_8(pcp, val) arch_this_cpu_add(pcp, val, "laag", "agsi", long)
| ^~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:380:11: note: in expansion of macro 'this_cpu_add_8'
380 | case 8: stem##8(variable, __VA_ARGS__);break; \
| ^~~~
include/linux/percpu-defs.h:509:33: note: in expansion of macro '__pcpu_size_call'
509 | #define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
| ^~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:520:28: note: in expansion of macro 'this_cpu_add'
520 | #define this_cpu_inc(pcp) this_cpu_add(pcp, 1)
| ^~~~~~~~~~~~
include/net/sch_generic.h:904:2: note: in expansion of macro 'this_cpu_inc'
904 | this_cpu_inc(sch->cpu_qstats->drops);
| ^~~~~~~~~~~~
include/net/sch_generic.h: In function 'qdisc_update_stats_at_enqueue':
arch/s390/include/asm/percpu.h:74:21: warning: comparison is always true due to limited range of data type [-Wtype-limits]
74 | ((szcast)val__ > -129) && ((szcast)val__ < 128)) { \
| ^
arch/s390/include/asm/percpu.h:91:34: note: in expansion of macro 'arch_this_cpu_add'
91 | #define this_cpu_add_8(pcp, val) arch_this_cpu_add(pcp, val, "laag", "agsi", long)
| ^~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:380:11: note: in expansion of macro 'this_cpu_add_8'
380 | case 8: stem##8(variable, __VA_ARGS__);break; \
| ^~~~
include/linux/percpu-defs.h:509:33: note: in expansion of macro '__pcpu_size_call'
509 | #define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
| ^~~~~~~~~~~~~~~~
include/net/sch_generic.h:1103:3: note: in expansion of macro 'this_cpu_add'
1103 | this_cpu_add(sch->cpu_qstats->backlog, pkt_len);
| ^~~~~~~~~~~~
include/net/sch_generic.h: In function 'mini_qdisc_qstats_cpu_drop':
arch/s390/include/asm/percpu.h:74:21: warning: comparison is always true due to limited range of data type [-Wtype-limits]
74 | ((szcast)val__ > -129) && ((szcast)val__ < 128)) { \
| ^
arch/s390/include/asm/percpu.h:91:34: note: in expansion of macro 'arch_this_cpu_add'
91 | #define this_cpu_add_8(pcp, val) arch_this_cpu_add(pcp, val, "laag", "agsi", long)
| ^~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:380:11: note: in expansion of macro 'this_cpu_add_8'
380 | case 8: stem##8(variable, __VA_ARGS__);break; \
| ^~~~
include/linux/percpu-defs.h:509:33: note: in expansion of macro '__pcpu_size_call'
509 | #define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
| ^~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:520:28: note: in expansion of macro 'this_cpu_add'
520 | #define this_cpu_inc(pcp) this_cpu_add(pcp, 1)
| ^~~~~~~~~~~~
include/net/sch_generic.h:1272:2: note: in expansion of macro 'this_cpu_inc'
1272 | this_cpu_inc(miniq->cpu_qstats->drops);
| ^~~~~~~~~~~~
In file included from drivers/infiniband/hw/qedr/verbs.c:49:
drivers/infiniband/hw/qedr/verbs.c: In function 'qedr_create_user_qp':
>> drivers/infiniband/hw/qedr/verbs.c:1796:22: error: 'struct qed_rdma_create_qp_in_params' has no member named 'flags'
1796 | SET_FIELD(in_params.flags, QED_ROCE_EDPM_MODE, ctx->edpm_mode);
| ^
include/linux/qed/qed_if.h:1174:4: note: in definition of macro 'SET_FIELD'
1174 | (value) &= ~(name ## _MASK << name ## _SHIFT); \
| ^~~~~
>> drivers/infiniband/hw/qedr/verbs.c:1796:30: error: 'QED_ROCE_EDPM_MODE_MASK' undeclared (first use in this function)
1796 | SET_FIELD(in_params.flags, QED_ROCE_EDPM_MODE, ctx->edpm_mode);
| ^~~~~~~~~~~~~~~~~~
include/linux/qed/qed_if.h:1174:16: note: in definition of macro 'SET_FIELD'
1174 | (value) &= ~(name ## _MASK << name ## _SHIFT); \
| ^~~~
drivers/infiniband/hw/qedr/verbs.c:1796:30: note: each undeclared identifier is reported only once for each function it appears in
1796 | SET_FIELD(in_params.flags, QED_ROCE_EDPM_MODE, ctx->edpm_mode);
| ^~~~~~~~~~~~~~~~~~
include/linux/qed/qed_if.h:1174:16: note: in definition of macro 'SET_FIELD'
1174 | (value) &= ~(name ## _MASK << name ## _SHIFT); \
| ^~~~
>> drivers/infiniband/hw/qedr/verbs.c:1796:30: error: 'QED_ROCE_EDPM_MODE_SHIFT' undeclared (first use in this function)
1796 | SET_FIELD(in_params.flags, QED_ROCE_EDPM_MODE, ctx->edpm_mode);
| ^~~~~~~~~~~~~~~~~~
include/linux/qed/qed_if.h:1174:33: note: in definition of macro 'SET_FIELD'
1174 | (value) &= ~(name ## _MASK << name ## _SHIFT); \
| ^~~~
>> drivers/infiniband/hw/qedr/verbs.c:1796:22: error: 'struct qed_rdma_create_qp_in_params' has no member named 'flags'
1796 | SET_FIELD(in_params.flags, QED_ROCE_EDPM_MODE, ctx->edpm_mode);
| ^
include/linux/qed/qed_if.h:1175:4: note: in definition of macro 'SET_FIELD'
1175 | (value) |= (((u64)flag) << (name ## _SHIFT)); \
| ^~~~~
vim +1796 drivers/infiniband/hw/qedr/verbs.c
1746
1747 static int qedr_create_user_qp(struct qedr_dev *dev,
1748 struct qedr_qp *qp,
1749 struct ib_pd *ibpd,
1750 struct ib_udata *udata,
1751 struct ib_qp_init_attr *attrs)
1752 {
1753 struct qed_rdma_create_qp_in_params in_params;
1754 struct qed_rdma_create_qp_out_params out_params;
1755 struct qedr_pd *pd = get_qedr_pd(ibpd);
1756 struct qedr_create_qp_uresp uresp;
1757 struct qedr_ucontext *ctx = pd ? pd->uctx : NULL;
1758 struct qedr_create_qp_ureq ureq;
1759 int alloc_and_init = rdma_protocol_roce(&dev->ibdev, 1);
1760 int rc = -EINVAL;
1761
1762 qp->create_type = QEDR_QP_CREATE_USER;
1763 memset(&ureq, 0, sizeof(ureq));
1764 rc = ib_copy_from_udata(&ureq, udata, min(sizeof(ureq), udata->inlen));
1765 if (rc) {
1766 DP_ERR(dev, "Problem copying data from user space\n");
1767 return rc;
1768 }
1769
1770 /* SQ - read access only (0) */
1771 rc = qedr_init_user_queue(udata, dev, &qp->usq, ureq.sq_addr,
1772 ureq.sq_len, true, 0, alloc_and_init);
1773 if (rc)
1774 return rc;
1775
1776 if (!qp->srq) {
1777 /* RQ - read access only (0) */
1778 rc = qedr_init_user_queue(udata, dev, &qp->urq, ureq.rq_addr,
1779 ureq.rq_len, true, 0, alloc_and_init);
1780 if (rc)
1781 return rc;
1782 }
1783
1784 memset(&in_params, 0, sizeof(in_params));
1785 qedr_init_common_qp_in_params(dev, pd, qp, attrs, false, &in_params);
1786 in_params.qp_handle_lo = ureq.qp_handle_lo;
1787 in_params.qp_handle_hi = ureq.qp_handle_hi;
1788 in_params.sq_num_pages = qp->usq.pbl_info.num_pbes;
1789 in_params.sq_pbl_ptr = qp->usq.pbl_tbl->pa;
1790 if (!qp->srq) {
1791 in_params.rq_num_pages = qp->urq.pbl_info.num_pbes;
1792 in_params.rq_pbl_ptr = qp->urq.pbl_tbl->pa;
1793 }
1794
1795 if (ctx)
> 1796 SET_FIELD(in_params.flags, QED_ROCE_EDPM_MODE, ctx->edpm_mode);
1797
1798 qp->qed_qp = dev->ops->rdma_create_qp(dev->rdma_ctx,
1799 &in_params, &out_params);
1800
1801 if (!qp->qed_qp) {
1802 rc = -ENOMEM;
1803 goto err1;
1804 }
1805
1806 if (rdma_protocol_iwarp(&dev->ibdev, 1))
1807 qedr_iwarp_populate_user_qp(dev, qp, &out_params);
1808
1809 qp->qp_id = out_params.qp_id;
1810 qp->icid = out_params.icid;
1811
1812 rc = qedr_copy_qp_uresp(dev, qp, udata, &uresp);
1813 if (rc)
1814 goto err;
1815
1816 /* db offset was calculated in copy_qp_uresp, now set in the user q */
1817 ctx = pd->uctx;
1818 qp->usq.db_addr = ctx->dpi_addr + uresp.sq_db_offset;
1819 qp->urq.db_addr = ctx->dpi_addr + uresp.rq_db_offset;
1820
1821 if (rdma_protocol_iwarp(&dev->ibdev, 1)) {
1822 qp->urq.db_rec_db2_addr = ctx->dpi_addr + uresp.rq_db2_offset;
1823
1824 /* calculate the db_rec_db2 data since it is constant so no
1825 * need to reflect from user
1826 */
1827 qp->urq.db_rec_db2_data.data.icid = cpu_to_le16(qp->icid);
1828 qp->urq.db_rec_db2_data.data.value =
1829 cpu_to_le16(DQ_TCM_IWARP_POST_RQ_CF_CMD);
1830 }
1831
1832 rc = qedr_db_recovery_add(dev, qp->usq.db_addr,
1833 &qp->usq.db_rec_data->db_data,
1834 DB_REC_WIDTH_32B,
1835 DB_REC_USER);
1836 if (rc)
1837 goto err;
1838
1839 rc = qedr_db_recovery_add(dev, qp->urq.db_addr,
1840 &qp->urq.db_rec_data->db_data,
1841 DB_REC_WIDTH_32B,
1842 DB_REC_USER);
1843 if (rc)
1844 goto err;
1845
1846 if (rdma_protocol_iwarp(&dev->ibdev, 1)) {
1847 rc = qedr_db_recovery_add(dev, qp->urq.db_rec_db2_addr,
1848 &qp->urq.db_rec_db2_data,
1849 DB_REC_WIDTH_32B,
1850 DB_REC_USER);
1851 if (rc)
1852 goto err;
1853 }
1854 qedr_qp_user_print(dev, qp);
1855
1856 return rc;
1857 err:
1858 rc = dev->ops->rdma_destroy_qp(dev->rdma_ctx, qp->qed_qp);
1859 if (rc)
1860 DP_ERR(dev, "create qp: fatal fault. rc=%d", rc);
1861
1862 err1:
1863 qedr_cleanup_user(dev, ctx, qp);
1864 return rc;
1865 }
1866
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
drivers/w1/slaves/w1_ds28e04.c:360 crccheck_store() warn: assigning (-48) to unsigned variable 'val'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 4b6c093e21d36bede0fd88fd0aeb3b03647260e4
commit: 80591e61a0f7e88deaada69844e4a31280c4a38f kbuild: tell sparse about the $ARCH
date: 9 months ago
config: s390-randconfig-m031-20200816 (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
New smatch warnings:
drivers/w1/slaves/w1_ds28e04.c:360 crccheck_store() warn: assigning (-48) to unsigned variable 'val'
Old smatch warnings:
arch/s390/include/asm/uaccess.h:113 __put_user_fn() error: uninitialized symbol 'rc'.
arch/s390/include/asm/uaccess.h:143 __get_user_fn() error: uninitialized symbol 'rc'.
vim +/val +360 drivers/w1/slaves/w1_ds28e04.c
fbf7f7b4e2ae40 Markus Franke 2012-05-26 347
fa33a65a9cf7e2 Greg Kroah-Hartman 2013-08-21 348 static ssize_t crccheck_store(struct device *dev, struct device_attribute *attr,
fbf7f7b4e2ae40 Markus Franke 2012-05-26 349 const char *buf, size_t count)
fbf7f7b4e2ae40 Markus Franke 2012-05-26 350 {
fbf7f7b4e2ae40 Markus Franke 2012-05-26 351 char val;
fbf7f7b4e2ae40 Markus Franke 2012-05-26 352
fbf7f7b4e2ae40 Markus Franke 2012-05-26 353 if (count != 1 || !buf)
fbf7f7b4e2ae40 Markus Franke 2012-05-26 354 return -EINVAL;
fbf7f7b4e2ae40 Markus Franke 2012-05-26 355
fbf7f7b4e2ae40 Markus Franke 2012-05-26 356 if (get_user(val, buf))
fbf7f7b4e2ae40 Markus Franke 2012-05-26 357 return -EFAULT;
fbf7f7b4e2ae40 Markus Franke 2012-05-26 358
fbf7f7b4e2ae40 Markus Franke 2012-05-26 359 /* convert to decimal */
fbf7f7b4e2ae40 Markus Franke 2012-05-26 @360 val = val - 0x30;
fbf7f7b4e2ae40 Markus Franke 2012-05-26 361 if (val != 0 && val != 1)
fbf7f7b4e2ae40 Markus Franke 2012-05-26 362 return -EINVAL;
fbf7f7b4e2ae40 Markus Franke 2012-05-26 363
fbf7f7b4e2ae40 Markus Franke 2012-05-26 364 /* set the new value */
fbf7f7b4e2ae40 Markus Franke 2012-05-26 365 w1_enable_crccheck = val;
fbf7f7b4e2ae40 Markus Franke 2012-05-26 366
fbf7f7b4e2ae40 Markus Franke 2012-05-26 367 return sizeof(w1_enable_crccheck);
fbf7f7b4e2ae40 Markus Franke 2012-05-26 368 }
fbf7f7b4e2ae40 Markus Franke 2012-05-26 369
:::::: The code at line 360 was first introduced by commit
:::::: fbf7f7b4e2ae40f790828c86d31beff2d49e9ac8 w1: Add 1-wire slave device driver for DS28E04-100
:::::: TO: Markus Franke <franm(a)hrz.tu-chemnitz.de>
:::::: CC: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
Re: [PATCH 1/3] net: introduce helper sendpage_ok() in include/linux/net.h
by kernel test robot
Hi Coly,
I love your patch! Yet something to improve:
[auto build test ERROR on block/for-next]
[also build test ERROR on net/master net-next/master ipvs/master linus/master v5.8 next-20200814]
[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/Coly-Li/net-introduce-helper-sen...
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: i386-randconfig-s002-20200816 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-168-g9554805c-dirty
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from net/core/stream.c:18:
include/linux/net.h: In function 'sendpage_ok':
>> include/linux/net.h:301:30: error: implicit declaration of function 'page_count'; did you mean 'file_count'? [-Werror=implicit-function-declaration]
301 | return (!PageSlab(page) && page_count(page) >= 1);
| ^~~~~~~~~~
| file_count
In file included from include/linux/mm.h:27,
from include/linux/bvec.h:13,
from include/linux/skbuff.h:17,
from include/linux/tcp.h:17,
from net/core/stream.c:20:
include/linux/page_ref.h: At top level:
>> include/linux/page_ref.h:70:19: error: static declaration of 'page_count' follows non-static declaration
70 | static inline int page_count(struct page *page)
| ^~~~~~~~~~
In file included from net/core/stream.c:18:
include/linux/net.h:301:30: note: previous implicit declaration of 'page_count' was here
301 | return (!PageSlab(page) && page_count(page) >= 1);
| ^~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from net/ipv6/ip6_fib.c:20:
include/linux/net.h: In function 'sendpage_ok':
>> include/linux/net.h:301:30: error: implicit declaration of function 'page_count'; did you mean 'file_count'? [-Werror=implicit-function-declaration]
301 | return (!PageSlab(page) && page_count(page) >= 1);
| ^~~~~~~~~~
| file_count
In file included from include/linux/mm.h:27,
from include/linux/bvec.h:13,
from include/linux/skbuff.h:17,
from include/linux/if_ether.h:19,
from include/uapi/linux/ethtool.h:19,
from include/linux/ethtool.h:18,
from include/linux/netdevice.h:37,
from net/ipv6/ip6_fib.c:22:
include/linux/page_ref.h: At top level:
>> include/linux/page_ref.h:70:19: error: static declaration of 'page_count' follows non-static declaration
70 | static inline int page_count(struct page *page)
| ^~~~~~~~~~
In file included from net/ipv6/ip6_fib.c:20:
include/linux/net.h:301:30: note: previous implicit declaration of 'page_count' was here
301 | return (!PageSlab(page) && page_count(page) >= 1);
| ^~~~~~~~~~
net/ipv6/ip6_fib.c: In function 'fib6_add':
net/ipv6/ip6_fib.c:1373:25: warning: variable 'pn' set but not used [-Wunused-but-set-variable]
1373 | struct fib6_node *fn, *pn = NULL;
| ^~
cc1: some warnings being treated as errors
--
In file included from net/ipv6/udp.c:24:
include/linux/net.h: In function 'sendpage_ok':
>> include/linux/net.h:301:30: error: implicit declaration of function 'page_count'; did you mean 'file_count'? [-Werror=implicit-function-declaration]
301 | return (!PageSlab(page) && page_count(page) >= 1);
| ^~~~~~~~~~
| file_count
In file included from include/linux/mm.h:27,
from include/linux/bvec.h:13,
from include/linux/skbuff.h:17,
from include/linux/if_ether.h:19,
from include/uapi/linux/ethtool.h:19,
from include/linux/ethtool.h:18,
from include/linux/netdevice.h:37,
from net/ipv6/udp.c:26:
include/linux/page_ref.h: At top level:
>> include/linux/page_ref.h:70:19: error: static declaration of 'page_count' follows non-static declaration
70 | static inline int page_count(struct page *page)
| ^~~~~~~~~~
In file included from net/ipv6/udp.c:24:
include/linux/net.h:301:30: note: previous implicit declaration of 'page_count' was here
301 | return (!PageSlab(page) && page_count(page) >= 1);
| ^~~~~~~~~~
net/ipv6/udp.c:1029:30: warning: no previous prototype for 'udp_v6_early_demux' [-Wmissing-prototypes]
1029 | INDIRECT_CALLABLE_SCOPE void udp_v6_early_demux(struct sk_buff *skb)
| ^~~~~~~~~~~~~~~~~~
net/ipv6/udp.c:1070:29: warning: no previous prototype for 'udpv6_rcv' [-Wmissing-prototypes]
1070 | INDIRECT_CALLABLE_SCOPE int udpv6_rcv(struct sk_buff *skb)
| ^~~~~~~~~
cc1: some warnings being treated as errors
vim +301 include/linux/net.h
283
284 #define net_get_random_once(buf, nbytes) \
285 get_random_once((buf), (nbytes))
286 #define net_get_random_once_wait(buf, nbytes) \
287 get_random_once_wait((buf), (nbytes))
288
289 /*
290 * E.g. XFS meta- & log-data is in slab pages, or bcache meta
291 * data pages, or other high order pages allocated by
292 * __get_free_pages() without __GFP_COMP, which have a page_count
293 * of 0 and/or have PageSlab() set. We cannot use send_page for
294 * those, as that does get_page(); put_page(); and would cause
295 * either a VM_BUG directly, or __page_cache_release a page that
296 * would actually still be referenced by someone, leading to some
297 * obscure delayed Oops somewhere else.
298 */
299 static inline bool sendpage_ok(struct page *page)
300 {
> 301 return (!PageSlab(page) && page_count(page) >= 1);
302 }
303
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[sashal-linux-stable:queue-5.4 146/215] security/integrity/ima/ima_policy.c:1280:3: error: implicit declaration of function 'ima_free_rule'; did you mean
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.4
head: dcf7104e8ee83d0a2555bff0701e88b899a07710
commit: 1950f718bed0c32e4404121532351f2f5576e1b7 [146/215] ima: Free the entire rule if it fails to parse
config: m68k-allmodconfig (attached as .config)
compiler: m68k-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 1950f718bed0c32e4404121532351f2f5576e1b7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.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 errors (new ones prefixed by >>):
In file included from arch/m68k/include/asm/io_mm.h:25,
from arch/m68k/include/asm/io.h:8,
from include/linux/kexec.h:19,
from include/linux/ima.h:12,
from security/integrity/ima/ima_policy.c:22:
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsb':
arch/m68k/include/asm/raw_io.h:83:7: warning: variable '__w' set but not used [-Wunused-but-set-variable]
83 | ({u8 __w, __v = (b); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:430:3: note: in expansion of macro 'rom_out_8'
430 | rom_out_8(port, *buf++);
| ^~~~~~~~~
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw':
arch/m68k/include/asm/raw_io.h:86:8: warning: variable '__w' set but not used [-Wunused-but-set-variable]
86 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:448:3: note: in expansion of macro 'rom_out_be16'
448 | rom_out_be16(port, *buf++);
| ^~~~~~~~~~~~
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw_swapw':
arch/m68k/include/asm/raw_io.h:90:8: warning: variable '__w' set but not used [-Wunused-but-set-variable]
90 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:466:3: note: in expansion of macro 'rom_out_le16'
466 | rom_out_le16(port, *buf++);
| ^~~~~~~~~~~~
security/integrity/ima/ima_policy.c: In function 'ima_parse_add_rule':
>> security/integrity/ima/ima_policy.c:1280:3: error: implicit declaration of function 'ima_free_rule'; did you mean 'ima_parse_rule'? [-Werror=implicit-function-declaration]
1280 | ima_free_rule(entry);
| ^~~~~~~~~~~~~
| ima_parse_rule
cc1: some warnings being treated as errors
vim +1280 security/integrity/ima/ima_policy.c
1246
1247 /**
1248 * ima_parse_add_rule - add a rule to ima_policy_rules
1249 * @rule - ima measurement policy rule
1250 *
1251 * Avoid locking by allowing just one writer at a time in ima_write_policy()
1252 * Returns the length of the rule parsed, an error code on failure
1253 */
1254 ssize_t ima_parse_add_rule(char *rule)
1255 {
1256 static const char op[] = "update_policy";
1257 char *p;
1258 struct ima_rule_entry *entry;
1259 ssize_t result, len;
1260 int audit_info = 0;
1261
1262 p = strsep(&rule, "\n");
1263 len = strlen(p) + 1;
1264 p += strspn(p, " \t");
1265
1266 if (*p == '#' || *p == '\0')
1267 return len;
1268
1269 entry = kzalloc(sizeof(*entry), GFP_KERNEL);
1270 if (!entry) {
1271 integrity_audit_msg(AUDIT_INTEGRITY_STATUS, NULL,
1272 NULL, op, "-ENOMEM", -ENOMEM, audit_info);
1273 return -ENOMEM;
1274 }
1275
1276 INIT_LIST_HEAD(&entry->list);
1277
1278 result = ima_parse_rule(p, entry);
1279 if (result) {
> 1280 ima_free_rule(entry);
1281 integrity_audit_msg(AUDIT_INTEGRITY_STATUS, NULL,
1282 NULL, op, "invalid-policy", result,
1283 audit_info);
1284 return result;
1285 }
1286
1287 list_add_tail(&entry->list, &ima_temp_rules);
1288
1289 return len;
1290 }
1291
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[hch-misc:nvme-pr-fix 5/5] drivers/nvme/host/core.c:1684:20: warning: incompatible integer to pointer conversion initializing 'struct nvme_ns with an expression of type 'int'
by kernel test robot
tree: git://git.infradead.org/users/hch/misc.git nvme-pr-fix
head: d5eadfcdbeb0e4f09c22b02955b587321c6300b1
commit: d5eadfcdbeb0e4f09c22b02955b587321c6300b1 [5/5] nvme: retry PR commands on path errors
config: x86_64-randconfig-r033-20200816 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ab9fc8bae805c785066779e76e7846aabad5609e)
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 d5eadfcdbeb0e4f09c22b02955b587321c6300b1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/nvme/host/core.c:1647:8: error: implicit declaration of function 'nvme_find_path' [-Werror,-Wimplicit-function-declaration]
ns = nvme_find_path(*head);
^
drivers/nvme/host/core.c:1647:6: warning: incompatible integer to pointer conversion assigning to 'struct nvme_ns *' from 'int' [-Wint-conversion]
ns = nvme_find_path(*head);
^ ~~~~~~~~~~~~~~~~~~~~~
drivers/nvme/host/core.c:1684:25: error: implicit declaration of function 'nvme_find_path' [-Werror,-Wimplicit-function-declaration]
struct nvme_ns *ns = nvme_find_path(head);
^
>> drivers/nvme/host/core.c:1684:20: warning: incompatible integer to pointer conversion initializing 'struct nvme_ns *' with an expression of type 'int' [-Wint-conversion]
struct nvme_ns *ns = nvme_find_path(head);
^ ~~~~~~~~~~~~~~~~~~~~
2 warnings and 2 errors generated.
vim +1684 drivers/nvme/host/core.c
1663
1664 /*
1665 * Submit a command to a given gendisk, and if the disk is a multipath node
1666 * retry the command on a different path in case of a path error instead of
1667 * giving up after the first failure.
1668 */
1669 static int nvme_submit_sync_cmd_disk(struct gendisk *disk,
1670 struct nvme_command *cmd, void *buffer, unsigned len)
1671 {
1672 if (!is_multipath_disk(disk)) {
1673 struct nvme_ns *ns = disk->private_data;
1674
1675 cmd->common.nsid = cpu_to_le32(ns->head->ns_id);
1676 return nvme_submit_sync_cmd(disk->queue, cmd, buffer, len);
1677 } else {
1678 struct nvme_ns_head *head = disk->private_data;
1679 int ret;
1680
1681 cmd->common.nsid = cpu_to_le32(head->ns_id);
1682 do {
1683 int srcu_idx = srcu_read_lock(&head->srcu);
> 1684 struct nvme_ns *ns = nvme_find_path(head);
1685
1686 if (ns)
1687 ret = nvme_submit_sync_cmd(ns->queue, cmd,
1688 buffer, len);
1689 else
1690 ret = -EWOULDBLOCK;
1691 srcu_read_unlock(&head->srcu, srcu_idx);
1692 } while (ret > 0 && nvme_is_path_error(ret));
1693
1694 return ret;
1695 }
1696 }
1697
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[hch-misc:nvme-pr-fix 5/5] drivers/nvme/host/core.c:1684:25: warning: initialization of 'struct nvme_ns from 'int' makes pointer from integer without a cast
by kernel test robot
tree: git://git.infradead.org/users/hch/misc.git nvme-pr-fix
head: d5eadfcdbeb0e4f09c22b02955b587321c6300b1
commit: d5eadfcdbeb0e4f09c22b02955b587321c6300b1 [5/5] nvme: retry PR commands on path errors
config: nios2-randconfig-r001-20200816 (attached as .config)
compiler: nios2-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 d5eadfcdbeb0e4f09c22b02955b587321c6300b1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2
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/nvme/host/core.c: In function 'nvme_get_ns_from_disk':
drivers/nvme/host/core.c:1647:8: error: implicit declaration of function 'nvme_find_path'; did you mean 'nvme_find_get_ns'? [-Werror=implicit-function-declaration]
1647 | ns = nvme_find_path(*head);
| ^~~~~~~~~~~~~~
| nvme_find_get_ns
drivers/nvme/host/core.c:1647:6: warning: assignment to 'struct nvme_ns *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
1647 | ns = nvme_find_path(*head);
| ^
drivers/nvme/host/core.c: In function 'nvme_submit_sync_cmd_disk':
>> drivers/nvme/host/core.c:1684:25: warning: initialization of 'struct nvme_ns *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
1684 | struct nvme_ns *ns = nvme_find_path(head);
| ^~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +1684 drivers/nvme/host/core.c
1663
1664 /*
1665 * Submit a command to a given gendisk, and if the disk is a multipath node
1666 * retry the command on a different path in case of a path error instead of
1667 * giving up after the first failure.
1668 */
1669 static int nvme_submit_sync_cmd_disk(struct gendisk *disk,
1670 struct nvme_command *cmd, void *buffer, unsigned len)
1671 {
1672 if (!is_multipath_disk(disk)) {
1673 struct nvme_ns *ns = disk->private_data;
1674
1675 cmd->common.nsid = cpu_to_le32(ns->head->ns_id);
1676 return nvme_submit_sync_cmd(disk->queue, cmd, buffer, len);
1677 } else {
1678 struct nvme_ns_head *head = disk->private_data;
1679 int ret;
1680
1681 cmd->common.nsid = cpu_to_le32(head->ns_id);
1682 do {
1683 int srcu_idx = srcu_read_lock(&head->srcu);
> 1684 struct nvme_ns *ns = nvme_find_path(head);
1685
1686 if (ns)
1687 ret = nvme_submit_sync_cmd(ns->queue, cmd,
1688 buffer, len);
1689 else
1690 ret = -EWOULDBLOCK;
1691 srcu_read_unlock(&head->srcu, srcu_idx);
1692 } while (ret > 0 && nvme_is_path_error(ret));
1693
1694 return ret;
1695 }
1696 }
1697
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[intel-linux-intel-lts:4.19/android_q 9364/16908] drivers/staging/android/ion/ion_system_heap.c:17:10: fatal error: asm/set_memory.h: No such file or directory
by kernel test robot
Hi bo,
FYI, the error/warning still remains.
tree: https://github.com/intel/linux-intel-lts.git 4.19/android_q
head: 4701bbfe016302fc3a965c193f9dea53bd96dbb9
commit: ab2f796a9d1298c6e238cd2a770cbf3666393c02 [9364/16908] ion: fix the tons of warning from PAT
config: m68k-allmodconfig (attached as .config)
compiler: m68k-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 ab2f796a9d1298c6e238cd2a770cbf3666393c02
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.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 errors (new ones prefixed by >>):
In file included from arch/m68k/include/asm/io_mm.h:25,
from arch/m68k/include/asm/io.h:8,
from include/linux/scatterlist.h:9,
from include/linux/dma-mapping.h:11,
from drivers/staging/android/ion/ion_system_heap.c:9:
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsb':
arch/m68k/include/asm/raw_io.h:83:7: warning: variable '__w' set but not used [-Wunused-but-set-variable]
83 | ({u8 __w, __v = (b); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:399:3: note: in expansion of macro 'rom_out_8'
399 | rom_out_8(port, *buf++);
| ^~~~~~~~~
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw':
arch/m68k/include/asm/raw_io.h:86:8: warning: variable '__w' set but not used [-Wunused-but-set-variable]
86 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:417:3: note: in expansion of macro 'rom_out_be16'
417 | rom_out_be16(port, *buf++);
| ^~~~~~~~~~~~
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw_swapw':
arch/m68k/include/asm/raw_io.h:90:8: warning: variable '__w' set but not used [-Wunused-but-set-variable]
90 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:435:3: note: in expansion of macro 'rom_out_le16'
435 | rom_out_le16(port, *buf++);
| ^~~~~~~~~~~~
In file included from arch/m68k/include/asm/page_mm.h:7,
from arch/m68k/include/asm/page.h:47,
from drivers/staging/android/ion/ion_system_heap.c:8:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/linux/compiler.h:77:42: note: in definition of macro 'unlikely'
77 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
include/linux/dma-mapping.h: In function 'dma_map_resource':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/linux/compiler.h:77:42: note: in definition of macro 'unlikely'
77 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/dma-mapping.h:329:2: note: in expansion of macro 'BUG_ON'
329 | BUG_ON(pfn_valid(PHYS_PFN(phys_addr)));
| ^~~~~~
arch/m68k/include/asm/page_mm.h:170:25: note: in expansion of macro 'virt_addr_valid'
170 | #define pfn_valid(pfn) virt_addr_valid(pfn_to_virt(pfn))
| ^~~~~~~~~~~~~~~
include/linux/dma-mapping.h:329:9: note: in expansion of macro 'pfn_valid'
329 | BUG_ON(pfn_valid(PHYS_PFN(phys_addr)));
| ^~~~~~~~~
drivers/staging/android/ion/ion_system_heap.c: At top level:
>> drivers/staging/android/ion/ion_system_heap.c:17:10: fatal error: asm/set_memory.h: No such file or directory
17 | #include <asm/set_memory.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
vim +17 drivers/staging/android/ion/ion_system_heap.c
> 17 #include <asm/set_memory.h>
18 #include "ion.h"
19
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
Re: [PATCH 20/20] fixed checkpatch issues for all files in rxe
by kernel test robot
Hi Bob,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on rdma/for-next]
[also build test ERROR on next-20200814]
[cannot apply to v5.8]
[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/Bob-Pearson/Added-ib_uverbs_wc_o...
base: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git for-next
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/infiniband/sw/rxe/rxe.h:17,
from drivers/infiniband/sw/rxe/rxe_mw.c:10:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/xtensa/include/asm/page.h:193:9: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
193 | ((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) < max_mapnr)
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
arch/xtensa/include/asm/page.h:201:32: note: in expansion of macro 'pfn_valid'
201 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
| ^~~~~~~~~
include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
In file included from ./arch/xtensa/include/generated/asm/bug.h:1,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from include/asm-generic/preempt.h:5,
from ./arch/xtensa/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/linux/stat.h:19,
from include/linux/module.h:13,
from drivers/infiniband/sw/rxe/rxe.h:17,
from drivers/infiniband/sw/rxe/rxe_mw.c:10:
include/linux/dma-mapping.h: In function 'dma_map_resource':
arch/xtensa/include/asm/page.h:193:9: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
193 | ((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) < max_mapnr)
| ^~
include/asm-generic/bug.h:144:27: note: in definition of macro 'WARN_ON_ONCE'
144 | int __ret_warn_once = !!(condition); \
| ^~~~~~~~~
include/linux/dma-mapping.h:352:19: note: in expansion of macro 'pfn_valid'
352 | if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
| ^~~~~~~~~
drivers/infiniband/sw/rxe/rxe_mw.c: In function 'do_bind_mw':
>> drivers/infiniband/sw/rxe/rxe_mw.c:227:17: error: implicit declaration of function 'rxe_get_key'; did you mean 'rxe_get_av'? [-Werror=implicit-function-declaration]
227 | duplicate_mw = rxe_get_key(rxe, &new_key);
| ^~~~~~~~~~~
| rxe_get_av
>> drivers/infiniband/sw/rxe/rxe_mw.c:227:35: error: 'new_key' undeclared (first use in this function); did you mean 'new_rkey'?
227 | duplicate_mw = rxe_get_key(rxe, &new_key);
| ^~~~~~~
| new_rkey
drivers/infiniband/sw/rxe/rxe_mw.c:227:35: note: each undeclared identifier is reported only once for each function it appears in
drivers/infiniband/sw/rxe/rxe_mw.c:211:6: warning: unused variable 'ret' [-Wunused-variable]
211 | int ret;
| ^~~
cc1: some warnings being treated as errors
vim +227 drivers/infiniband/sw/rxe/rxe_mw.c
207
208 static int do_bind_mw(struct rxe_qp *qp, struct rxe_send_wqe *wqe,
209 struct rxe_mw *mw, struct rxe_mr *mr)
210 {
211 int ret;
212 u32 rkey;
213 u32 new_rkey;
214 struct rxe_mw *duplicate_mw;
215 struct rxe_dev *rxe = to_rdev(qp->ibqp.device);
216
217 /*
218 * key part of new rkey is provided by user for type 2
219 * and ibv_bind_mw() for type 1 MWs
220 * there is a very rare chance that the new rkey will
221 * collide with an existing MW. Return an error if this
222 * occurs
223 */
224 rkey = mw->ibmw.rkey;
225 new_rkey = (rkey & 0xffffff00) | (wqe->wr.wr.umw.rkey & 0x000000ff);
226
> 227 duplicate_mw = rxe_get_key(rxe, &new_key);
228 if (duplicate_mw) {
229 pr_err_once("new MW key is a duplicate, try another\n");
230 rxe_drop_ref(duplicate_mw);
231 return -EINVAL;
232 }
233
234 rxe_drop_key(mw);
235 rxe_add_key(mw, &new_rkey);
236
237 mw->access = wqe->wr.wr.umw.access;
238 mw->state = RXE_MEM_STATE_VALID;
239 mw->addr = wqe->wr.wr.umw.addr;
240 mw->length = wqe->wr.wr.umw.length;
241
242 if (mw->mr) {
243 rxe_drop_ref(mw->mr);
244 atomic_dec(&mw->mr->num_mw);
245 mw->mr = NULL;
246 }
247
248 if (mw->length) {
249 mw->mr = mr;
250 atomic_inc(&mr->num_mw);
251 rxe_add_ref(mr);
252 }
253
254 if (mw->ibmw.type == IB_MW_TYPE_2)
255 mw->qp = qp;
256
257 return 0;
258 }
259
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month