[lkml]   [2017]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] rpmsg: Make rpmsg_create_ept() propagate error
Hi Bjorn,

[auto build test WARNING on next-20170505]
[also build test WARNING on v4.11]
[cannot apply to v4.9-rc8 v4.9-rc7 v4.9-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

config: arm-multi_v7_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705
wget -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm

All warnings (new ones prefixed by >>):

drivers/rpmsg/virtio_rpmsg_bus.c:227:31: sparse: incorrect type in return expression (different base types)
drivers/rpmsg/virtio_rpmsg_bus.c:227:31: expected struct rpmsg_endpoint *
drivers/rpmsg/virtio_rpmsg_bus.c:227:31: got long
drivers/rpmsg/virtio_rpmsg_bus.c: In function '__rpmsg_create_ept':
>> drivers/rpmsg/virtio_rpmsg_bus.c:227:18: warning: passing argument 1 of 'PTR_ERR' makes pointer from integer without a cast [-Wint-conversion]
return PTR_ERR(-ENOMEM);
In file included from include/linux/rwsem.h:17:0,
from include/linux/notifier.h:14,
from include/linux/memory_hotplug.h:6,
from include/linux/mmzone.h:757,
from include/linux/gfp.h:5,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from drivers/rpmsg/virtio_rpmsg_bus.c:23:
include/linux/err.h:28:33: note: expected 'const void *' but argument is of type 'int'
static inline long __must_check PTR_ERR(__force const void *ptr)
>> drivers/rpmsg/virtio_rpmsg_bus.c:227:10: warning: return makes pointer from integer without a cast [-Wint-conversion]
return PTR_ERR(-ENOMEM);

vim +/PTR_ERR +227 drivers/rpmsg/virtio_rpmsg_bus.c

211 */
212 kfree(ept);
213 }
215 /* for more info, see below documentation of rpmsg_create_ept() */
216 static struct rpmsg_endpoint *__rpmsg_create_ept(struct virtproc_info *vrp,
217 struct rpmsg_device *rpdev,
218 rpmsg_rx_cb_t cb,
219 void *priv, u32 addr)
220 {
221 int id_min, id_max, id;
222 struct rpmsg_endpoint *ept;
223 struct device *dev = rpdev ? &rpdev->dev : &vrp->vdev->dev;
225 ept = kzalloc(sizeof(*ept), GFP_KERNEL);
226 if (!ept)
> 227 return PTR_ERR(-ENOMEM);
229 kref_init(&ept->refcount);
230 mutex_init(&ept->cb_lock);
232 ept->rpdev = rpdev;
233 ept->cb = cb;
234 ept->priv = priv;
235 ept->ops = &virtio_endpoint_ops;

0-DAY kernel test infrastructure Open Source Technology Center Intel Corporation
[unhandled content-type:application/gzip]
 \ /
  Last update: 2017-05-10 21:17    [W:2.765 / U:6.436 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site