Hi Bjørn,

I love your patch! Perhaps something to improve:

[auto build test WARNING on peter.chen-usb/ci-for-usb-next]
[also build test WARNING on v4.19-rc5 next-20180928]
[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/Bj-rn-Mork/usb-export-firmware-port-location-in-sysfs/20180928-192720
base:   https://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git 
ci-for-usb-next
config: i386-randconfig-x005-201838 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   In file included from include/linux/pm_qos.h:10:0,
                    from drivers/usb//core/port.c:11:
   include/linux/device.h:598:26: warning: 'dev_attr_location' defined but not 
used [-Wunused-variable]
     struct device_attribute dev_attr_##_name = __ATTR_RO(_name)
                             ^
>> drivers/usb//core/port.c:26:8: note: in expansion of macro 'DEVICE_ATTR_RO'
    static DEVICE_ATTR_RO(location);
           ^~~~~~~~~~~~~~

vim +/DEVICE_ATTR_RO +26 drivers/usb//core/port.c

  > 11  #include <linux/pm_qos.h>
    12  
    13  #include "hub.h"
    14  
    15  static int usb_port_block_power_off;
    16  
    17  static const struct attribute_group *port_dev_group[];
    18  
    19  static ssize_t location_show(struct device *dev,
    20                               struct device_attribute *attr, char *buf)
    21  {
    22          struct usb_port *port_dev = to_usb_port(dev);
    23  
    24          return sprintf(buf, "0x%08x\n", port_dev->location);
    25  }
  > 26  static DEVICE_ATTR_RO(location);
    27  

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