Hi Arnaud,

I love your patch! Perhaps something to improve:

[auto build test WARNING on next-20200730]
[also build test WARNING on v5.8]
[cannot apply to linux/master linus/master rpmsg/for-next v5.8-rc7 v5.8-rc6 
v5.8-rc5]
[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/Arnaud-Pouliquen/introduce-name-service-announcement-rpmsg-driver/20200731-195014
base:    7b287a5c6ac518c415a258f2aa7b1ebb25c263d2
compiler: nds32le-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>


cppcheck warnings: (new ones prefixed by >>)

>> drivers/rpmsg/rpmsg_ns.c:68:34: warning: Clarify calculation precedence for 
>> '&' and '?'. [clarifyCalculation]
      msg->flags & RPMSG_NS_DESTROY ? "destroy" : "creat",
                                    ^

vim +68 drivers/rpmsg/rpmsg_ns.c

    54  
    55          if (len != sizeof(*msg)) {
    56                  dev_err(dev, "malformed ns msg (%d)\n", len);
    57                  return -EINVAL;
    58          }
    59  
    60          /* don't trust the remote processor for null terminating the 
name */
    61          msg->name[RPMSG_NAME_SIZE - 1] = '\0';
    62  
    63          strncpy(chinfo.name, msg->name, sizeof(chinfo.name));
    64          chinfo.src = RPMSG_ADDR_ANY;
    65          chinfo.dst = msg->addr;
    66  
    67          dev_info(dev, "%sing channel %s addr 0x%x\n",
  > 68                   msg->flags & RPMSG_NS_DESTROY ? "destroy" : "creat",
    69                   msg->name, msg->addr);
    70  
    71          if (msg->flags & RPMSG_NS_DESTROY) {
    72                  ret = rpmsg_release_channel(rpdev, &chinfo);
    73                  if (ret)
    74                          dev_err(dev, "rpmsg_destroy_channel failed: 
%d\n", ret);
    75          } else {
    76                  newch = rpmsg_create_channel(rpdev, &chinfo);
    77                  if (!newch)
    78                          dev_err(dev, "rpmsg_create_channel failed\n");
    79          }
    80  
    81          return 0;
    82  }
    83  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Reply via email to