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_pp-Add-full-multi-port-NTB-API-support/20171204-025207
config: x86_64-randconfig-x004-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_pingpong.c: In function 'pp_ping':
>> drivers/ntb/test/ntb_pingpong.c:185:2: error: implicit declaration of 
>> function 'ntb_peer_msg_write'; did you mean 'ntb_peer_spad_write'? 
>> [-Werror=implicit-function-declaration]
     ntb_peer_msg_write(pp->ntb, pp->out_pidx, 0, count);
     ^~~~~~~~~~~~~~~~~~
     ntb_peer_spad_write
   drivers/ntb/test/ntb_pingpong.c: In function 'pp_pong':
>> drivers/ntb/test/ntb_pingpong.c:202:35: warning: passing argument 2 of 
>> 'ntb_msg_read' makes integer from pointer without a cast [-Wint-conversion]
     msg_data = ntb_msg_read(pp->ntb, &pidx, 0);
                                      ^
   In file included from drivers/ntb/test/ntb_pingpong.c:85: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_pingpong.c:202:13: error: too few arguments to function 
>> 'ntb_msg_read'
     msg_data = ntb_msg_read(pp->ntb, &pidx, 0);
                ^~~~~~~~~~~~
   In file included from drivers/ntb/test/ntb_pingpong.c:85:0:
   include/linux/ntb.h:1473:19: note: declared here
    static inline int ntb_msg_read(struct ntb_dev *ntb, int midx, int *pidx,
                      ^~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +185 drivers/ntb/test/ntb_pingpong.c

   176  
   177  static void pp_ping(struct pp_ctx *pp)
   178  {
   179          u32 count;
   180  
   181          count = atomic_read(&pp->count);
   182  
   183          spin_lock(&pp->lock);
   184          ntb_peer_spad_write(pp->ntb, pp->out_pidx, 0, count);
 > 185          ntb_peer_msg_write(pp->ntb, pp->out_pidx, 0, count);
   186  
   187          dev_dbg(&pp->ntb->dev, "Ping port %d spad %#x, msg %#x\n",
   188                  ntb_peer_port_number(pp->ntb, pp->out_pidx), count, 
count);
   189  
   190          ntb_peer_db_set(pp->ntb, pp->out_db);
   191          ntb_db_clear_mask(pp->ntb, pp->in_db);
   192          spin_unlock(&pp->lock);
   193  }
   194  
   195  static void pp_pong(struct pp_ctx *pp)
   196  {
   197          u32 msg_data = -1, spad_data = -1;
   198          int pidx = 0;
   199  
   200          /* Read pong data */
   201          spad_data = ntb_spad_read(pp->ntb, 0);
 > 202          msg_data = ntb_msg_read(pp->ntb, &pidx, 0);
   203          ntb_msg_clear_sts(pp->ntb, -1);
   204  
   205          /*
   206           * Scratchpad and message data may differ, since message 
register can't
   207           * be rewritten unless status is cleared. Additionally either 
of them
   208           * might be unsupported
   209           */
   210          dev_dbg(&pp->ntb->dev, "Pong spad %#x, msg %#x (port %d)\n",
   211                  spad_data, msg_data, ntb_peer_port_number(pp->ntb, 
pidx));
   212  
   213          atomic_inc(&pp->count);
   214  
   215          ntb_db_set_mask(pp->ntb, pp->in_db);
   216          ntb_db_clear(pp->ntb, pp->in_db);
   217  
   218          hrtimer_start(&pp->timer, ms_to_ktime(delay_ms), 
HRTIMER_MODE_REL);
   219  }
   220  

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

Attachment: .config.gz
Description: application/gzip

Reply via email to