Hi Greg,

I love your patch! Perhaps something to improve:

[auto build test WARNING on staging/staging-testing]
[cannot apply to v5.1 next-20190517]
[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/Greg-Kroah-Hartman/staging-kpc2000-fix-a-bunch-of-orginization-and-header-file-issues/20190517-213909
reproduce:
        # apt-get install sparse
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

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


sparse warnings: (new ones prefixed by >>)

   drivers/staging/kpc2000/kpc2000/core.c:82:1: sparse: sparse: symbol 
'dev_attr_ssid' was not declared. Should it be static?
   drivers/staging/kpc2000/kpc2000/core.c:83:1: sparse: sparse: symbol 
'dev_attr_ddna' was not declared. Should it be static?
   drivers/staging/kpc2000/kpc2000/core.c:85:1: sparse: sparse: symbol 
'dev_attr_hw_rev' was not declared. Should it be static?
   drivers/staging/kpc2000/kpc2000/core.c:86:1: sparse: sparse: symbol 
'dev_attr_build' was not declared. Should it be static?
   drivers/staging/kpc2000/kpc2000/core.c:87:1: sparse: sparse: symbol 
'dev_attr_build_date' was not declared. Should it be static?
   drivers/staging/kpc2000/kpc2000/core.c:88:1: sparse: sparse: symbol 
'dev_attr_build_time' was not declared. Should it be static?
   drivers/staging/kpc2000/kpc2000/core.c:89:1: sparse: sparse: symbol 
'dev_attr_cpld_reg' was not declared. Should it be static?
   drivers/staging/kpc2000/kpc2000/core.c:90:1: sparse: sparse: symbol 
'dev_attr_cpld_reconfigure' was not declared. Should it be static?
   drivers/staging/kpc2000/kpc2000/core.c:194:14: sparse: sparse: symbol 
'kp2000_irq_handler' was not declared. Should it be static?
>> drivers/staging/kpc2000/kpc2000/core.c:285:37: sparse: sparse: incorrect 
>> type in argument 1 (different address spaces) @@    expected void [noderef] 
>> <asn:1> *to @@    got n:1> *to @@
>> drivers/staging/kpc2000/kpc2000/core.c:285:37: sparse:    expected void 
>> [noderef] <asn:1> *to
>> drivers/staging/kpc2000/kpc2000/core.c:285:37: sparse:    got void *

vim +285 drivers/staging/kpc2000/kpc2000/core.c

   259  
   260  static long kp2000_cdev_ioctl(struct file *filp, unsigned int ioctl_num,
   261                                unsigned long ioctl_param)
   262  {
   263          struct kp2000_device *pcard = filp->private_data;
   264  
   265          dev_dbg(&pcard->pdev->dev, "kp2000_cdev_ioctl(filp = [%p], 
ioctl_num = 0x%08x, ioctl_param = 0x%016lx) pcard = [%p]\n", filp, ioctl_num, 
ioctl_param, pcard);
   266  
   267          switch (ioctl_num){
   268          case KP2000_IOCTL_GET_CPLD_REG:             return 
readq(pcard->sysinfo_regs_base + REG_CPLD_CONFIG);
   269          case KP2000_IOCTL_GET_PCIE_ERROR_REG:       return 
readq(pcard->sysinfo_regs_base + REG_PCIE_ERROR_COUNT);
   270  
   271          case KP2000_IOCTL_GET_EVERYTHING: {
   272                  struct kp2000_regs temp;
   273                  int ret;
   274  
   275                  memset(&temp, 0, sizeof(temp));
   276                  temp.card_id = pcard->card_id;
   277                  temp.build_version = pcard->build_version;
   278                  temp.build_datestamp = pcard->build_datestamp;
   279                  temp.build_timestamp = pcard->build_timestamp;
   280                  temp.hw_rev = pcard->hardware_revision;
   281                  temp.ssid = pcard->ssid;
   282                  temp.ddna = pcard->ddna;
   283                  temp.cpld_reg = readq(pcard->sysinfo_regs_base + 
REG_CPLD_CONFIG);
   284  
 > 285                  ret = copy_to_user((void*)ioctl_param, (void*)&temp, 
 > sizeof(temp));
   286                  if (ret)
   287                          return -EFAULT;
   288  
   289                  return sizeof(temp);
   290                  }
   291  
   292          default:
   293                  return -ENOTTY;
   294          }
   295          return -ENOTTY;
   296  }
   297  

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to