Re: [PATCH 07/19] sg: add sg v4 interface support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Douglas,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on next-20190524]
[cannot apply to v5.2-rc1]
[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/Douglas-Gilbert/sg-v4-interface-rq-sharing-multiple-rqs/20190525-161346
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=xtensa 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

   drivers//scsi/sg.c: In function 'sg_v4_receive':
>> drivers//scsi/sg.c:1125:18: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     h4p->response = (u64)srp->s_hdr4.sbp;
                     ^

vim +1125 drivers//scsi/sg.c

  1091	
  1092	static int
  1093	sg_v4_receive(struct sg_fd *sfp, struct sg_request *srp, void __user *p,
  1094		      struct sg_io_v4 *h4p)
  1095	{
  1096		int err, err2;
  1097		u32 rq_result = srp->rq_result;
  1098	
  1099		SG_LOG(3, sfp->parentdp, "%s: p=%s, h4p=%s\n", __func__,
  1100		       (p ? "given" : "NULL"), (h4p ? "given" : "NULL"));
  1101		err = sg_rec_v3v4_state(sfp, srp, true);
  1102		h4p->guard = 'Q';
  1103		h4p->protocol = 0;
  1104		h4p->subprotocol = 0;
  1105		h4p->device_status = rq_result & 0xff;
  1106		h4p->driver_status = driver_byte(rq_result);
  1107		h4p->transport_status = host_byte(rq_result);
  1108		h4p->response_len = srp->sense_len;
  1109		h4p->info = srp->rq_info;
  1110		h4p->flags = srp->rq_flags;
  1111		h4p->duration = srp->duration;
  1112		switch (srp->s_hdr4.dir) {
  1113		case SG_DXFER_FROM_DEV:
  1114			h4p->din_xfer_len = srp->sgat_h.dlen;
  1115			break;
  1116		case SG_DXFER_TO_DEV:
  1117			h4p->dout_xfer_len = srp->sgat_h.dlen;
  1118			break;
  1119		default:
  1120			break;
  1121		}
  1122		h4p->din_resid = srp->in_resid;
  1123		h4p->dout_resid = srp->s_hdr4.out_resid;
  1124		h4p->usr_ptr = srp->s_hdr4.usr_ptr;
> 1125		h4p->response = (u64)srp->s_hdr4.sbp;
  1126		h4p->request_extra = srp->pack_id;
  1127		if (p) {
  1128			if (copy_to_user(p, h4p, SZ_SG_IO_V4))
  1129				err = err ? err : -EFAULT;
  1130		}
  1131		err2 = sg_rstate_chg(srp, atomic_read(&srp->rq_st), SG_RS_DONE_RD);
  1132		if (err2)
  1133			err = err ? err : err2;
  1134		sg_finish_scsi_blk_rq(srp);
  1135		sg_deact_request(sfp, srp);
  1136		return err < 0 ? err : 0;
  1137	}
  1138	

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

Attachment: .config.gz
Description: application/gzip


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux