Re: [Xen-devel] [PATCH v4] scsi: xen-scsifront: add error handling for xenbus_printf

2018-06-15 Thread kbuild test robot
Hi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on xen-tip/linux-next]
[also build test ERROR on v4.17 next-20180615]
[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/linux-kernel-owner-vger-kernel-org/scsi-xen-scsifront-add-error-handling-for-xenbus_printf/20180615-094919
base:   https://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git linux-next
config: x86_64-fedora-25 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers//scsi/xen-scsifront.c: In function 'scsifront_sdev_configure':
>> drivers//scsi/xen-scsifront.c:663:21: error: passing argument 1 of 
>> 'xenbus_dev_error' from incompatible pointer type 
>> [-Werror=incompatible-pointer-types]
   xenbus_dev_error(>dev, err,
^
   In file included from drivers//scsi/xen-scsifront.c:50:0:
   include/xen/xenbus.h:224:6: note: expected 'struct xenbus_device *' but 
argument is of type 'struct xenbus_device **'
void xenbus_dev_error(struct xenbus_device *dev, int err, const char *fmt, 
...);
 ^~~~
   drivers//scsi/xen-scsifront.c: In function 'scsifront_sdev_destroy':
   drivers//scsi/xen-scsifront.c:681:21: error: passing argument 1 of 
'xenbus_dev_error' from incompatible pointer type 
[-Werror=incompatible-pointer-types]
   xenbus_dev_error(>dev, err,
^
   In file included from drivers//scsi/xen-scsifront.c:50:0:
   include/xen/xenbus.h:224:6: note: expected 'struct xenbus_device *' but 
argument is of type 'struct xenbus_device **'
void xenbus_dev_error(struct xenbus_device *dev, int err, const char *fmt, 
...);
 ^~~~
   cc1: some warnings being treated as errors

vim +/xenbus_dev_error +663 drivers//scsi/xen-scsifront.c

   653  
   654  static int scsifront_sdev_configure(struct scsi_device *sdev)
   655  {
   656  struct vscsifrnt_info *info = shost_priv(sdev->host);
   657  int err;
   658  
   659  if (info && current == info->curr) {
   660  err = xenbus_printf(XBT_NIL, info->dev->nodename,
   661info->dev_state_path, "%d", 
XenbusStateConnected);
   662  if (err) {
 > 663  xenbus_dev_error(>dev, err,
   664  "%s: writing dev_state_path", __func__);
   665  return err;
   666  }
   667  }
   668  
   669  return 0;
   670  }
   671  

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


.config.gz
Description: application/gzip
___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH v4] scsi: xen-scsifront: add error handling for xenbus_printf

2018-06-15 Thread kbuild test robot
Hi,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on xen-tip/linux-next]
[also build test WARNING on v4.17 next-20180614]
[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/linux-kernel-owner-vger-kernel-org/scsi-xen-scsifront-add-error-handling-for-xenbus_printf/20180615-094919
base:   https://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git linux-next
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

   drivers/scsi/xen-scsifront.c:267:21: sparse: expression using sizeof(void)
   drivers/scsi/xen-scsifront.c:440:33: sparse: expression using sizeof(void)
   drivers/scsi/xen-scsifront.c:440:33: sparse: expression using sizeof(void)
   drivers/scsi/xen-scsifront.c:473:33: sparse: expression using sizeof(void)
   drivers/scsi/xen-scsifront.c:473:33: sparse: expression using sizeof(void)
   drivers/scsi/xen-scsifront.c:474:33: sparse: expression using sizeof(void)
   drivers/scsi/xen-scsifront.c:474:33: sparse: expression using sizeof(void)
>> drivers/scsi/xen-scsifront.c:663:43: sparse: incorrect type in argument 1 
>> (different base types) @@expected struct xenbus_device *dev @@got 
>> sstruct xenbus_device *dev @@
   drivers/scsi/xen-scsifront.c:663:43:expected struct xenbus_device *dev
   drivers/scsi/xen-scsifront.c:663:43:got struct xenbus_device **
   drivers/scsi/xen-scsifront.c:681:43: sparse: incorrect type in argument 1 
(different base types) @@expected struct xenbus_device *dev @@got 
sstruct xenbus_device *dev @@
   drivers/scsi/xen-scsifront.c:681:43:expected struct xenbus_device *dev
   drivers/scsi/xen-scsifront.c:681:43:got struct xenbus_device **
   drivers/scsi/xen-scsifront.c:1063:19: sparse: expression using sizeof(void)
   drivers/scsi/xen-scsifront.c:1064:19: sparse: expression using sizeof(void)
   drivers/scsi/xen-scsifront.c:1065:19: sparse: expression using sizeof(void)
   drivers/scsi/xen-scsifront.c: In function 'scsifront_sdev_configure':
   drivers/scsi/xen-scsifront.c:663:21: error: passing argument 1 of 
'xenbus_dev_error' from incompatible pointer type 
[-Werror=incompatible-pointer-types]
   xenbus_dev_error(>dev, err,
^
   In file included from drivers/scsi/xen-scsifront.c:50:0:
   include/xen/xenbus.h:224:6: note: expected 'struct xenbus_device *' but 
argument is of type 'struct xenbus_device **'
void xenbus_dev_error(struct xenbus_device *dev, int err, const char *fmt, 
...);
 ^~~~
   drivers/scsi/xen-scsifront.c: In function 'scsifront_sdev_destroy':
   drivers/scsi/xen-scsifront.c:681:21: error: passing argument 1 of 
'xenbus_dev_error' from incompatible pointer type 
[-Werror=incompatible-pointer-types]
   xenbus_dev_error(>dev, err,
^
   In file included from drivers/scsi/xen-scsifront.c:50:0:
   include/xen/xenbus.h:224:6: note: expected 'struct xenbus_device *' but 
argument is of type 'struct xenbus_device **'
void xenbus_dev_error(struct xenbus_device *dev, int err, const char *fmt, 
...);
 ^~~~
   cc1: some warnings being treated as errors

vim +663 drivers/scsi/xen-scsifront.c

   653  
   654  static int scsifront_sdev_configure(struct scsi_device *sdev)
   655  {
   656  struct vscsifrnt_info *info = shost_priv(sdev->host);
   657  int err;
   658  
   659  if (info && current == info->curr) {
   660  err = xenbus_printf(XBT_NIL, info->dev->nodename,
   661info->dev_state_path, "%d", 
XenbusStateConnected);
   662  if (err) {
 > 663  xenbus_dev_error(>dev, err,
   664  "%s: writing dev_state_path", __func__);
   665  return err;
   666  }
   667  }
   668  
   669  return 0;
   670  }
   671  

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

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel