tree:   https://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git 
nvmet-configfs-ng
head:   b75ad796462431e38bba0fb04d277fd83c919575
commit: b57da10630e0fb2243e901f2df910c5c980e922e [30/35] nvmet/configfs-ng: 
Introduce struct nvmet_port_binding
config: i386-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
reproduce:
        git checkout b57da10630e0fb2243e901f2df910c5c980e922e
        # save the attached .config to linux build tree
        make ARCH=i386 

Note: the target/nvmet-configfs-ng HEAD 
b75ad796462431e38bba0fb04d277fd83c919575 builds fine.
      It only hurts bisectibility.

All errors (new ones prefixed by >>):

   In file included from include/linux/notifier.h:13:0,
                    from include/linux/memory_hotplug.h:6,
                    from include/linux/mmzone.h:737,
                    from include/linux/gfp.h:5,
                    from include/linux/kmod.h:22,
                    from include/linux/module.h:13,
                    from drivers/nvme/target/configfs-ng.c:5:
   drivers/nvme/target/configfs-ng.c: In function 'nvmet_port_disable':
>> drivers/nvme/target/configfs-ng.c:253:18: error: 'struct nvmet_port' has no 
>> member named 'port_binding_mutex'; did you mean 'port_binding_list'?
     mutex_lock(&port->port_binding_mutex);
                     ^
   include/linux/mutex.h:146:44: note: in definition of macro 'mutex_lock'
    #define mutex_lock(lock) mutex_lock_nested(lock, 0)
                                               ^~~~
>> drivers/nvme/target/configfs-ng.c:255:19: error: 'struct nvmet_port_binding' 
>> has no member named 'subsys_node'
     list_del_init(&pb->subsys_node);
                      ^~
   drivers/nvme/target/configfs-ng.c:256:20: error: 'struct nvmet_port' has no 
member named 'port_binding_mutex'; did you mean 'port_binding_list'?
     mutex_unlock(&port->port_binding_mutex);
                       ^~
>> drivers/nvme/target/configfs-ng.c:262:19: error: passing argument 1 of 
>> 'ops->remove_port' from incompatible pointer type 
>> [-Werror=incompatible-pointer-types]
     ops->remove_port(pb);
                      ^~
   drivers/nvme/target/configfs-ng.c:262:19: note: expected 'struct nvmet_port 
*' but argument is of type 'struct nvmet_port_binding *'
   drivers/nvme/target/configfs-ng.c: In function 'nvmet_port_enable_store':
>> drivers/nvme/target/configfs-ng.c:302:22: error: passing argument 1 of 
>> 'ops->add_port' from incompatible pointer type 
>> [-Werror=incompatible-pointer-types]
      rc = ops->add_port(pb);
                         ^~
   drivers/nvme/target/configfs-ng.c:302:22: note: expected 'struct nvmet_port 
*' but argument is of type 'struct nvmet_port_binding *'
   In file included from include/linux/notifier.h:13:0,
                    from include/linux/memory_hotplug.h:6,
                    from include/linux/mmzone.h:737,
                    from include/linux/gfp.h:5,
                    from include/linux/kmod.h:22,
                    from include/linux/module.h:13,
                    from drivers/nvme/target/configfs-ng.c:5:
   drivers/nvme/target/configfs-ng.c:309:19: error: 'struct nvmet_port' has no 
member named 'port_binding_mutex'; did you mean 'port_binding_list'?
      mutex_lock(&port->port_binding_mutex);
                      ^
   include/linux/mutex.h:146:44: note: in definition of macro 'mutex_lock'
    #define mutex_lock(lock) mutex_lock_nested(lock, 0)
                                               ^~~~
   drivers/nvme/target/configfs-ng.c:311:20: error: 'struct nvmet_port_binding' 
has no member named 'subsys_node'
      list_add_tail(&pb->subsys_node, &port->port_binding_list);
                       ^~
   drivers/nvme/target/configfs-ng.c:312:21: error: 'struct nvmet_port' has no 
member named 'port_binding_mutex'; did you mean 'port_binding_list'?
      mutex_unlock(&port->port_binding_mutex);
                        ^~
   cc1: some warnings being treated as errors

vim +253 drivers/nvme/target/configfs-ng.c

   247          struct nvmet_subsys *subsys = pb->nf_subsys;
   248          struct nvmet_port *port = pb->port;
   249  
   250          if (!ops || !port)
   251                  return;
   252  
 > 253          mutex_lock(&port->port_binding_mutex);
   254          pb->enabled = false;
 > 255          list_del_init(&pb->subsys_node);
 > 256          mutex_unlock(&port->port_binding_mutex);
   257  
   258          mutex_lock(&subsys->pb_list_mutex);
   259          list_del_init(&pb->node);
   260          mutex_unlock(&subsys->pb_list_mutex);
   261  
 > 262          ops->remove_port(pb);
   263          nvmet_put_transport(&pb->disc_addr);
   264          pb->nf_ops = NULL;
   265  }
   266  
   267  static ssize_t nvmet_port_enable_show(struct config_item *item, char 
*page)
   268  {
   269          struct nvmet_port_binding *pb = to_nvmet_port_binding(item);
   270  
   271          return sprintf(page, "%d\n", pb->enabled);
   272  }
   273  
   274  static ssize_t nvmet_port_enable_store(struct config_item *item,
   275                  const char *page, size_t count)
   276  {
   277          struct nvmet_port *port;
   278          struct nvmet_port_binding *pb = to_nvmet_port_binding(item);
   279          struct nvmet_subsys *subsys = pb->nf_subsys;
   280          struct nvmet_fabrics_ops *ops;
   281          bool enable;
   282          int rc;
   283  
   284          printk("Entering port enable %d\n", pb->disc_addr.trtype);
   285  
   286          if (strtobool(page, &enable))
   287                  return -EINVAL;
   288  
   289          if (enable) {
   290                  if (pb->enabled) {
   291                          pr_warn("port already enabled: %d\n",
   292                                  pb->disc_addr.trtype);
   293                          goto out;
   294                  }
   295  
   296                  ops = nvmet_get_transport(&pb->disc_addr);
   297                  if (IS_ERR(ops))
   298                          return PTR_ERR(ops);
   299  
   300                  pb->nf_ops = ops;
   301  
 > 302                  rc = ops->add_port(pb);
   303                  if (rc) {
   304                          nvmet_put_transport(&pb->disc_addr);
   305                          return rc;

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

Attachment: .config.gz
Description: Binary data

Reply via email to