Re: [scsi:misc 14/106] drivers/scsi/storvsc_drv.c:1658 storvsc_queuecommand() warn: curly braces intended?

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

 



On Mon, 2015-04-13 at 14:56 +0300, Dan Carpenter wrote:
> tree:   git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git misc
> head:   0351b8f81392c6dbbbb036e5c8f73ceff68726e9
> commit: be0cf6ca301c61458dc4aa1a37acf4f58d2ed3d6 [14/106] scsi: storvsc: Set the tablesize based on the information given by the host
> 
> drivers/scsi/storvsc_drv.c:1658 storvsc_queuecommand() warn: curly braces intended?
> 
> git remote add scsi git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
> git remote update scsi
> git checkout be0cf6ca301c61458dc4aa1a37acf4f58d2ed3d6
> vim +1658 drivers/scsi/storvsc_drv.c
> 
> c5b463ae drivers/staging/hv/storvsc_drv.c K. Y. Srinivasan 2011-05-10  1642  			sgl = cmd_request->bounce_sgl;
> c5b463ae drivers/staging/hv/storvsc_drv.c K. Y. Srinivasan 2011-05-10  1643  			sg_count = cmd_request->bounce_sgl_count;
> c5b463ae drivers/staging/hv/storvsc_drv.c K. Y. Srinivasan 2011-05-10  1644  		}
> c5b463ae drivers/staging/hv/storvsc_drv.c K. Y. Srinivasan 2011-05-10  1645  
> be0cf6ca drivers/scsi/storvsc_drv.c       K. Y. Srinivasan 2015-03-27  1646  
> be0cf6ca drivers/scsi/storvsc_drv.c       K. Y. Srinivasan 2015-03-27  1647  		if (sg_count > MAX_PAGE_BUFFER_COUNT) {
> be0cf6ca drivers/scsi/storvsc_drv.c       K. Y. Srinivasan 2015-03-27  1648  
> be0cf6ca drivers/scsi/storvsc_drv.c       K. Y. Srinivasan 2015-03-27  1649  			payload_sz = (sg_count * sizeof(void *) +
> be0cf6ca drivers/scsi/storvsc_drv.c       K. Y. Srinivasan 2015-03-27  1650  				      sizeof(struct vmbus_packet_mpb_array));
> be0cf6ca drivers/scsi/storvsc_drv.c       K. Y. Srinivasan 2015-03-27  1651  			payload = kmalloc(payload_sz, GFP_ATOMIC);
> be0cf6ca drivers/scsi/storvsc_drv.c       K. Y. Srinivasan 2015-03-27  1652  			if (!payload) {
> be0cf6ca drivers/scsi/storvsc_drv.c       K. Y. Srinivasan 2015-03-27  1653  				if (cmd_request->bounce_sgl_count)
> 
> Start block here.
> 
> be0cf6ca drivers/scsi/storvsc_drv.c       K. Y. Srinivasan 2015-03-27  1654  					destroy_bounce_buffer(
> be0cf6ca drivers/scsi/storvsc_drv.c       K. Y. Srinivasan 2015-03-27  1655  					cmd_request->bounce_sgl,
> be0cf6ca drivers/scsi/storvsc_drv.c       K. Y. Srinivasan 2015-03-27  1656  					cmd_request->bounce_sgl_count);
> be0cf6ca drivers/scsi/storvsc_drv.c       K. Y. Srinivasan 2015-03-27  1657  
> be0cf6ca drivers/scsi/storvsc_drv.c       K. Y. Srinivasan 2015-03-27 @1658  					return SCSI_MLQUEUE_DEVICE_BUSY;
> 
> End block here.
> 
> be0cf6ca drivers/scsi/storvsc_drv.c       K. Y. Srinivasan 2015-03-27  1659  			}
> be0cf6ca drivers/scsi/storvsc_drv.c       K. Y. Srinivasan 2015-03-27  1660  		}
> be0cf6ca drivers/scsi/storvsc_drv.c       K. Y. Srinivasan 2015-03-27  1661  
> be0cf6ca drivers/scsi/storvsc_drv.c       K. Y. Srinivasan 2015-03-27  1662  		payload->range.len = length;
> be0cf6ca drivers/scsi/storvsc_drv.c       K. Y. Srinivasan 2015-03-27  1663  		payload->range.offset = sgl[0].offset;
> be0cf6ca drivers/scsi/storvsc_drv.c       K. Y. Srinivasan 2015-03-27  1664  
> aaced993 drivers/scsi/storvsc_drv.c       K. Y. Srinivasan 2015-03-27  1665  		cur_sgl = sgl;
> aaced993 drivers/scsi/storvsc_drv.c       K. Y. Srinivasan 2015-03-27  1666  		for (i = 0; i < sg_count; i++) {

I think this is just screwed up indentation.  You have to return
DEVICE_BUSY for the kmalloc failure.  The if is just seeing if cleanup
is needed.

James

��.n��������+%������w��{.n�����{������ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f





[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