tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   69119673bd50b176ded34032fadd41530fb5af21
commit: e383085c24255821e79d3c2aa6302d804b6a1c48 RDMA/mlx5: Set ECE options 
during QP create
date:   3 weeks ago
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
        git checkout e383085c24255821e79d3c2aa6302d804b6a1c48
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

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

All warnings (new ones prefixed by >>, old ones prefixed by <<):

In file included from include/linux/printk.h:326,
from include/linux/kernel.h:15,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/infiniband/hw/mlx5/qp.c:33:
drivers/infiniband/hw/mlx5/qp.c: In function 'check_ucmd_data':
>> drivers/infiniband/hw/mlx5/mlx5_ib.h:56:31: warning: format '%lu' expects 
>> argument of type 'long unsigned int', but argument 7 has type 'size_t' {aka 
>> 'unsigned int'} [-Wformat=]
56 |  dev_dbg(&(_dev)->ib_dev.dev, "%s:%d:(pid %d): " format, __func__,         
      |                               ^~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:125:15: note: in definition of macro 
'__dynamic_func_call'
125 |   func(&id, ##__VA_ARGS__);           |               ^~~~~~~~~~~
include/linux/dynamic_debug.h:157:2: note: in expansion of macro 
'_dynamic_func_call'
157 |  _dynamic_func_call(fmt,__dynamic_dev_dbg,            |  
^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:114:2: note: in expansion of macro 'dynamic_dev_dbg'
114 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
|  ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:114:23: note: in expansion of macro 'dev_fmt'
114 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
|                       ^~~~~~~
>> drivers/infiniband/hw/mlx5/mlx5_ib.h:56:2: note: in expansion of macro 
>> 'dev_dbg'
56 |  dev_dbg(&(_dev)->ib_dev.dev, "%s:%d:(pid %d): " format, __func__,         
      |  ^~~~~~~
>> drivers/infiniband/hw/mlx5/qp.c:2904:3: note: in expansion of macro 
>> 'mlx5_ib_dbg'
2904 |   mlx5_ib_dbg(
|   ^~~~~~~~~~~
drivers/infiniband/hw/mlx5/qp.c:2906:37: note: format string is defined here
2906 |    "udata is not cleared, inlen = %lu, ucmd = %lu, last = %lu, size = 
%lun",
|                                   ~~^
|                                     |
|                                     long unsigned int
|                                   %u
In file included from include/linux/printk.h:326,
from include/linux/kernel.h:15,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/infiniband/hw/mlx5/qp.c:33:
drivers/infiniband/hw/mlx5/mlx5_ib.h:56:31: warning: format '%lu' expects 
argument of type 'long unsigned int', but argument 8 has type 'size_t' {aka 
'unsigned int'} [-Wformat=]
56 |  dev_dbg(&(_dev)->ib_dev.dev, "%s:%d:(pid %d): " format, __func__,         
      |                               ^~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:125:15: note: in definition of macro 
'__dynamic_func_call'
125 |   func(&id, ##__VA_ARGS__);           |               ^~~~~~~~~~~
include/linux/dynamic_debug.h:157:2: note: in expansion of macro 
'_dynamic_func_call'
157 |  _dynamic_func_call(fmt,__dynamic_dev_dbg,            |  
^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:114:2: note: in expansion of macro 'dynamic_dev_dbg'
114 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
|  ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:114:23: note: in expansion of macro 'dev_fmt'
114 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
|                       ^~~~~~~
>> drivers/infiniband/hw/mlx5/mlx5_ib.h:56:2: note: in expansion of macro 
>> 'dev_dbg'
56 |  dev_dbg(&(_dev)->ib_dev.dev, "%s:%d:(pid %d): " format, __func__,         
      |  ^~~~~~~
>> drivers/infiniband/hw/mlx5/qp.c:2904:3: note: in expansion of macro 
>> 'mlx5_ib_dbg'
2904 |   mlx5_ib_dbg(
|   ^~~~~~~~~~~
drivers/infiniband/hw/mlx5/qp.c:2906:49: note: format string is defined here
2906 |    "udata is not cleared, inlen = %lu, ucmd = %lu, last = %lu, size = 
%lun",
|                                               ~~^
|                                                 |
|                                                 long unsigned int
|                                               %u
In file included from include/linux/printk.h:326,
from include/linux/kernel.h:15,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/infiniband/hw/mlx5/qp.c:33:
drivers/infiniband/hw/mlx5/mlx5_ib.h:56:31: warning: format '%lu' expects 
argument of type 'long unsigned int', but argument 9 has type 'size_t' {aka 
'unsigned int'} [-Wformat=]
56 |  dev_dbg(&(_dev)->ib_dev.dev, "%s:%d:(pid %d): " format, __func__,         
      |                               ^~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:125:15: note: in definition of macro 
'__dynamic_func_call'
125 |   func(&id, ##__VA_ARGS__);           |               ^~~~~~~~~~~
include/linux/dynamic_debug.h:157:2: note: in expansion of macro 
'_dynamic_func_call'
157 |  _dynamic_func_call(fmt,__dynamic_dev_dbg,            |  
^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:114:2: note: in expansion of macro 'dynamic_dev_dbg'
114 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
|  ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:114:23: note: in expansion of macro 'dev_fmt'
114 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
|                       ^~~~~~~
>> drivers/infiniband/hw/mlx5/mlx5_ib.h:56:2: note: in expansion of macro 
>> 'dev_dbg'
56 |  dev_dbg(&(_dev)->ib_dev.dev, "%s:%d:(pid %d): " format, __func__,         
      |  ^~~~~~~
>> drivers/infiniband/hw/mlx5/qp.c:2904:3: note: in expansion of macro 
>> 'mlx5_ib_dbg'
2904 |   mlx5_ib_dbg(
|   ^~~~~~~~~~~
drivers/infiniband/hw/mlx5/qp.c:2906:61: note: format string is defined here
2906 |    "udata is not cleared, inlen = %lu, ucmd = %lu, last = %lu, size = 
%lun",
|                                                           ~~^
|                                                             |
|                                                             long unsigned int
|                                                           %u
In file included from include/linux/printk.h:326,
from include/linux/kernel.h:15,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/infiniband/hw/mlx5/qp.c:33:
drivers/infiniband/hw/mlx5/mlx5_ib.h:56:31: warning: format '%lu' expects 
argument of type 'long unsigned int', but argument 10 has type 'size_t' {aka 
'unsigned int'} [-Wformat=]
56 |  dev_dbg(&(_dev)->ib_dev.dev, "%s:%d:(pid %d): " format, __func__,         
      |                               ^~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:125:15: note: in definition of macro 
'__dynamic_func_call'
125 |   func(&id, ##__VA_ARGS__);           |               ^~~~~~~~~~~
include/linux/dynamic_debug.h:157:2: note: in expansion of macro 
'_dynamic_func_call'
157 |  _dynamic_func_call(fmt,__dynamic_dev_dbg,            |  
^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:114:2: note: in expansion of macro 'dynamic_dev_dbg'
114 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
|  ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:114:23: note: in expansion of macro 'dev_fmt'
114 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
|                       ^~~~~~~
>> drivers/infiniband/hw/mlx5/mlx5_ib.h:56:2: note: in expansion of macro 
>> 'dev_dbg'
56 |  dev_dbg(&(_dev)->ib_dev.dev, "%s:%d:(pid %d): " format, __func__,         
      |  ^~~~~~~
>> drivers/infiniband/hw/mlx5/qp.c:2904:3: note: in expansion of macro 
>> 'mlx5_ib_dbg'
2904 |   mlx5_ib_dbg(
|   ^~~~~~~~~~~
drivers/infiniband/hw/mlx5/qp.c:2906:73: note: format string is defined here
2906 |    "udata is not cleared, inlen = %lu, ucmd = %lu, last = %lu, size = 
%lun",
|                                                                       ~~^
|                                                                         |
|                                                                         long 
unsigned int
|                                                                       %u

vim +/mlx5_ib_dbg +2904 drivers/infiniband/hw/mlx5/qp.c

  2867  
  2868  static int check_ucmd_data(struct mlx5_ib_dev *dev,
  2869                             struct mlx5_create_qp_params *params)
  2870  {
  2871          struct ib_qp_init_attr *attr = params->attr;
  2872          struct ib_udata *udata = params->udata;
  2873          size_t size, last;
  2874          int ret;
  2875  
  2876          if (params->is_rss_raw)
  2877                  /*
  2878                   * These QPs don't have "reserved" field in their
  2879                   * create_qp input struct, so their data is always 
valid.
  2880                   */
  2881                  last = sizeof(struct mlx5_ib_create_qp_rss);
  2882          else
  2883                  /* IB_QPT_RAW_PACKET and IB_QPT_DRIVER don't have ECE 
data */
  2884                  switch (attr->qp_type) {
  2885                  case IB_QPT_DRIVER:
  2886                  case IB_QPT_RAW_PACKET:
  2887                          last = offsetof(struct mlx5_ib_create_qp, 
ece_options);
  2888                          break;
  2889                  default:
  2890                          last = offsetof(struct mlx5_ib_create_qp, 
reserved);
  2891                  }
  2892  
  2893          if (udata->inlen <= last)
  2894                  return 0;
  2895  
  2896          /*
  2897           * User provides different create_qp structures based on the
  2898           * flow and we need to know if he cleared memory after our
  2899           * struct create_qp ends.
  2900           */
  2901          size = udata->inlen - last;
  2902          ret = ib_is_udata_cleared(params->udata, last, size);
  2903          if (!ret)
> 2904                  mlx5_ib_dbg(
  2905                          dev,
  2906                          "udata is not cleared, inlen = %lu, ucmd = %lu, 
last = %lu, size = %lu\n",
  2907                          udata->inlen, params->ucmd_size, last, size);
  2908          return ret ? 0 : -EINVAL;
  2909  }
  2910  

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

Attachment: .config.gz
Description: application/gzip

Reply via email to