lkml.org 
[lkml]   [2020]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 08/10] rpmsg: core: Add RPMSG byte conversion operations
Hi Mathieu,

url: https://github.com/0day-ci/linux/commits/Mathieu-Poirier/rpmsg-Make-RPMSG-name-service-modular/20200922-081745
base: b10b8ad862118bf42c28a98b0f067619aadcfb23
config: i386-randconfig-m021-20200923 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/rpmsg/rpmsg_core.c:33 rpmsg16_to_cpu() warn: signedness bug returning '(-22)'
drivers/rpmsg/rpmsg_core.c:44 cpu_to_rpmsg16() warn: signedness bug returning '(-22)'

# https://github.com/0day-ci/linux/commit/547ad00c50065bf914ac4090882d0ac692f5452d
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Mathieu-Poirier/rpmsg-Make-RPMSG-name-service-modular/20200922-081745
git checkout 547ad00c50065bf914ac4090882d0ac692f5452d
vim +33 drivers/rpmsg/rpmsg_core.c

547ad00c50065bf Mathieu Poirier 2020-09-21 30 u16 rpmsg16_to_cpu(struct rpmsg_device *rpdev, u16 val)
^^^

547ad00c50065bf Mathieu Poirier 2020-09-21 31 {
547ad00c50065bf Mathieu Poirier 2020-09-21 32 if (WARN_ON(!rpdev))
547ad00c50065bf Mathieu Poirier 2020-09-21 @33 return -EINVAL;
^^^^^^^^^^^^^^
All the negative returns get truncated to a high u16 value.

547ad00c50065bf Mathieu Poirier 2020-09-21 34 if (!rpdev->ops || !rpdev->ops->transport16_to_cpu)
547ad00c50065bf Mathieu Poirier 2020-09-21 35 return -EPERM;
^^^^^^^^^^^^^^
547ad00c50065bf Mathieu Poirier 2020-09-21 36
547ad00c50065bf Mathieu Poirier 2020-09-21 37 return rpdev->ops->transport16_to_cpu(rpdev, val);
547ad00c50065bf Mathieu Poirier 2020-09-21 38 }
547ad00c50065bf Mathieu Poirier 2020-09-21 39 EXPORT_SYMBOL(rpmsg16_to_cpu);
547ad00c50065bf Mathieu Poirier 2020-09-21 40
547ad00c50065bf Mathieu Poirier 2020-09-21 41 u16 cpu_to_rpmsg16(struct rpmsg_device *rpdev, u16 val)
547ad00c50065bf Mathieu Poirier 2020-09-21 42 {
547ad00c50065bf Mathieu Poirier 2020-09-21 43 if (WARN_ON(!rpdev))
547ad00c50065bf Mathieu Poirier 2020-09-21 @44 return -EINVAL;
^^^^^^^^^^^^^^
547ad00c50065bf Mathieu Poirier 2020-09-21 45 if (!rpdev->ops || !rpdev->ops->cpu_to_transport16)
547ad00c50065bf Mathieu Poirier 2020-09-21 46 return -EPERM;
^^^^^^^^^^^^^
547ad00c50065bf Mathieu Poirier 2020-09-21 47
547ad00c50065bf Mathieu Poirier 2020-09-21 48 return rpdev->ops->cpu_to_transport16(rpdev, val);
547ad00c50065bf Mathieu Poirier 2020-09-21 49 }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2020-09-23 13:57    [W:0.285 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site