From: kbuild test robot <lkp@intel.com>
To: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Cc: kbuild-all@01.org, Ohad Ben-Cohen <ohad@wizery.com>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jslaby@suse.com>,
xiang xiao <xiaoxiang781216@gmail.com>,
linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org,
arnaud.pouliquen@st.com, Suman Anna <s-anna@ti.com>,
Fabien DESSENNE <fabien.dessenne@st.com>,
linux-stm32@st-md-mailman.stormreply.com,
Alan Cox <gnomes@lxorguk.ukuu.org.uk>
Subject: Re: [PATCH v5 2/2] tty: add rpmsg driver
Date: Fri, 30 Aug 2019 05:21:27 +0800 [thread overview]
Message-ID: <201908300408.EJgy8luZ%lkp@intel.com> (raw)
In-Reply-To: <1567005566-10986-3-git-send-email-arnaud.pouliquen@st.com>
Hi Arnaud,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[cannot apply to v5.3-rc6 next-20190829]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Arnaud-Pouliquen/rpmsg-core-add-API-to-get-message-length/20190829-222443
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-rc1-7-g2b96cd8-dirty
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
include/linux/sched.h:609:43: sparse: sparse: bad integer constant expression
include/linux/sched.h:609:73: sparse: sparse: invalid named zero-width bitfield `value'
include/linux/sched.h:610:43: sparse: sparse: bad integer constant expression
include/linux/sched.h:610:67: sparse: sparse: invalid named zero-width bitfield `bucket_id'
>> drivers/tty/rpmsg_tty.c:152:20: sparse: sparse: incompatible types in comparison expression (different type sizes):
>> drivers/tty/rpmsg_tty.c:152:20: sparse: int *
>> drivers/tty/rpmsg_tty.c:152:20: sparse: long *
vim +152 drivers/tty/rpmsg_tty.c
132
133 static int rpmsg_tty_write(struct tty_struct *tty, const u8 *buf, int len)
134 {
135 struct rpmsg_tty_port *cport = tty->driver_data;
136 struct rpmsg_device *rpdev;
137 ssize_t msg_max_size, msg_size;
138 int ret;
139 u8 *tmpbuf;
140
141 /* If cts not set, the message is not sent*/
142 if (!cport->cts)
143 return 0;
144
145 rpdev = cport->rpdev;
146
147 dev_dbg(&rpdev->dev, "%s: send msg from tty->index = %d, len = %d\n",
148 __func__, tty->index, len);
149
150 msg_max_size = rpmsg_get_mtu(rpdev->ept);
151
> 152 msg_size = min(len, msg_max_size);
153 tmpbuf = kzalloc(msg_size, GFP_KERNEL);
154 if (!tmpbuf)
155 return -ENOMEM;
156
157 memcpy(tmpbuf, buf, msg_size);
158
159 /*
160 * Try to send the message to remote processor, if failed return 0 as
161 * no data sent
162 */
163 ret = rpmsg_trysendto(cport->d_ept, tmpbuf, msg_size, cport->data_dst);
164 kfree(tmpbuf);
165 if (ret) {
166 dev_dbg(&rpdev->dev, "rpmsg_send failed: %d\n", ret);
167 return 0;
168 }
169
170 return msg_size;
171 }
172
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
prev parent reply other threads:[~2019-08-29 21:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-28 15:19 [PATCH v5 0/2] TTY: add rpmsg tty driver Arnaud Pouliquen
2019-08-28 15:19 ` [PATCH v5 1/2] rpmsg: core: add API to get message length Arnaud Pouliquen
2019-08-28 22:34 ` Suman Anna
2019-09-03 9:49 ` Arnaud Pouliquen
2019-09-03 16:06 ` Suman Anna
2019-09-04 8:14 ` Arnaud Pouliquen
2019-08-28 15:19 ` [PATCH v5 2/2] tty: add rpmsg driver Arnaud Pouliquen
2019-08-29 19:39 ` kbuild test robot
2019-08-29 21:21 ` kbuild test robot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201908300408.EJgy8luZ%lkp@intel.com \
--to=lkp@intel.com \
--cc=arnaud.pouliquen@st.com \
--cc=bjorn.andersson@linaro.org \
--cc=fabien.dessenne@st.com \
--cc=gnomes@lxorguk.ukuu.org.uk \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.com \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=ohad@wizery.com \
--cc=s-anna@ti.com \
--cc=xiaoxiang781216@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).