Hi Benson,

I love your patch! Yet something to improve:

[auto build test ERROR on usb/usb-testing]
[also build test ERROR on chrome-platform-linux/for-next linus/master v5.10-rc2 
next-20201102]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    
https://github.com/0day-ci/linux/commits/Benson-Leung/typec-Provide-USB-PD-Specification-Revision-for-cable-and-partner/20201030-124250
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git 
usb-testing
config: arm-randconfig-r033-20201030 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 
fa5a13276764a2657b3571fa3c57b07ee5d2d661)
reproduce (this is a W=1 build):
        wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # 
https://github.com/0day-ci/linux/commit/dca7134400af678fe4f5e4d94a7ec74487d9fcc1
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review 
Benson-Leung/typec-Provide-USB-PD-Specification-Revision-for-cable-and-partner/20201030-124250
        git checkout dca7134400af678fe4f5e4d94a7ec74487d9fcc1
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <l...@intel.com>

All errors (new ones prefixed by >>):

>> drivers/usb/typec/class.c:168:1: error: non-void function does not return a 
>> value in all control paths [-Werror,-Wreturn-type]
   }
   ^
   1 error generated.

vim +168 drivers/usb/typec/class.c

   150  
   151  static ssize_t usb_power_delivery_revision_show(struct device *dev,
   152                                                  struct device_attribute 
*attr,
   153                                                  char *buf)
   154  {
   155          if (is_typec_partner(dev)) {
   156                  struct typec_partner *partner = to_typec_partner(dev);
   157  
   158                  return sprintf(buf, "%d\n", (partner->pd_revision >> 8) 
& 0xff);
   159          } else if (is_typec_cable(dev)) {
   160                  struct typec_cable *cable = to_typec_cable(dev);
   161  
   162                  return sprintf(buf, "%d\n", (cable->pd_revision >> 8) & 
0xff);
   163          } else if (is_typec_port(dev)) {
   164                  struct typec_port *p = to_typec_port(dev);
   165  
   166                  return sprintf(buf, "%d\n", (p->cap->pd_revision >> 8) 
& 0xff);
   167          }
 > 168  }
   169  static DEVICE_ATTR_RO(usb_power_delivery_revision);
   170  
   171  
   172  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org

Attachment: .config.gz
Description: application/gzip

Reply via email to