* [dhowells-fs:notifications-pipe-prep 4/10] drivers//char/virtio_console.c:937:2: note: in expansion of macro 'if'
@ 2019-10-23 17:58 kbuild test robot
0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2019-10-23 17:58 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 8683 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git notifications-pipe-prep
head: 48045df7b3191f476ef0095ec30d6fcbe4411940
commit: 2b988693eb16961453719e63b7a96e83cacd7fd2 [4/10] pipe: Use head and tail pointers for the ring, not cursor and length
config: x86_64-randconfig-f003-201942 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
git checkout 2b988693eb16961453719e63b7a96e83cacd7fd2
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/export.h:44:0,
from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from include/linux/list.h:9,
from include/linux/kobject.h:19,
from include/linux/cdev.h:5,
from drivers//char/virtio_console.c:7:
drivers//char/virtio_console.c: In function 'port_fops_splice_write':
drivers//char/virtio_console.c:937:13: error: 'struct pipe_inode_info' has no member named 'nrbufs'; did you mean 'bufs'?
if (!pipe->nrbufs) {
^
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
>> drivers//char/virtio_console.c:937:2: note: in expansion of macro 'if'
if (!pipe->nrbufs) {
^~
drivers//char/virtio_console.c:937:13: error: 'struct pipe_inode_info' has no member named 'nrbufs'; did you mean 'bufs'?
if (!pipe->nrbufs) {
^
include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
>> drivers//char/virtio_console.c:937:2: note: in expansion of macro 'if'
if (!pipe->nrbufs) {
^~
drivers//char/virtio_console.c:937:13: error: 'struct pipe_inode_info' has no member named 'nrbufs'; did you mean 'bufs'?
if (!pipe->nrbufs) {
^
include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value'
(cond) ? \
^~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~~~~~~~~~~~
>> drivers//char/virtio_console.c:937:2: note: in expansion of macro 'if'
if (!pipe->nrbufs) {
^~
drivers//char/virtio_console.c:946:48: error: 'struct pipe_inode_info' has no member named 'nrbufs'; did you mean 'bufs'?
buf = alloc_buf(port->portdev->vdev, 0, pipe->nrbufs);
^~~~~~
bufs
drivers//char/virtio_console.c:954:19: error: 'struct pipe_inode_info' has no member named 'nrbufs'; did you mean 'bufs'?
sgl.size = pipe->nrbufs;
^~~~~~
bufs
vim +/if +937 drivers//char/virtio_console.c
eb5e89fc70bb3f Masami Hiramatsu 2012-08-09 906
eb5e89fc70bb3f Masami Hiramatsu 2012-08-09 907 /* Faster zero-copy write by splicing */
eb5e89fc70bb3f Masami Hiramatsu 2012-08-09 908 static ssize_t port_fops_splice_write(struct pipe_inode_info *pipe,
eb5e89fc70bb3f Masami Hiramatsu 2012-08-09 909 struct file *filp, loff_t *ppos,
eb5e89fc70bb3f Masami Hiramatsu 2012-08-09 910 size_t len, unsigned int flags)
eb5e89fc70bb3f Masami Hiramatsu 2012-08-09 911 {
eb5e89fc70bb3f Masami Hiramatsu 2012-08-09 912 struct port *port = filp->private_data;
eb5e89fc70bb3f Masami Hiramatsu 2012-08-09 913 struct sg_list sgl;
eb5e89fc70bb3f Masami Hiramatsu 2012-08-09 914 ssize_t ret;
276a3e954cfe4d Sjur Brændeland 2012-12-14 915 struct port_buffer *buf;
eb5e89fc70bb3f Masami Hiramatsu 2012-08-09 916 struct splice_desc sd = {
eb5e89fc70bb3f Masami Hiramatsu 2012-08-09 917 .total_len = len,
eb5e89fc70bb3f Masami Hiramatsu 2012-08-09 918 .flags = flags,
eb5e89fc70bb3f Masami Hiramatsu 2012-08-09 919 .pos = *ppos,
eb5e89fc70bb3f Masami Hiramatsu 2012-08-09 920 .u.data = &sgl,
eb5e89fc70bb3f Masami Hiramatsu 2012-08-09 921 };
eb5e89fc70bb3f Masami Hiramatsu 2012-08-09 922
1b6370463e88b0 Sjur Brændeland 2012-12-14 923 /*
1b6370463e88b0 Sjur Brændeland 2012-12-14 924 * Rproc_serial does not yet support splice. To support splice
1b6370463e88b0 Sjur Brændeland 2012-12-14 925 * pipe_to_sg() must allocate dma-buffers and copy content from
1b6370463e88b0 Sjur Brændeland 2012-12-14 926 * regular pages to dma pages. And alloc_buf and free_buf must
1b6370463e88b0 Sjur Brændeland 2012-12-14 927 * support allocating and freeing such a list of dma-buffers.
1b6370463e88b0 Sjur Brændeland 2012-12-14 928 */
1b6370463e88b0 Sjur Brændeland 2012-12-14 929 if (is_rproc_serial(port->out_vq->vdev))
1b6370463e88b0 Sjur Brændeland 2012-12-14 930 return -EINVAL;
1b6370463e88b0 Sjur Brændeland 2012-12-14 931
68c034fefe20ea Yoshihiro YUNOMAE 2013-07-23 932 /*
68c034fefe20ea Yoshihiro YUNOMAE 2013-07-23 933 * pipe->nrbufs == 0 means there are no data to transfer,
68c034fefe20ea Yoshihiro YUNOMAE 2013-07-23 934 * so this returns just 0 for no data.
68c034fefe20ea Yoshihiro YUNOMAE 2013-07-23 935 */
2b4fbf029dff5a Yoshihiro YUNOMAE 2013-07-23 936 pipe_lock(pipe);
2b4fbf029dff5a Yoshihiro YUNOMAE 2013-07-23 @937 if (!pipe->nrbufs) {
2b4fbf029dff5a Yoshihiro YUNOMAE 2013-07-23 938 ret = 0;
2b4fbf029dff5a Yoshihiro YUNOMAE 2013-07-23 939 goto error_out;
2b4fbf029dff5a Yoshihiro YUNOMAE 2013-07-23 940 }
68c034fefe20ea Yoshihiro YUNOMAE 2013-07-23 941
efe75d24a69fc3 Masami Hiramatsu 2012-08-09 942 ret = wait_port_writable(port, filp->f_flags & O_NONBLOCK);
efe75d24a69fc3 Masami Hiramatsu 2012-08-09 943 if (ret < 0)
2b4fbf029dff5a Yoshihiro YUNOMAE 2013-07-23 944 goto error_out;
efe75d24a69fc3 Masami Hiramatsu 2012-08-09 945
2855b33514d290 Michael S. Tsirkin 2018-04-20 946 buf = alloc_buf(port->portdev->vdev, 0, pipe->nrbufs);
2b4fbf029dff5a Yoshihiro YUNOMAE 2013-07-23 947 if (!buf) {
2b4fbf029dff5a Yoshihiro YUNOMAE 2013-07-23 948 ret = -ENOMEM;
2b4fbf029dff5a Yoshihiro YUNOMAE 2013-07-23 949 goto error_out;
2b4fbf029dff5a Yoshihiro YUNOMAE 2013-07-23 950 }
276a3e954cfe4d Sjur Brændeland 2012-12-14 951
eb5e89fc70bb3f Masami Hiramatsu 2012-08-09 952 sgl.n = 0;
eb5e89fc70bb3f Masami Hiramatsu 2012-08-09 953 sgl.len = 0;
8ca84a50e5b394 Masami Hiramatsu 2012-08-09 954 sgl.size = pipe->nrbufs;
276a3e954cfe4d Sjur Brændeland 2012-12-14 955 sgl.sg = buf->sg;
8ca84a50e5b394 Masami Hiramatsu 2012-08-09 956 sg_init_table(sgl.sg, sgl.size);
eb5e89fc70bb3f Masami Hiramatsu 2012-08-09 957 ret = __splice_from_pipe(pipe, &sd, pipe_to_sg);
2b4fbf029dff5a Yoshihiro YUNOMAE 2013-07-23 958 pipe_unlock(pipe);
eb5e89fc70bb3f Masami Hiramatsu 2012-08-09 959 if (likely(ret > 0))
276a3e954cfe4d Sjur Brændeland 2012-12-14 960 ret = __send_to_port(port, buf->sg, sgl.n, sgl.len, buf, true);
eb5e89fc70bb3f Masami Hiramatsu 2012-08-09 961
fe5295374ec9ac Sjur Brændeland 2012-10-15 962 if (unlikely(ret <= 0))
1b6370463e88b0 Sjur Brændeland 2012-12-14 963 free_buf(buf, true);
eb5e89fc70bb3f Masami Hiramatsu 2012-08-09 964 return ret;
2b4fbf029dff5a Yoshihiro YUNOMAE 2013-07-23 965
2b4fbf029dff5a Yoshihiro YUNOMAE 2013-07-23 966 error_out:
2b4fbf029dff5a Yoshihiro YUNOMAE 2013-07-23 967 pipe_unlock(pipe);
2b4fbf029dff5a Yoshihiro YUNOMAE 2013-07-23 968 return ret;
eb5e89fc70bb3f Masami Hiramatsu 2012-08-09 969 }
eb5e89fc70bb3f Masami Hiramatsu 2012-08-09 970
:::::: The code@line 937 was first introduced by commit
:::::: 2b4fbf029dff5a28d9bf646346dea891ec43398a virtio/console: Add pipe_lock/unlock for splice_write
:::::: TO: Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com>
:::::: CC: Rusty Russell <rusty@rustcorp.com.au>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32486 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-10-23 17:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-23 17:58 [dhowells-fs:notifications-pipe-prep 4/10] drivers//char/virtio_console.c:937:2: note: in expansion of macro 'if' kbuild test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.