Hi Johannes,

[auto build test ERROR on scsi/for-next]
[also build test ERROR on v4.10-rc6 next-20170203]
[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/Hannes-Reinecke/sanitize-sg/20170203-202314
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: x86_64-acpi-redef (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

Note: the linux-review/Hannes-Reinecke/sanitize-sg/20170203-202314 HEAD 
c442f1293c347b17429edecbc5d29d4eb39152b0 builds fine.
      It only hurts bisectibility.

All error/warnings (new ones prefixed by >>):

   drivers/scsi/sg.c: In function 'sg_is_valid_dxfer':
>> drivers/scsi/sg.c:757:10: error: 'dxfer_direction' undeclared (first use in 
>> this function)
     switch (dxfer_direction) {
             ^~~~~~~~~~~~~~~
   drivers/scsi/sg.c:757:10: note: each undeclared identifier is reported only 
once for each function it appears in
>> drivers/scsi/sg.c:776:1: warning: control reaches end of non-void function 
>> [-Wreturn-type]
    }
    ^

vim +/dxfer_direction +757 drivers/scsi/sg.c

   751                  *o_srp = srp;
   752          return count;
   753  }
   754  
   755  static bool sg_is_valid_dxfer(sg_io_hdr_t *hp)
   756  {
 > 757          switch (dxfer_direction) {
   758          case SG_DXFER_NONE:
   759                  if (hp->dxferp || hp->dxfer_len > 0)
   760                          return false;
   761                  return true;
   762          case SG_DXFER_TO_DEV:
   763          case SG_DXFER_FROM_DEV:
   764          case SG_DXFER_TO_FROM_DEV:
   765                  if (!hp->dxferp || hp->dxfer_len == 0)
   766                          return false;
   767                  return true;
   768          case SG_DXFER_UNKNOWN:
   769                  if ((!hp->dxferp && hp->dxfer_len) ||
   770                      (hp->dxferp && hp->dxfer_len == 0))
   771                          return false;
   772                  return true;
   773          default:
   774                  return false;
   775          }
 > 776  }
   777  
   778  static int
   779  sg_common_write(Sg_fd * sfp, Sg_request * srp,

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