Hi Florian,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on driver-core/driver-core-testing]
[also build test ERROR on v4.17-rc5 next-20180515]
[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/Florian-Schmaus/return-EINVAL-error-instead-of-BUG_ON/20180516-141149
config: i386-randconfig-a0-201819 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/base/driver.c: In function 'driver_register':
>> drivers/base/driver.c:154:26: error: 'struct bus_type' has no member named 
>> 'bus_register_retval'
          drv->name, drv->bus->bus_register_retval);
                             ^

vim +154 drivers/base/driver.c

   137  
   138  /**
   139   * driver_register - register driver with bus
   140   * @drv: driver to register
   141   *
   142   * We pass off most of the work to the bus_add_driver() call,
   143   * since most of the things we have to do deal with the bus
   144   * structures.
   145   */
   146  int driver_register(struct device_driver *drv)
   147  {
   148          int ret;
   149          struct device_driver *other;
   150  
   151          if (!drv->bus->p) {
   152                  printk(KERN_ERR "Driver '%s' was unable to register 
bus_type "
   153                             "(error: %d)\n",
 > 154                             drv->name, drv->bus->bus_register_retval);
   155                  return -EINVAL;
   156          }
   157  
   158          if ((drv->bus->probe && drv->probe) ||
   159              (drv->bus->remove && drv->remove) ||
   160              (drv->bus->shutdown && drv->shutdown))
   161                  printk(KERN_WARNING "Driver '%s' needs updating - 
please use "
   162                          "bus_type methods\n", drv->name);
   163  
   164          other = driver_find(drv->name, drv->bus);
   165          if (other) {
   166                  printk(KERN_ERR "Error: Driver '%s' is already 
registered, "
   167                          "aborting...\n", drv->name);
   168                  return -EBUSY;
   169          }
   170  
   171          ret = bus_add_driver(drv);
   172          if (ret)
   173                  return ret;
   174          ret = driver_add_groups(drv, drv->groups);
   175          if (ret) {
   176                  bus_remove_driver(drv);
   177                  return ret;
   178          }
   179          kobject_uevent(&drv->p->kobj, KOBJ_ADD);
   180  
   181          return ret;
   182  }
   183  EXPORT_SYMBOL_GPL(driver_register);
   184  

---
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