lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201712031710.MwubOnCi%fengguang.wu@intel.com>
Date:   Sun, 3 Dec 2017 17:45:16 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Serge Semin <fancer.lancer@...il.com>
Cc:     kbuild-all@...org, jdmason@...zu.us, dave.jiang@...el.com,
        Allen.Hubbe@....com, Shyam-sundar.S-k@....com,
        Xiangliang.Yu@....com, Sergey.Semin@...latforms.ru,
        linux-ntb@...glegroups.com, linux-kernel@...r.kernel.org,
        Serge Semin <fancer.lancer@...il.com>
Subject: Re: [PATCH v2] NTB: ntb_tool: Add full multi-port NTB API support

Hi Serge,

I love your patch! Yet something to improve:

[auto build test ERROR on v4.15-rc1]
[cannot apply to ntb/ntb-next next-20171201]
[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/Serge-Semin/NTB-ntb_tool-Add-full-multi-port-NTB-API-support/20171203-171239
config: x86_64-randconfig-x012-201749 (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All error/warnings (new ones prefixed by >>):

   drivers/ntb/test/ntb_tool.c: In function 'tool_inmsg_read':
>> drivers/ntb/test/ntb_tool.c:1276:36: warning: passing argument 2 of 'ntb_msg_read' makes integer from pointer without a cast [-Wint-conversion]
     data = ntb_msg_read(msg->tc->ntb, &pidx, msg->midx);
                                       ^
   In file included from drivers/ntb/test/ntb_tool.c:193:0:
   include/linux/ntb.h:1473:19: note: expected 'int' but argument is of type 'int *'
    static inline int ntb_msg_read(struct ntb_dev *ntb, int midx, int *pidx,
                      ^~~~~~~~~~~~
>> drivers/ntb/test/ntb_tool.c:1276:43: warning: passing argument 3 of 'ntb_msg_read' makes pointer from integer without a cast [-Wint-conversion]
     data = ntb_msg_read(msg->tc->ntb, &pidx, msg->midx);
                                              ^~~
   In file included from drivers/ntb/test/ntb_tool.c:193:0:
   include/linux/ntb.h:1473:19: note: expected 'int *' but argument is of type 'int'
    static inline int ntb_msg_read(struct ntb_dev *ntb, int midx, int *pidx,
                      ^~~~~~~~~~~~
>> drivers/ntb/test/ntb_tool.c:1276:9: error: too few arguments to function 'ntb_msg_read'
     data = ntb_msg_read(msg->tc->ntb, &pidx, msg->midx);
            ^~~~~~~~~~~~
   In file included from drivers/ntb/test/ntb_tool.c:193:0:
   include/linux/ntb.h:1473:19: note: declared here
    static inline int ntb_msg_read(struct ntb_dev *ntb, int midx, int *pidx,
                      ^~~~~~~~~~~~
   drivers/ntb/test/ntb_tool.c: In function 'tool_outmsg_write':
>> drivers/ntb/test/ntb_tool.c:1299:8: error: implicit declaration of function 'ntb_peer_msg_write'; did you mean 'ntb_peer_spad_write'? [-Werror=implicit-function-declaration]
     ret = ntb_peer_msg_write(msg->tc->ntb, msg->pidx, msg->midx, val);
           ^~~~~~~~~~~~~~~~~~
           ntb_peer_spad_write
   In file included from include/linux/init.h:5:0,
                    from drivers/ntb/test/ntb_tool.c:183:
   drivers/ntb/test/ntb_tool.c: At top level:
   include/linux/compiler.h:64:4: warning: '______f' is static but declared in inline function 'strcpy' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:422:2: note: in expansion of macro 'if'
     if (p_size == (size_t)-1 && q_size == (size_t)-1)
     ^~
   include/linux/compiler.h:64:4: warning: '______f' is static but declared in inline function 'kmemdup' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:412:2: note: in expansion of macro 'if'
     if (p_size < size)
     ^~
   include/linux/compiler.h:64:4: warning: '______f' is static but declared in inline function 'kmemdup' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:410:2: note: in expansion of macro 'if'
     if (__builtin_constant_p(size) && p_size < size)
     ^~
   include/linux/compiler.h:64:4: warning: '______f' is static but declared in inline function 'memchr_inv' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:401:2: note: in expansion of macro 'if'
     if (p_size < size)
     ^~
   include/linux/compiler.h:64:4: warning: '______f' is static but declared in inline function 'memchr_inv' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:399:2: note: in expansion of macro 'if'
     if (__builtin_constant_p(size) && p_size < size)
     ^~
   include/linux/compiler.h:64:4: warning: '______f' is static but declared in inline function 'memchr' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:390:2: note: in expansion of macro 'if'
     if (p_size < size)
     ^~
   include/linux/compiler.h:64:4: warning: '______f' is static but declared in inline function 'memchr' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:388:2: note: in expansion of macro 'if'
     if (__builtin_constant_p(size) && p_size < size)
     ^~
   include/linux/compiler.h:64:4: warning: '______f' is static but declared in inline function 'memcmp' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:380:2: note: in expansion of macro 'if'
     if (p_size < size || q_size < size)
     ^~
   include/linux/compiler.h:64:4: warning: '______f' is static but declared in inline function 'memcmp' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:377:3: note: in expansion of macro 'if'
      if (q_size < size)
      ^~
   include/linux/compiler.h:64:4: warning: '______f' is static but declared in inline function 'memcmp' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:375:3: note: in expansion of macro 'if'
      if (p_size < size)
      ^~
   include/linux/compiler.h:64:4: warning: '______f' is static but declared in inline function 'memcmp' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'

vim +/ntb_msg_read +1276 drivers/ntb/test/ntb_tool.c

  1261	
  1262	/*==============================================================================
  1263	 *                       Messages read/write methods
  1264	 *==============================================================================
  1265	 */
  1266	
  1267	static ssize_t tool_inmsg_read(struct file *filep, char __user *ubuf,
  1268				       size_t size, loff_t *offp)
  1269	{
  1270		struct tool_msg *msg = filep->private_data;
  1271		char buf[32];
  1272		ssize_t pos;
  1273		u32 data;
  1274		int pidx;
  1275	
> 1276		data = ntb_msg_read(msg->tc->ntb, &pidx, msg->midx);
  1277	
  1278		pos = scnprintf(buf, sizeof(buf), "0x%08x<-%d\n", data, pidx);
  1279	
  1280		return simple_read_from_buffer(ubuf, size, offp, buf, pos);
  1281	}
  1282	
  1283	static TOOL_FOPS_RDWR(tool_inmsg_fops,
  1284			      tool_inmsg_read,
  1285			      NULL);
  1286	
  1287	static ssize_t tool_outmsg_write(struct file *filep,
  1288					 const char __user *ubuf,
  1289					 size_t size, loff_t *offp)
  1290	{
  1291		struct tool_msg *msg = filep->private_data;
  1292		u32 val;
  1293		int ret;
  1294	
  1295		ret = kstrtou32_from_user(ubuf, size, 0, &val);
  1296		if (ret)
  1297			return ret;
  1298	
> 1299		ret = ntb_peer_msg_write(msg->tc->ntb, msg->pidx, msg->midx, val);
  1300	
  1301		return ret ? : size;
  1302	}
  1303	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (25439 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ