scsi: Make errp the last parameter of virtio_scsi_common_realize
Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <20170421122710.15373-12-famz@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
		
							parent
							
								
									c0ca74f6f3
								
							
						
					
					
						commit
						bf46e67ddb
					
				@ -233,9 +233,11 @@ static void vhost_scsi_realize(DeviceState *dev, Error **errp)
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    virtio_scsi_common_realize(dev, &err, vhost_dummy_handle_output,
 | 
					    virtio_scsi_common_realize(dev,
 | 
				
			||||||
                               vhost_dummy_handle_output,
 | 
					                               vhost_dummy_handle_output,
 | 
				
			||||||
                               vhost_dummy_handle_output);
 | 
					                               vhost_dummy_handle_output,
 | 
				
			||||||
 | 
					                               vhost_dummy_handle_output,
 | 
				
			||||||
 | 
					                               &err);
 | 
				
			||||||
    if (err != NULL) {
 | 
					    if (err != NULL) {
 | 
				
			||||||
        error_propagate(errp, err);
 | 
					        error_propagate(errp, err);
 | 
				
			||||||
        goto close_fd;
 | 
					        goto close_fd;
 | 
				
			||||||
 | 
				
			|||||||
@ -841,10 +841,11 @@ static struct SCSIBusInfo virtio_scsi_scsi_info = {
 | 
				
			|||||||
    .load_request = virtio_scsi_load_request,
 | 
					    .load_request = virtio_scsi_load_request,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void virtio_scsi_common_realize(DeviceState *dev, Error **errp,
 | 
					void virtio_scsi_common_realize(DeviceState *dev,
 | 
				
			||||||
                                VirtIOHandleOutput ctrl,
 | 
					                                VirtIOHandleOutput ctrl,
 | 
				
			||||||
                                VirtIOHandleOutput evt,
 | 
					                                VirtIOHandleOutput evt,
 | 
				
			||||||
                                VirtIOHandleOutput cmd)
 | 
					                                VirtIOHandleOutput cmd,
 | 
				
			||||||
 | 
					                                Error **errp)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    VirtIODevice *vdev = VIRTIO_DEVICE(dev);
 | 
					    VirtIODevice *vdev = VIRTIO_DEVICE(dev);
 | 
				
			||||||
    VirtIOSCSICommon *s = VIRTIO_SCSI_COMMON(dev);
 | 
					    VirtIOSCSICommon *s = VIRTIO_SCSI_COMMON(dev);
 | 
				
			||||||
@ -878,9 +879,11 @@ static void virtio_scsi_device_realize(DeviceState *dev, Error **errp)
 | 
				
			|||||||
    VirtIOSCSI *s = VIRTIO_SCSI(dev);
 | 
					    VirtIOSCSI *s = VIRTIO_SCSI(dev);
 | 
				
			||||||
    Error *err = NULL;
 | 
					    Error *err = NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    virtio_scsi_common_realize(dev, &err, virtio_scsi_handle_ctrl,
 | 
					    virtio_scsi_common_realize(dev,
 | 
				
			||||||
 | 
					                               virtio_scsi_handle_ctrl,
 | 
				
			||||||
                               virtio_scsi_handle_event,
 | 
					                               virtio_scsi_handle_event,
 | 
				
			||||||
                               virtio_scsi_handle_cmd);
 | 
					                               virtio_scsi_handle_cmd,
 | 
				
			||||||
 | 
					                               &err);
 | 
				
			||||||
    if (err != NULL) {
 | 
					    if (err != NULL) {
 | 
				
			||||||
        error_propagate(errp, err);
 | 
					        error_propagate(errp, err);
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
 | 
				
			|||||||
@ -135,9 +135,11 @@ static inline void virtio_scsi_release(VirtIOSCSI *s)
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void virtio_scsi_common_realize(DeviceState *dev, Error **errp,
 | 
					void virtio_scsi_common_realize(DeviceState *dev,
 | 
				
			||||||
                                VirtIOHandleOutput ctrl, VirtIOHandleOutput evt,
 | 
					                                VirtIOHandleOutput ctrl,
 | 
				
			||||||
                                VirtIOHandleOutput cmd);
 | 
					                                VirtIOHandleOutput evt,
 | 
				
			||||||
 | 
					                                VirtIOHandleOutput cmd,
 | 
				
			||||||
 | 
					                                Error **errp);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void virtio_scsi_common_unrealize(DeviceState *dev, Error **errp);
 | 
					void virtio_scsi_common_unrealize(DeviceState *dev, Error **errp);
 | 
				
			||||||
bool virtio_scsi_handle_event_vq(VirtIOSCSI *s, VirtQueue *vq);
 | 
					bool virtio_scsi_handle_event_vq(VirtIOSCSI *s, VirtQueue *vq);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user